From ec777fd70623e3e9d246e2e56a19517efb099b9b Mon Sep 17 00:00:00 2001 From: Joe Clark Date: Wed, 25 Feb 2026 15:54:00 +0000 Subject: [PATCH 1/4] project: relax error warning when finding unmapped credentials --- .changeset/five-lamps-sin.md | 5 +++++ packages/project/src/serialize/to-app-state.ts | 9 +++++---- 2 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 .changeset/five-lamps-sin.md diff --git a/.changeset/five-lamps-sin.md b/.changeset/five-lamps-sin.md new file mode 100644 index 000000000..4012288e8 --- /dev/null +++ b/.changeset/five-lamps-sin.md @@ -0,0 +1,5 @@ +--- +'@openfn/project': patch +--- + +Suppress error message when generating app state without a credentials.yaml diff --git a/packages/project/src/serialize/to-app-state.ts b/packages/project/src/serialize/to-app-state.ts index 737e16fed..2b7602344 100644 --- a/packages/project/src/serialize/to-app-state.ts +++ b/packages/project/src/serialize/to-app-state.ts @@ -141,11 +141,12 @@ export const mapWorkflow = ( }); if (mappedCredential) { projectCredentialId = mappedCredential.uuid; - } else { - console.warn(`WARING! Failed to map credential ${projectCredentialId} - Lightning may throw an error. - -Ensure the credential exists in project.yaml and try again (maybe ensure the credential is attached to the project in the app and run project fetch)`); } + // else { + // console.warn(`WARING! Failed to map credential ${projectCredentialId} - Lightning may throw an error. + + // Ensure the credential exists in project.yaml and try again (maybe ensure the credential is attached to the project in the app and run project fetch)`); + // } otherOpenFnProps.project_credential_id = projectCredentialId; } } From 8b6e67d4354e712e9e0db671791ed44cd1cf50d3 Mon Sep 17 00:00:00 2001 From: Joe Clark Date: Wed, 25 Feb 2026 17:07:45 +0000 Subject: [PATCH 2/4] update cli docs --- packages/cli/src/execute/command.ts | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/packages/cli/src/execute/command.ts b/packages/cli/src/execute/command.ts index 77e859203..808750ed1 100644 --- a/packages/cli/src/execute/command.ts +++ b/packages/cli/src/execute/command.ts @@ -84,21 +84,23 @@ const options = [ const executeCommand: yargs.CommandModule = { command: 'execute [workflow]', describe: `Run an openfn expression or workflow. Get more help by running openfn help. - \nExecute will run a expression/workflow at the path and write the output state to disk (to ./state.json unless otherwise specified) - \nRemember to include the adaptor name with -a. Auto install adaptors with the -i flag.`, + \nExecute will run a expression/workflow at the path and write the output state to disk (to ./state.json unless otherwise specified)`, aliases: ['$0'], handler: ensure('execute', options), builder: (yargs) => build(options, yargs) // TODO this is now path or workflow name .positional('path', { - describe: - 'The path to load the job or workflow from (a .js or .json file or a dir containing a job.js file)', + describe: 'The path or name of the workflow or expression to run', demandOption: true, }) + .example( + 'openfn my-workflow', + 'Execute a workflow called my-workflow. Requires an openfn.yaml file (created by openfn project pull)' + ) .example( 'openfn foo/job.js', - 'Execute foo/job.js with no adaptor and write the final state to foo/job.json' + 'Execute foo/job.js (with no adaptor) and write the final state to foo/job.json' ) .example( 'openfn workflow.json', @@ -106,11 +108,11 @@ const executeCommand: yargs.CommandModule = { ) .example( 'openfn job.js -a common --log info', - 'Execute job.js with common adaptor and info-level logging' + 'Execute job.js with common adaptor (which will be automatically installed) and info-level logging' ) .example( - 'openfn compile job.js -a http', - 'Compile the expression at job.js with the http adaptor and print the code to stdout' + 'openfn job.js -ma common', + 'Execute job.js with the build of the common adaptor found in your adaptors monorepo' ), }; From 81944ad910b56e861262b05f10807c4be8e7855f Mon Sep 17 00:00:00 2001 From: Joe Clark Date: Wed, 25 Feb 2026 17:12:30 +0000 Subject: [PATCH 3/4] tweak messaging --- packages/project/src/Workspace.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/project/src/Workspace.ts b/packages/project/src/Workspace.ts index 93d44b3f8..618bdbcf2 100644 --- a/packages/project/src/Workspace.ts +++ b/packages/project/src/Workspace.ts @@ -43,7 +43,7 @@ export class Workspace { } catch (e) { if (validate) { this.logger.warn( - `Could not find openfn.yaml at ${workspacePath}. Using default values.` + `Could not find openfn.yaml at ${workspacePath}. Using default configuration.` ); } } From bbc0d2ea7eb76afd94cd6d92597f77a4b4c72ab6 Mon Sep 17 00:00:00 2001 From: Joe Clark Date: Wed, 25 Feb 2026 17:14:53 +0000 Subject: [PATCH 4/4] changeset --- .changeset/slow-worms-try.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/slow-worms-try.md diff --git a/.changeset/slow-worms-try.md b/.changeset/slow-worms-try.md new file mode 100644 index 000000000..5d8f783d4 --- /dev/null +++ b/.changeset/slow-worms-try.md @@ -0,0 +1,5 @@ +--- +'@openfn/cli': patch +--- + +Improve --help docs and error messages