Repository navigation
fix(package): align export/import with upstream spec 1.1.1 - #27
Merged
Merged
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes drift between the
n8n packagecommands and the upstream n8n Public API spec 1.1.1 (/n8n-packages/export,/n8n-packages/import). Before this change, every export run with a policy flag failed with a 400.Export
dependencyPolicy/versionPolicy, replacingmissingWorkflowDependencyPolicy/workflowVersionPolicy. The body hasadditionalProperties: false, so the old names returned 400. The enum values are unchanged.--dependency-policyand--version-policy. The old flags (--missing-workflow-dependency-policy,--workflow-version-policy) still work as hidden, deprecated aliases. Setting both the new and the old flag is rejected before transport.--out -and the JSON summary.--inputaccepts the new names. A document that still uses an old name is rejected locally with an error that names the replacement, and no request is sent.agentIdsfield and repeatable--agent-idflag. Agents belong to the loose group, so they can't be combined with--project-id.projectIds, are capped at 300 locally.agent:export/workflow:export/project:export). The 400 hint uses the new flag names.Import
credentialMissingMode=create-with-values,dataTableSchemaConflictPolicy=overwrite|overwrite-non-destructive. I re-checked every other import enum against the spec and none changed.--data-table-schema-policy overwritecan drop the values in removed or retyped columns, so the confirmation prompt adds a stronger warning. Help and Long text explain what it destroys.credentials.seeded,credentials.incomplete, anddataTables.updatedare decoded and shown in text output. Incomplete credentials print a stderr hint with their target IDs and the next step (n8n credential update).ImportPackageResultkeeps the raw response, so unknown fields (nested ones included) survive--output json. This follows the existingImportBlockingIssuepattern.workflowIdPolicydefaults; the spec now sayssourcein both places. The field is still always sent.newImportBlockedErrortakes the endpoint path as a parameter, to prepare forimport-selection(chore(release): document PR-first, tag-after-merge flow #9).Verification
make docs && make checkgreen.go test -race -shuffle=ongreen for cli/n8n/coverage.🤖 Generated with Claude Code