-
Notifications
You must be signed in to change notification settings - Fork 2
feat: per-operation refactor + Asset, Transform, and Admin operations #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
9f4b15a
Refactor node into per-operation handlers and add asset search
eitanp461 30479f7
Regenerate package-lock.json against public npm registry
eitanp461 e282690
test: unblock vitest on current toolchain
eitanp461 8f0f6cc
chore: align node descriptor, peer dep, CI, and docs
eitanp461 8d706e6
refactor: relabel resources as Asset/Library and move Search to Asset
eitanp461 55f9b1b
Add Codex to gitignore
eitanp461 8133d06
feat: add Get Asset operation (asset_id-based)
eitanp461 7d9076e
feat: add Delete Assets operation (bulk by public_id)
eitanp461 0e52a34
feat: add Update Asset Display Name operation (asset_id-based)
eitanp461 8612955
feat: add Asset resource (asset_id-based) and Append-mode tag updates
eitanp461 239e175
fix: correct codex node identifier to community package namespace
eitanp461 a40ce72
feat: surface video alongside images in node search and docs
eitanp461 d1d5107
feat: add Transform resource with 8 image/video delivery-URL operations
eitanp461 918ba6a
feat: add Video Player op, Multi-Step aspect-ratio crop, and thumbnai…
eitanp461 3c1f40c
docs: split agent guidance into lean AGENTS.md core + on-demand docs
eitanp461 5d3d1a1
fix: keep $json lowercase in thumbnail base-transformation description
eitanp461 e3d0730
fix: harden Transform delivery URLs and align release validation
eitanp461 4aa32d5
feat: improve agentic affordances in node and operation descriptions
eitanp461 7779c8a
feat: build delivery URLs via @cloudinary/url-gen with analytics slug
eitanp461 c96cff9
fix: make secureDistribution conditional on privateCdn in credentials
eitanp461 51140c2
docs: remove stale zero-dep constraint from agent instructions
eitanp461 af32123
fix: address PR #7 review feedback
eitanp461 5bff9a1
feat: categorize and reorder Transform operations and resources
eitanp461 035f15f
chore: add backward-compat contract check tooling
eitanp461 e0c7ef3
ci: gate PRs on backward-compat contract check
eitanp461 4ffd88c
refactor: rename compat-check to backward-compatibility-check
eitanp461 b0c9d69
feat: shorten Video Player action label
eitanp461 9c0e24e
fix: drop empty params from Cloudinary signature
eitanp461 6d50dc7
feat: add pad fit modes and pad background to Resize
eitanp461 4d44aa0
chore: ignore .DS_Store
eitanp461 afe5830
feat: add Video Crop and Resize transform operations
eitanp461 ab6fc1d
feat: chain transforms across nodes via Continue From Transformation
eitanp461 08b9a1a
fix: apply Video Player transformation to the video stream
eitanp461 d6c025d
docs: explain transform chaining model and property mapping
eitanp461 7e2f50f
feat: add Video Player Crop Mode and guard the aspect-ratio crop conf…
eitanp461 ff65225
ci: surface baseline build output in backward-compat check
eitanp461 aec05d7
fix: build compat-check baseline against public npm, not CodeArtifact
eitanp461 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| v20.19.0 | ||
| v24.16.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # AGENTS.md | ||
|
|
||
| Guidance for coding agents working in this repository. This is an n8n **community node** package — a single node (`n8n-nodes-cloudinary.cloudinary`) and a single credential type (`cloudinaryApi`). No service layer, no SDK; zero runtime deps beyond the `n8n-workflow` peer dep. | ||
|
|
||
| Deep references live in [docs/](docs/) and are linked inline below — read them when a task touches that area, so this file stays small. | ||
|
|
||
| ## Commands | ||
|
|
||
| - `npm run build` — compile TypeScript and copy SVG/PNG icons into `dist/` via gulp. | ||
| - `npm run dev` — `tsc --watch`. Does not re-run the icon copy; if icons change, re-run `build`. | ||
| - `npm run lint` / `npm run lintfix` — ESLint (`eslint-plugin-n8n-nodes-base`) over `nodes`, `credentials`, `package.json`. | ||
| - `npm run format` — Prettier over `nodes` and `credentials`. | ||
| - `npm run n8n-validate` — `@n8n/scan-community-package`; required to pass before publishing. | ||
| - `npm run prepublishOnly` — build + stricter lint (`.eslintrc.prepublish.js`); runs automatically on `npm publish`. | ||
| - `npm test` — run the Vitest suite once. `npm run test:watch` for watch mode. | ||
|
|
||
| ## Core rules | ||
|
|
||
| These bite often; the linked docs carry the full reasoning. | ||
|
|
||
| - **No runtime dependencies — ever.** n8n forbids verified community nodes from declaring any runtime `dependencies`; `package.json` must carry only `devDependencies` and the `n8n-workflow` peer dep. This is a hard publishing gate, not a style preference — don't reach for an SDK or helper library; hand-roll it (see the pure-JS SHA-256 and multipart builders) or it won't pass verification. → [n8n verification rules](https://docs.n8n.io/integrations/community-nodes/build-community-nodes/#submit-your-node-for-verification-by-n8n) | ||
| - **Tests use Vitest, not Jest.** `*.test.ts` is excluded from `tsconfig.json`, so any shared test util importing `vitest` must also be excluded or it leaks into `dist/`. → [docs/architecture.md#testing](docs/architecture.md#testing) | ||
| - **Three interaction flows** (signed Upload API / HTTP Basic auth / delivery-URL construction with no API call) — pick the right one when adding an op. → [docs/architecture.md#three-flows](docs/architecture.md#three-flows) | ||
| - **Transformation logic lives in the component builders**, not the handlers — Multi-Step is a second consumer and must not drift. Change the builder, not a handler. Transforms compose three ways (single op / in-node Multi-Step / cross-node `Continue From Transformation`); the cross-node bridge is a contract — an op's `transformation` output maps to the next op's `continueFromTransformation` input. The Widgets `videoPlayer` also consumes a `transformation` string (embed-URL + HLS caveats). → [docs/transforms.md](docs/transforms.md) | ||
| - **Mirror the Cloudinary API for field/option/output names** (`type`, `public_id`, `resource_type`, …) — don't invent or prefix when an API name exists. → [docs/conventions.md#naming-mirror-the-cloudinary-api](docs/conventions.md#naming-mirror-the-cloudinary-api) | ||
| - **Saved-workflow JSON is a public contract** — evolve additively or bump `typeVersion`; never rename a param `name` or option `value`. → [docs/backwards-compat.md](docs/backwards-compat.md) | ||
| - **Structured metadata is a pipe-separated string, not JSON** — always go through `metadataToPipeString`. → [docs/conventions.md#structured-metadata-format](docs/conventions.md#structured-metadata-format) | ||
|
|
||
| ## Architecture at a glance | ||
|
|
||
| A declarative node class + a per-operation handler map + small util files: | ||
|
|
||
| - [Cloudinary.node.ts](nodes/Cloudinary/Cloudinary.node.ts) — `INodeTypeDescription`; fields from [descriptions/](nodes/Cloudinary/descriptions/) drive the UI via `displayOptions.show` on `resource` + `operation`. `execute()` is a thin loop: resolve creds → look up `operationHandlers[`${resource}:${operation}`]` → wrap the returned JSON into `INodeExecutionData`. | ||
| - [operations/](nodes/Cloudinary/operations/) — one file per operation, grouped by resource; each exports an `OperationHandler`. [operations/index.ts](nodes/Cloudinary/operations/index.ts) maps `${resource}:${operation}` → handler. | ||
| - [cloudinary.utils.ts](nodes/Cloudinary/cloudinary.utils.ts) — signing, multipart, URL/delivery builders, metadata serialization, error extraction. | ||
|
|
||
| **Adding an operation:** (1) add it to the matching `operation` options block + any fields it needs (with the right `displayOptions.show`) under [descriptions/](nodes/Cloudinary/descriptions/); (2) drop a handler file in `operations/<resource>/`; (3) register it in [operations/index.ts](nodes/Cloudinary/operations/index.ts). No change to `execute()` needed. | ||
|
|
||
| The full file map, the three interaction flows, the testing setup, n8n integration points, and the build-output contract are in **[docs/architecture.md](docs/architecture.md)**. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # CLAUDE.md | ||
|
|
||
| Project guidance for coding agents lives in [AGENTS.md](AGENTS.md) (the cross-agent standard). The line below imports it so Claude Code loads it as memory; keep all content in `AGENTS.md` and the `docs/` it links. | ||
|
|
||
| @AGENTS.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.