@openfn/cli 0.0.10 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -3,15 +3,16 @@
3
3
  This package contains a new devtools CLI.
4
4
 
5
5
  The CLI allows you to
6
- * Run a job (expression), writing output to disk or stdout
7
- * ~~Compile a job~~ (coming soon)
8
- * ~~Validate a job~~ (coming soon)
9
- * Use local language adaptors to run the job
6
+
7
+ - Run a job (expression), writing output to disk or stdout
8
+ - ~~Compile a job~~ (coming soon)
9
+ - ~~Validate a job~~ (coming soon)
10
+ - Use local language adaptors to run the job
10
11
 
11
12
  The CLI reads a path as its main argument. That path should either point to a .js file or a folder.
12
13
 
13
- * If the path ends in .js, load as a job file and execute. State and output will be read/written relative to it.
14
- * If the path is a folder, the CLI will look for a job.js, state.json and write an output.json.
14
+ - If the path ends in .js, load as a job file and execute. State and output will be read/written relative to it.
15
+ - If the path is a folder, the CLI will look for a job.js, state.json and write an output.json.
15
16
 
16
17
  From this input it will infer a working directory, from which state will be read and output will be written.
17
18
 
@@ -70,19 +71,19 @@ Right now, that means @openfn/language-common@2.0.0-rc3.
70
71
 
71
72
  Here's how I recommend getting set up:
72
73
 
73
- * Create a folder for next-gen language adaptors somewhere on your machine
74
+ - Create a folder for next-gen language adaptors somewhere on your machine
74
75
 
75
76
  ```
76
77
  $ mkdir -p ~/adaptors/@openfn
77
78
  ```
78
79
 
79
- * Clone `language-common` into that folder
80
+ - Clone `language-common` into that folder
80
81
 
81
82
  ```
82
83
  git clone https://github.com/OpenFn/language-common.git ~/adaptors/@openfn --branch 2.0.0-pre
83
84
  ```
84
85
 
85
- * Set your `OPENFN_MODULES_HOME` environment variable to point to the next-gen adaptors folder. This will tell the CLI to load adaptors from this folder by default.
86
+ - Set your `OPENFN_MODULES_HOME` environment variable to point to the next-gen adaptors folder. This will tell the CLI to load adaptors from this folder by default.
86
87
 
87
88
  ```
88
89
  # In ~/.bashc or whatever
@@ -112,14 +113,14 @@ Any import statements inside a job have to resolve to a node module.
112
113
 
113
114
  A module can be resolved:
114
115
 
115
- * Relative to the env var OPENFN_MODULE_HOME
116
- * Relative to CLI's node_modules
117
- * Relative to global node_modules
116
+ - Relative to the env var OPENFN_MODULE_HOME
117
+ - Relative to CLI's node_modules
118
+ - Relative to global node_modules
118
119
 
119
120
  Basically, to work with adaptors, you should:
120
121
 
121
- * Save your adaptors globally
122
+ - Save your adaptors globally
122
123
 
123
124
  Or
124
125
 
125
- * Save adaptors to a folder somewhere (~/openfn) and set OPENFN_MODULE_HOME=~/openfn
126
+ - Save adaptors to a folder somewhere (~/openfn) and set OPENFN_MODULE_HOME=~/openfn
package/dist/index.d.ts CHANGED
@@ -1,2 +1 @@
1
1
  #!/usr/bin/env node
2
- export {};
package/dist/index.js CHANGED
@@ -1,102 +1,90 @@
1
1
  #!/usr/bin/env node
2
- import path from 'node:path';
3
- import * as url from 'url';
4
- import { fork } from 'node:child_process';
5
- import yargs from 'yargs';
6
- import { hideBin } from 'yargs/helpers';
7
2
 
8
- /**
9
- * Utility to run CLI commands inside a child process
10
- * This lets us hide the neccessary arguments needed to run our devtools
11
- */
12
- // The default export will create a new child process which calls itself
13
- function runInChildProcess (basePath, opts) {
14
- const execArgv = [
15
- // Suppress experimental argument warnings
16
- '--no-warnings',
17
- // Allows us to load an ESM module from a text string
18
- '--experimental-vm-modules',
19
- // Allows us to do import('path/to/language-common') in the linker
20
- '--experimental-specifier-resolution=node',
21
- ];
22
- const dirname = path.dirname(url.fileURLToPath(import.meta.url));
23
- const child = fork(`${dirname}/process/runner.js`, [], { execArgv });
24
- child.on('message', ({ done }) => {
25
- if (done) {
26
- child.kill();
27
- process.exit(0);
28
- }
29
- });
30
- child.send({ init: true, basePath, opts });
3
+ // src/process/spawn.ts
4
+ import path from "node:path";
5
+ import * as url from "url";
6
+ import { fork } from "node:child_process";
7
+ function spawn_default(basePath, opts2) {
8
+ const execArgv = [
9
+ "--no-warnings",
10
+ "--experimental-vm-modules",
11
+ "--experimental-specifier-resolution=node"
12
+ ];
13
+ const dirname = path.dirname(url.fileURLToPath(import.meta.url));
14
+ const child = fork(`${dirname}/process/runner.js`, [], { execArgv });
15
+ child.on("message", ({ done }) => {
16
+ if (done) {
17
+ child.kill();
18
+ process.exit(0);
19
+ }
20
+ });
21
+ child.send({ init: true, basePath, opts: opts2 });
31
22
  }
32
23
 
33
- const cmd = yargs(hideBin(process.argv))
34
- .command('[path]', "Run the job at the path")
35
- .command('--test', "Run a trivial test job with no disk I/O")
36
- .example('openfn path/to/dir', 'Looks for job.js, state.json in path/to/dir')
37
- .example('openfn foo/job.js', 'Reads foo/job.js, looks for state and output in foo')
38
- .example('openfn job.js -adaptor @openfn/language-common', 'Run job.js with automatic imports from the commmon language adaptor')
39
- .example('openfn job.js -adaptor @openfn/language-common=repo/openfn/language-common', 'Run job.js with a local implementation of the common language adaptor')
40
- .example('openfn foo/job.js -c', 'Compile a job to foo/output/js')
41
- .example('openfn foo/job.js -cO', 'Compile a job to stdout')
42
- .example('openfn foo/job.js --log debug', 'Run a job with debug-level logging')
43
- .example('openfn foo/job.js --log compiler=debug', 'Use debug logging in the compiler only')
44
- .positional('path', {
45
- describe: 'The path to load the job from (a .js file or a dir containing a job.js file)',
46
- demandOption: true
47
- })
48
- .option('test', {
49
- description: 'Run a test job to exercise the installation. Pass a number via -S to multiply by 2.',
50
- boolean: true,
51
- })
52
- .option('output-path', {
53
- alias: 'o',
54
- description: 'Path to the output file',
55
- })
56
- .option('output-stdout', {
57
- alias: 'O',
58
- boolean: true,
59
- description: 'Print output to stdout (intead of a file)',
60
- })
61
- .option('state-path', {
62
- alias: 's',
63
- description: 'Path to the state file'
64
- })
65
- .option('state-stdin', {
66
- alias: 'S',
67
- description: 'Read state from stdin (instead of a file)'
68
- })
69
- .option('no-validation', {
70
- boolean: true,
71
- description: 'Skip validation'
72
- })
73
- .option('compile-only', {
74
- alias: 'c',
75
- boolean: true,
76
- description: 'Compile the job but don\'t execute it. State is written to output.js or returned to console if -O is set.'
77
- })
78
- .option('no-compile', {
79
- boolean: true,
80
- description: 'Skip compilation'
81
- })
82
- .option('adaptors', {
83
- alias: ['a', 'adaptor'],
84
- description: 'Pass one or more adaptors in the form name=path/to/adaptor',
85
- array: true
86
- })
87
- // TODO this becomes log compiler=debug
88
- .option('trace-linker', {
89
- alias: ['t', 'trace'],
90
- description: 'Trace module resolution output in the linker',
91
- boolean: true,
92
- })
93
- .option('log', {
94
- alias: ['l'],
95
- description: 'Set the default log level to none, trace, info or default',
96
- array: true
97
- })
98
- .alias('v', 'version');
24
+ // src/cli.ts
25
+ import yargs from "yargs";
26
+ import { hideBin } from "yargs/helpers";
27
+ var cmd = yargs(hideBin(process.argv)).command("[path]", "Run the job at the path").command("--test", "Run a trivial test job with no disk I/O").example("openfn path/to/dir", "Looks for job.js, state.json in path/to/dir").example(
28
+ "openfn foo/job.js",
29
+ "Reads foo/job.js, looks for state and output in foo"
30
+ ).example(
31
+ "openfn job.js -adaptor @openfn/language-common",
32
+ "Run job.js with automatic imports from the commmon language adaptor"
33
+ ).example(
34
+ "openfn job.js -adaptor @openfn/language-common=repo/openfn/language-common",
35
+ "Run job.js with a local implementation of the common language adaptor"
36
+ ).example("openfn foo/job.js -c", "Compile a job to foo/output/js").example("openfn foo/job.js -cO", "Compile a job to stdout").example(
37
+ "openfn foo/job.js --log debug",
38
+ "Run a job with debug-level logging"
39
+ ).example(
40
+ "openfn foo/job.js --log compiler=debug",
41
+ "Use debug logging in the compiler only"
42
+ ).positional("path", {
43
+ describe: "The path to load the job from (a .js file or a dir containing a job.js file)",
44
+ demandOption: true
45
+ }).option("test", {
46
+ description: "Run a test job to exercise the installation. Pass a number via -S to multiply by 2.",
47
+ boolean: true
48
+ }).option("output-path", {
49
+ alias: "o",
50
+ description: "Path to the output file"
51
+ }).option("output-stdout", {
52
+ alias: "O",
53
+ boolean: true,
54
+ description: "Print output to stdout (intead of a file)"
55
+ }).option("state-path", {
56
+ alias: "s",
57
+ description: "Path to the state file"
58
+ }).option("state-stdin", {
59
+ alias: "S",
60
+ description: "Read state from stdin (instead of a file)"
61
+ }).option("no-validation", {
62
+ boolean: true,
63
+ description: "Skip validation"
64
+ }).option("compile-only", {
65
+ alias: "c",
66
+ boolean: true,
67
+ description: "Compile the job but don't execute it. State is written to output.js or returned to console if -O is set."
68
+ }).option("no-compile", {
69
+ boolean: true,
70
+ description: "Skip compilation"
71
+ }).option("immutable", {
72
+ boolean: true,
73
+ description: "Treat state as immutable"
74
+ }).option("adaptors", {
75
+ alias: ["a", "adaptor"],
76
+ description: "Pass one or more adaptors in the form name=path/to/adaptor",
77
+ array: true
78
+ }).option("trace-linker", {
79
+ alias: ["t", "trace"],
80
+ description: "Trace module resolution output in the linker",
81
+ boolean: true
82
+ }).option("log", {
83
+ alias: ["l"],
84
+ description: "Set the default log level to none, trace, info or default",
85
+ array: true
86
+ }).alias("v", "version");
99
87
 
100
- const opts = cmd.parse();
101
- runInChildProcess(opts._[0], opts);
102
- //# sourceMappingURL=index.js.map
88
+ // src/index.ts
89
+ var opts = cmd.parse();
90
+ spawn_default(opts._[0], opts);
@@ -1 +1 @@
1
- export {};
1
+
@@ -1,364 +1,305 @@
1
- import fs from 'node:fs/promises';
2
- import actualCreateLogger, { isValidLogLevel, printDuration } from '@openfn/logger';
3
- import path from 'node:path';
4
- import compile$1, { preloadAdaptorExports } from '@openfn/compiler';
5
- import run from '@openfn/runtime';
1
+ // src/commands.ts
2
+ import fs3 from "node:fs/promises";
6
3
 
7
- // Wrapper around the logger API to load a namespaced logger with the right options
8
- // All known loggers
9
- const CLI = 'cli';
10
- const COMPILER = 'compiler';
11
- const RUNTIME = 'runtime';
12
- const JOB = 'job';
13
- const namespaces = {
14
- [CLI]: 'CLI',
15
- [RUNTIME]: 'R/T',
16
- [COMPILER]: 'CMP',
17
- [JOB]: 'JOB'
4
+ // src/util/logger.ts
5
+ import actualCreateLogger, { printDuration } from "@openfn/logger";
6
+ var CLI = "cli";
7
+ var COMPILER = "compiler";
8
+ var RUNTIME = "runtime";
9
+ var JOB = "job";
10
+ var namespaces = {
11
+ [CLI]: "CLI",
12
+ [RUNTIME]: "R/T",
13
+ [COMPILER]: "CMP",
14
+ [JOB]: "JOB"
18
15
  };
19
- const createLogger = (name = '', options) => {
20
- const logOptions = options.log || {};
21
- let level = logOptions[name] || logOptions.default || 'default';
22
- return actualCreateLogger(namespaces[name] || name, {
23
- level,
24
- ...logOptions,
25
- });
16
+ var createLogger = (name = "", options) => {
17
+ const logOptions = options.log || {};
18
+ let level = logOptions[name] || logOptions.default || "default";
19
+ return actualCreateLogger(namespaces[name] || name, {
20
+ level,
21
+ ...logOptions
22
+ });
26
23
  };
27
- const createNullLogger = () => createLogger(undefined, { log: { default: 'none' } });
24
+ var logger_default = createLogger;
25
+ var createNullLogger = () => createLogger(void 0, { log: { default: "none" } });
28
26
 
29
- const defaultLoggerOptions = {
30
- default: 'default',
31
- // TODO fix to lower case
32
- job: 'debug',
27
+ // src/util/ensure-opts.ts
28
+ import path from "node:path";
29
+ import { isValidLogLevel } from "@openfn/logger";
30
+ var defaultLoggerOptions = {
31
+ default: "default",
32
+ job: "debug"
33
33
  };
34
- const ERROR_MESSAGE_LOG_LEVEL = 'Unknown log level. Valid levels are none, debug, info and default.';
35
- const ERROR_MESSAGE_LOG_COMPONENT = 'Unknown log component. Valid components are cli, compiler, runtime and job.';
36
- const componentShorthands = {
37
- cmp: 'compiler',
38
- rt: 'runtime',
39
- 'r/t': 'runtime',
34
+ var ERROR_MESSAGE_LOG_LEVEL = "Unknown log level. Valid levels are none, debug, info and default.";
35
+ var ERROR_MESSAGE_LOG_COMPONENT = "Unknown log component. Valid components are cli, compiler, runtime and job.";
36
+ var componentShorthands = {
37
+ cmp: "compiler",
38
+ rt: "runtime",
39
+ "r/t": "runtime"
40
40
  };
41
- // TODO what about shorthands?
42
- const isValidComponent = (v) => /^(cli|runtime|compiler|job|default)$/i.test(v);
43
- const ensureLogOpts = (opts) => {
44
- const components = {};
45
- if (opts.log) {
46
- // Parse and validate each incoming log argument
47
- opts.log.forEach((l) => {
48
- let component = '';
49
- let level = '';
50
- if (l.match(/=/)) {
51
- const parts = l.split('=');
52
- component = parts[0].toLowerCase();
53
- if (componentShorthands[component]) {
54
- component = componentShorthands[component];
55
- }
56
- level = parts[1].toLowerCase();
57
- }
58
- else {
59
- component = 'default';
60
- level = l.toLowerCase();
61
- }
62
- if (!isValidComponent(component)) {
63
- throw new Error(ERROR_MESSAGE_LOG_COMPONENT);
64
- }
65
- level = level.toLowerCase();
66
- if (!isValidLogLevel(level)) {
67
- // TODO need to think about how the CLI frontend handles these errors
68
- // But this is fine for now
69
- throw new Error(ERROR_MESSAGE_LOG_LEVEL);
70
- }
71
- components[component] = level;
72
- });
73
- // TODO what if other log options are passed? Not really a concern right now
74
- }
75
- else if (opts.test) {
76
- // In test mode, log at info level by default
77
- components.default = 'info';
78
- }
79
- return {
80
- ...defaultLoggerOptions,
81
- ...components,
82
- };
41
+ var isValidComponent = (v) => /^(cli|runtime|compiler|job|default)$/i.test(v);
42
+ var ensureLogOpts = (opts) => {
43
+ const components = {};
44
+ if (opts.log) {
45
+ opts.log.forEach((l) => {
46
+ let component = "";
47
+ let level = "";
48
+ if (l.match(/=/)) {
49
+ const parts = l.split("=");
50
+ component = parts[0].toLowerCase();
51
+ if (componentShorthands[component]) {
52
+ component = componentShorthands[component];
53
+ }
54
+ level = parts[1].toLowerCase();
55
+ } else {
56
+ component = "default";
57
+ level = l.toLowerCase();
58
+ }
59
+ if (!isValidComponent(component)) {
60
+ throw new Error(ERROR_MESSAGE_LOG_COMPONENT);
61
+ }
62
+ level = level.toLowerCase();
63
+ if (!isValidLogLevel(level)) {
64
+ throw new Error(ERROR_MESSAGE_LOG_LEVEL);
65
+ }
66
+ components[component] = level;
67
+ });
68
+ } else if (opts.test) {
69
+ components.default = "info";
70
+ }
71
+ return {
72
+ ...defaultLoggerOptions,
73
+ ...components
74
+ };
83
75
  };
84
- function ensureOpts(basePath = '.', opts) {
85
- const newOpts = {
86
- compileOnly: Boolean(opts.compileOnly),
87
- modulesHome: opts.modulesHome || process.env.OPENFN_MODULES_HOME,
88
- noCompile: Boolean(opts.noCompile),
89
- outputStdout: Boolean(opts.outputStdout),
90
- stateStdin: opts.stateStdin,
91
- test: opts.test,
92
- };
93
- const set = (key, value) => {
94
- // @ts-ignore TODO
95
- newOpts[key] = opts.hasOwnProperty(key) ? opts[key] : value;
96
- };
97
- let baseDir = basePath;
98
- if (basePath.endsWith('.js')) {
99
- baseDir = path.dirname(basePath);
100
- set('jobPath', basePath);
101
- }
102
- else {
103
- set('jobPath', `${baseDir}/job.js`);
104
- }
105
- set('statePath', `${baseDir}/state.json`);
106
- if (!opts.outputStdout) {
107
- set('outputPath', newOpts.compileOnly ? `${baseDir}/output.js` : `${baseDir}/output.json`);
108
- }
109
- newOpts.log = ensureLogOpts(opts);
110
- // TODO if no adaptor is provided, default to language common
111
- // Should we go further and bundle language-common?
112
- // But 90% of jobs use something else. Better to use auto loading.
113
- if (opts.adaptors) {
114
- newOpts.adaptors = opts.adaptors;
115
- // newOpts.adaptors = opts.adaptors.map((adaptor) => {
116
- // if (!adaptor.startsWith('@openfn/')) {
117
- // return `@openfn/${adaptor}`
118
- // }
119
- // return adaptor
120
- // });
121
- }
122
- return newOpts;
76
+ function ensureOpts(basePath = ".", opts) {
77
+ const newOpts = {
78
+ compileOnly: Boolean(opts.compileOnly),
79
+ modulesHome: opts.modulesHome || process.env.OPENFN_MODULES_HOME,
80
+ noCompile: Boolean(opts.noCompile),
81
+ outputStdout: Boolean(opts.outputStdout),
82
+ stateStdin: opts.stateStdin,
83
+ test: opts.test,
84
+ immutable: opts.immutable || false
85
+ };
86
+ const set = (key, value) => {
87
+ newOpts[key] = opts.hasOwnProperty(key) ? opts[key] : value;
88
+ };
89
+ let baseDir = basePath;
90
+ if (basePath.endsWith(".js")) {
91
+ baseDir = path.dirname(basePath);
92
+ set("jobPath", basePath);
93
+ } else {
94
+ set("jobPath", `${baseDir}/job.js`);
95
+ }
96
+ set("statePath", `${baseDir}/state.json`);
97
+ if (!opts.outputStdout) {
98
+ set(
99
+ "outputPath",
100
+ newOpts.compileOnly ? `${baseDir}/output.js` : `${baseDir}/output.json`
101
+ );
102
+ }
103
+ newOpts.log = ensureLogOpts(opts);
104
+ if (opts.adaptors) {
105
+ newOpts.adaptors = opts.adaptors;
106
+ }
107
+ return newOpts;
123
108
  }
124
109
 
125
- // Load and compile a job from a file
126
- var compile = async (opts, log) => {
127
- log.debug('Loading job...');
128
- let job;
129
- if (opts.noCompile) {
130
- log.info('Skipping compilation as noCompile is set');
131
- job = fs.readFile(opts.jobPath, 'utf8');
132
- log.success(`Loaded job from ${opts.jobPath} (no compilation)`);
133
- }
134
- else {
135
- const complilerOptions = await loadTransformOptions(opts, log);
136
- complilerOptions.logger = createLogger(COMPILER, opts);
137
- job = compile$1(opts.jobPath, complilerOptions);
138
- log.success(`Compiled job from ${opts.jobPath}`);
139
- }
140
- return job;
110
+ // src/compile/compile.ts
111
+ import fs from "node:fs/promises";
112
+ import compile, { preloadAdaptorExports } from "@openfn/compiler";
113
+ var compile_default = async (opts, log) => {
114
+ log.debug("Loading job...");
115
+ let job;
116
+ if (opts.noCompile) {
117
+ log.info("Skipping compilation as noCompile is set");
118
+ job = fs.readFile(opts.jobPath, "utf8");
119
+ log.success(`Loaded job from ${opts.jobPath} (no compilation)`);
120
+ } else {
121
+ const complilerOptions = await loadTransformOptions(opts, log);
122
+ complilerOptions.logger = logger_default(COMPILER, opts);
123
+ job = compile(opts.jobPath, complilerOptions);
124
+ log.success(`Compiled job from ${opts.jobPath}`);
125
+ }
126
+ return job;
141
127
  };
142
- // TODO this is a bit of a temporary solution
143
- // Adaptors need a version specifier right now to load type definitions for auto import
144
- // But that specifier must be excluded in the actual import by the adaptor
145
- const stripVersionSpecifier = (specifier) => {
146
- const idx = specifier.lastIndexOf('@');
147
- if (idx > 0) {
148
- return specifier.substring(0, idx);
149
- }
150
- return specifier;
128
+ var stripVersionSpecifier = (specifier) => {
129
+ const idx = specifier.lastIndexOf("@");
130
+ if (idx > 0) {
131
+ return specifier.substring(0, idx);
132
+ }
133
+ return specifier;
151
134
  };
152
- // Mutate the opts object to write export information for the add-imports transformer
153
- const loadTransformOptions = async (opts, log) => {
154
- const options = {
155
- logger: log
156
- };
157
- // If an adaptor is passed in, we need to look up its declared exports
158
- // and pass them along to the compiler
159
- if (opts.adaptors) {
160
- const [pattern] = opts.adaptors; // TODO add-imports only takes on adaptor, but the cli can take multiple
161
- const [specifier, path] = pattern.split('=');
162
- // Preload exports from a path, optionally logging errors in case of a failure
163
- const doPreload = async (path, logError = true) => {
164
- try {
165
- const result = await preloadAdaptorExports(path);
166
- if (result) {
167
- log.info(`Pre-loaded typedefs for ${specifier} from ${path}`);
168
- }
169
- return result;
170
- }
171
- catch (e) {
172
- if (logError) {
173
- log.error(`Failed to load adaptor typedefs from path ${path}`);
174
- log.error(e);
175
- }
176
- }
177
- };
178
- // TODO need better trace/debug output on this I think
179
- // Looking up the adaptor's type definition is complex. In this order, we should use:
180
- const exports =
181
- // 1) An explicit file path
182
- (path && await doPreload(path)) ||
183
- // 2) A module defined in the opts.modulesHome folder
184
- (opts.modulesHome && await doPreload(`${opts.modulesHome}/${specifier}`, false)) ||
185
- // 3) An npm module specifier
186
- await doPreload(specifier)
187
- || [];
188
- if (exports.length === 0) {
189
- console.warn(`WARNING: no module exports loaded for ${pattern}`);
190
- console.log(' automatic imports will be skipped');
135
+ var loadTransformOptions = async (opts, log) => {
136
+ const options = {
137
+ logger: log
138
+ };
139
+ if (opts.adaptors) {
140
+ const [pattern] = opts.adaptors;
141
+ const [specifier, path2] = pattern.split("=");
142
+ const doPreload = async (path3, logError = true) => {
143
+ try {
144
+ const result = await preloadAdaptorExports(path3);
145
+ if (result) {
146
+ log.info(`Pre-loaded typedefs for ${specifier} from ${path3}`);
147
+ }
148
+ return result;
149
+ } catch (e) {
150
+ if (logError) {
151
+ log.error(`Failed to load adaptor typedefs from path ${path3}`);
152
+ log.error(e);
191
153
  }
192
- options['add-imports'] = {
193
- adaptor: {
194
- name: stripVersionSpecifier(specifier),
195
- exports,
196
- exportAll: true,
197
- }
198
- };
154
+ }
155
+ };
156
+ const exports = path2 && await doPreload(path2) || opts.modulesHome && await doPreload(`${opts.modulesHome}/${specifier}`, false) || await doPreload(specifier) || [];
157
+ if (exports.length === 0) {
158
+ console.warn(`WARNING: no module exports loaded for ${pattern}`);
159
+ console.log(" automatic imports will be skipped");
199
160
  }
200
- return options;
161
+ options["add-imports"] = {
162
+ adaptor: {
163
+ name: stripVersionSpecifier(specifier),
164
+ exports,
165
+ exportAll: true
166
+ }
167
+ };
168
+ }
169
+ return options;
201
170
  };
202
171
 
203
- var loadState = async (opts, log) => {
204
- log.debug('Load state...');
205
- if (opts.stateStdin) {
206
- try {
207
- const json = JSON.parse(opts.stateStdin);
208
- log.success('Read state from stdin');
209
- log.debug('state:', json);
210
- return json;
211
- }
212
- catch (e) {
213
- log.error("Failed to load state from stdin");
214
- log.error(opts.stateStdin);
215
- log.error(e);
216
- process.exit(1);
217
- }
218
- }
172
+ // src/execute/load-state.ts
173
+ import fs2 from "node:fs/promises";
174
+ var load_state_default = async (opts, log) => {
175
+ log.debug("Load state...");
176
+ if (opts.stateStdin) {
219
177
  try {
220
- const str = await fs.readFile(opts.statePath, 'utf8');
221
- const json = JSON.parse(str);
222
- log.success(`Loaded state from ${opts.statePath}`);
223
- log.debug('state:', json);
224
- return json;
178
+ const json = JSON.parse(opts.stateStdin);
179
+ log.success("Read state from stdin");
180
+ log.debug("state:", json);
181
+ return json;
182
+ } catch (e) {
183
+ log.error("Failed to load state from stdin");
184
+ log.error(opts.stateStdin);
185
+ log.error(e);
186
+ process.exit(1);
225
187
  }
226
- catch (e) {
227
- log.warn(`Error loading state from ${opts.statePath}`);
228
- log.warn(e);
229
- }
230
- log.warn('Using default state { data: {}, configuration: {}');
231
- return {
232
- data: {},
233
- configuration: {}
234
- };
188
+ }
189
+ try {
190
+ const str = await fs2.readFile(opts.statePath, "utf8");
191
+ const json = JSON.parse(str);
192
+ log.success(`Loaded state from ${opts.statePath}`);
193
+ log.debug("state:", json);
194
+ return json;
195
+ } catch (e) {
196
+ log.warn(`Error loading state from ${opts.statePath}`);
197
+ log.warn(e);
198
+ }
199
+ log.warn("Using default state { data: {}, configuration: {}");
200
+ return {
201
+ data: {},
202
+ configuration: {}
203
+ };
235
204
  };
236
205
 
237
- var execute = (code, state, opts) => {
238
- // TODO listen to runtime events and log them
239
- // events appeal because we don't have to pass two loggers into the runtime
240
- // we can just listen to runtime events and do the logging ourselves here
241
- // Then again, maybe that doesn't make sense
242
- // Maybe we have to feed a job logger in?
243
- return run(code, state, {
244
- logger: createLogger(RUNTIME, opts),
245
- jobLogger: createLogger(JOB, opts),
246
- linker: {
247
- modulesHome: opts.modulesHome,
248
- modulePaths: parseAdaptors(opts),
249
- }
250
- });
206
+ // src/execute/execute.ts
207
+ import run from "@openfn/runtime";
208
+ var execute_default = (code, state, opts) => {
209
+ return run(code, state, {
210
+ immutableState: opts.immutable,
211
+ logger: logger_default(RUNTIME, opts),
212
+ jobLogger: logger_default(JOB, opts),
213
+ linker: {
214
+ modulesHome: opts.modulesHome,
215
+ modulePaths: parseAdaptors(opts)
216
+ }
217
+ });
251
218
  };
252
- // TODO we should throw if the adaptor strings are invalid for any reason
253
219
  function parseAdaptors(opts) {
254
- const adaptors = {};
255
- opts.adaptors?.reduce((obj, exp) => {
256
- const [module, path] = exp.split('=');
257
- obj[module] = path;
258
- return obj;
259
- }, adaptors);
260
- return adaptors;
220
+ var _a;
221
+ const adaptors = {};
222
+ (_a = opts.adaptors) == null ? void 0 : _a.reduce((obj, exp) => {
223
+ const [module, path2] = exp.split("=");
224
+ obj[module] = path2;
225
+ return obj;
226
+ }, adaptors);
227
+ return adaptors;
261
228
  }
262
229
 
263
- // Top level command parser
264
- const parse = async (basePath, options, log) => {
265
- // TODO allow a logger to be passed in for test purposes
266
- // I THINK I need this but tbh not sure yet!
267
- const opts = ensureOpts(basePath, options);
268
- const logger = log || createLogger(CLI, opts);
269
- if (opts.test) {
270
- return runTest(opts, logger);
271
- }
272
- assertPath(basePath);
273
- if (opts.compileOnly) {
274
- return runCompile(opts, logger);
275
- }
276
- return runExecute(opts, logger);
230
+ // src/commands.ts
231
+ var parse = async (basePath, options, log) => {
232
+ const opts = ensureOpts(basePath, options);
233
+ const logger = log || logger_default(CLI, opts);
234
+ if (opts.test) {
235
+ return runTest(opts, logger);
236
+ }
237
+ assertPath(basePath);
238
+ if (opts.compileOnly) {
239
+ return runCompile(opts, logger);
240
+ }
241
+ return runExecute(opts, logger);
277
242
  };
278
- // TODO probably this isn't neccessary and we just use cwd?
279
- const assertPath = (basePath) => {
280
- if (!basePath) {
281
- console.error('ERROR: no path provided!');
282
- console.error('\nUsage:');
283
- console.error(' open path/to/job.js');
284
- console.error('\nFor more help do:');
285
- console.error(' openfn --help ');
286
- process.exit(1);
287
- }
243
+ var commands_default = parse;
244
+ var assertPath = (basePath) => {
245
+ if (!basePath) {
246
+ console.error("ERROR: no path provided!");
247
+ console.error("\nUsage:");
248
+ console.error(" open path/to/job");
249
+ console.error("\nFor more help do:");
250
+ console.error(" openfn --help ");
251
+ process.exit(1);
252
+ }
288
253
  };
289
- const runExecute = async (options, logger) => {
290
- const start = new Date().getTime();
291
- const state = await loadState(options, logger);
292
- const code = await compile(options, logger);
293
- const result = await execute(code, state, options);
294
- if (options.outputStdout) {
295
- // TODO Log this even if in silent mode
296
- logger.success(`Result: `);
297
- logger.success(result);
298
- }
299
- else {
300
- logger.success(`Writing output to ${options.outputPath}`);
301
- await fs.writeFile(options.outputPath, JSON.stringify(result, null, 4));
302
- }
303
- const duration = printDuration(new Date().getTime() - start);
304
- logger.success(`Done in ${duration}! ✨`);
254
+ var runExecute = async (options, logger) => {
255
+ const start = new Date().getTime();
256
+ const state = await load_state_default(options, logger);
257
+ const code = await compile_default(options, logger);
258
+ const result = await execute_default(code, state, options);
259
+ if (options.outputStdout) {
260
+ logger.success(`Result: `);
261
+ logger.success(result);
262
+ } else {
263
+ logger.success(`Writing output to ${options.outputPath}`);
264
+ await fs3.writeFile(options.outputPath, JSON.stringify(result, null, 4));
265
+ }
266
+ const duration = printDuration(new Date().getTime() - start);
267
+ logger.success(`Done in ${duration}! \u2728`);
305
268
  };
306
- const runCompile = async (options, logger) => {
307
- const code = await compile(options, logger);
308
- if (options.outputStdout) {
309
- // TODO log this even if in silent mode
310
- logger.success('Compiled code:');
311
- console.log(code);
312
- }
313
- else {
314
- await fs.writeFile(options.outputPath, code);
315
- logger.success(`Compiled to ${options.outputPath}`);
316
- }
269
+ var runCompile = async (options, logger) => {
270
+ const code = await compile_default(options, logger);
271
+ if (options.outputStdout) {
272
+ logger.success("Compiled code:");
273
+ console.log(code);
274
+ } else {
275
+ await fs3.writeFile(options.outputPath, code);
276
+ logger.success(`Compiled to ${options.outputPath}`);
277
+ }
317
278
  };
318
- const runTest = async (options, logger) => {
319
- logger.log('Running test job...');
320
- // This is a bit weird but it'll actually work!
321
- options.jobPath = `const fn = () => state => state * 2; fn()`;
322
- if (!options.stateStdin) {
323
- logger.warn('No state detected: pass -S <number> to provide some state');
324
- options.stateStdin = "21";
325
- }
326
- const silentLogger = createNullLogger();
327
- const state = await loadState(options, silentLogger);
328
- const code = await compile(options, logger);
329
- logger.break();
330
- logger.info('Compiled job:', '\n', code); // TODO there's an ugly intend here
331
- logger.break();
332
- logger.info('Running job...');
333
- const result = await execute(code, state, options);
334
- logger.success(`Result: ${result}`);
335
- return result;
279
+ var runTest = async (options, logger) => {
280
+ logger.log("Running test job...");
281
+ options.jobPath = `const fn = () => state => state * 2; fn()`;
282
+ if (!options.stateStdin) {
283
+ logger.warn("No state detected: pass -S <number> to provide some state");
284
+ options.stateStdin = "21";
285
+ }
286
+ const silentLogger = createNullLogger();
287
+ const state = await load_state_default(options, silentLogger);
288
+ const code = await compile_default(options, logger);
289
+ logger.break();
290
+ logger.info("Compiled job:", "\n", code);
291
+ logger.break();
292
+ logger.info("Running job...");
293
+ const result = await execute_default(code, state, options);
294
+ logger.success(`Result: ${result}`);
295
+ return result;
336
296
  };
337
- // This is disabled for now because
338
- // 1) Resolving paths relative to the install location of the module is tricky
339
- // 2) yargs does a pretty good job of reporting the CLI's version
340
- // export const version = async (options: Opts) => {
341
- // // Note that this should ignore silent
342
- // const logger = options.logger || console;
343
- // const src = await fs.readFile(path.resolve('package.json'), 'utf8')
344
- // const pkg = JSON.parse(src);
345
- // logger.log(`@openfn/cli ${pkg.version}`)
346
- // for (const d in pkg.dependencies) {
347
- // if (d.startsWith('@openfn')) {
348
- // const pkgpath = path.resolve(`node_modules/${d}/package.json`)
349
- // const s = await fs.readFile(pkgpath, 'utf8')
350
- // const p = JSON.parse(s);
351
- // logger.log(` - ${d} ${p.version}`)
352
- // }
353
- // }
354
- // }
355
297
 
356
- // When receiving a message as a child process, we pull out the args and run
357
- process.on('message', ({ init, basePath, opts }) => {
358
- if (init) {
359
- parse(basePath, opts).then(() => {
360
- process.send({ done: true });
361
- });
362
- }
298
+ // src/process/runner.ts
299
+ process.on("message", ({ init, basePath, opts }) => {
300
+ if (init) {
301
+ commands_default(basePath, opts).then(() => {
302
+ process.send({ done: true });
303
+ });
304
+ }
363
305
  });
364
- //# sourceMappingURL=runner.js.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openfn/cli",
3
- "version": "0.0.10",
4
- "description": "",
3
+ "version": "0.0.12",
4
+ "description": "CLI devtools for the openfn toolchain.",
5
5
  "engines": {
6
6
  "node": ">=16",
7
7
  "pnpm": ">=7"
@@ -21,28 +21,24 @@
21
21
  "module": "dist/index.js",
22
22
  "types": "dist/index.d.ts",
23
23
  "keywords": [],
24
- "author": "Joe Clark<jclark@openfn.org>",
24
+ "author": "Open Function Group <admin@openfn.org>",
25
25
  "license": "ISC",
26
26
  "devDependencies": {
27
27
  "@openfn/language-common": "2.0.0-rc3",
28
- "@rollup/plugin-typescript": "^8.3.2",
28
+ "@types/mock-fs": "^4.13.1",
29
29
  "@types/node": "^17.0.45",
30
30
  "@types/yargs": "^17.0.12",
31
31
  "ava": "^4.2.0",
32
32
  "mock-fs": "^5.1.4",
33
- "rimraf": "^3.0.2",
34
- "rollup-plugin-dts": "^4.2.1",
35
- "rollup-plugin-preserve-shebang": "^1.0.1",
36
- "rollup": "^2.72.1",
37
33
  "ts-node": "^10.8.1",
38
34
  "tslib": "^2.4.0",
39
- "tsm": "^2.2.2",
35
+ "tsup": "^6.2.3",
40
36
  "typescript": "^4.7.4"
41
37
  },
42
38
  "dependencies": {
43
- "@openfn/compiler": "^0.0.9",
44
- "@openfn/runtime": "^0.0.8",
45
- "@openfn/logger": "^0.0.3",
39
+ "@openfn/compiler": "^0.0.11",
40
+ "@openfn/runtime": "^0.0.9",
41
+ "@openfn/logger": "^0.0.4",
46
42
  "yargs": "^17.5.1"
47
43
  },
48
44
  "files": [
@@ -52,8 +48,9 @@
52
48
  "scripts": {
53
49
  "test": "pnpm ava",
54
50
  "test:watch": "pnpm ava -w",
55
- "build": "rimraf dist/ .rollup.cache ts.cache && rollup -c",
56
- "build:watch": "pnpm rollup -cw --no-watch.clearScreen",
51
+ "test:types": "pnpm tsc --noEmit --project tsconfig.json",
52
+ "build": "tsup --config ./tsup.config.js",
53
+ "build:watch": "pnpm build --watch",
57
54
  "openfn": "node --no-warnings dist/index.js",
58
55
  "pack": "pnpm pack --pack-destination ../../dist"
59
56
  }
package/dist/cli.d.ts DELETED
@@ -1,26 +0,0 @@
1
- import yargs from 'yargs';
2
- export declare const cmd: yargs.Argv<{
3
- path: unknown;
4
- } & {
5
- test: boolean | undefined;
6
- } & {
7
- "output-path": unknown;
8
- } & {
9
- "output-stdout": boolean | undefined;
10
- } & {
11
- "state-path": unknown;
12
- } & {
13
- "state-stdin": unknown;
14
- } & {
15
- "no-validation": boolean | undefined;
16
- } & {
17
- "compile-only": boolean | undefined;
18
- } & {
19
- "no-compile": boolean | undefined;
20
- } & {
21
- adaptors: (string | number)[] | undefined;
22
- } & {
23
- "trace-linker": boolean | undefined;
24
- } & {
25
- log: (string | number)[] | undefined;
26
- }>;
@@ -1,22 +0,0 @@
1
- import { Logger, LogLevel } from './util/logger';
2
- export declare type Opts = {
3
- adaptors?: string[];
4
- compileOnly?: boolean;
5
- jobPath?: string;
6
- log?: string[];
7
- modulesHome?: string;
8
- noCompile?: boolean;
9
- outputPath?: string;
10
- outputStdout?: boolean;
11
- statePath?: string;
12
- stateStdin?: string;
13
- test?: boolean;
14
- };
15
- export declare type SafeOpts = Required<Omit<Opts, "log">> & {
16
- log: Record<string, LogLevel>;
17
- };
18
- declare const parse: (basePath: string, options: Opts, log?: Logger) => Promise<any>;
19
- export default parse;
20
- export declare const runExecute: (options: SafeOpts, logger: Logger) => Promise<void>;
21
- export declare const runCompile: (options: SafeOpts, logger: Logger) => Promise<void>;
22
- export declare const runTest: (options: SafeOpts, logger: Logger) => Promise<any>;
@@ -1,7 +0,0 @@
1
- import { Logger } from '../util/logger';
2
- import { Options } from '@openfn/compiler';
3
- import type { SafeOpts } from '../commands';
4
- declare const _default: (opts: SafeOpts, log: Logger) => Promise<string>;
5
- export default _default;
6
- export declare const stripVersionSpecifier: (specifier: string) => string;
7
- export declare const loadTransformOptions: (opts: SafeOpts, log: Logger) => Promise<Options>;
@@ -1,3 +0,0 @@
1
- import type { SafeOpts } from '../commands';
2
- declare const _default: (code: string, state: any, opts: SafeOpts) => Promise<any>;
3
- export default _default;
@@ -1,4 +0,0 @@
1
- import type { Logger } from '@openfn/logger';
2
- import type { SafeOpts } from '../commands';
3
- declare const _default: (opts: SafeOpts, log: Logger) => Promise<any>;
4
- export default _default;
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":["../packages/cli/src/process/spawn.ts","../packages/cli/src/cli.ts","../packages/cli/src/index.ts"],"sourcesContent":[null,null,null],"names":[],"mappings":";;;;;;;AAAA,CAAA,CAA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xE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAE,CAAI,CAAA,CAAA,CAAA;CACZ,CAAC;AACD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAC,CAAG,CAAA,CAAA,CAAA,CAAE,SAAS,CAAC,CAAA;;AC7DxB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,IAAI,CAAG,CAAA,CAAA,CAAA,CAAA,CAAG,CAAC,CAAA,CAAA,CAAA,CAAA,CAAK,EAAe,CAAC;AACtC,CAAiB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAE,CAAA,CAAA,CAAA,CAAA,CAAI,CAAC"}
@@ -1,26 +0,0 @@
1
- import yargs from 'yargs';
2
- export declare const cmd: yargs.Argv<{
3
- path: unknown;
4
- } & {
5
- test: boolean | undefined;
6
- } & {
7
- "output-path": unknown;
8
- } & {
9
- "output-stdout": boolean | undefined;
10
- } & {
11
- "state-path": unknown;
12
- } & {
13
- "state-stdin": unknown;
14
- } & {
15
- "no-validation": boolean | undefined;
16
- } & {
17
- "compile-only": boolean | undefined;
18
- } & {
19
- "no-compile": boolean | undefined;
20
- } & {
21
- adaptors: (string | number)[] | undefined;
22
- } & {
23
- "trace-linker": boolean | undefined;
24
- } & {
25
- log: (string | number)[] | undefined;
26
- }>;
@@ -1,22 +0,0 @@
1
- import { Logger, LogLevel } from './util/logger';
2
- export declare type Opts = {
3
- adaptors?: string[];
4
- compileOnly?: boolean;
5
- jobPath?: string;
6
- log?: string[];
7
- modulesHome?: string;
8
- noCompile?: boolean;
9
- outputPath?: string;
10
- outputStdout?: boolean;
11
- statePath?: string;
12
- stateStdin?: string;
13
- test?: boolean;
14
- };
15
- export declare type SafeOpts = Required<Omit<Opts, "log">> & {
16
- log: Record<string, LogLevel>;
17
- };
18
- declare const parse: (basePath: string, options: Opts, log?: Logger) => Promise<any>;
19
- export default parse;
20
- export declare const runExecute: (options: SafeOpts, logger: Logger) => Promise<void>;
21
- export declare const runCompile: (options: SafeOpts, logger: Logger) => Promise<void>;
22
- export declare const runTest: (options: SafeOpts, logger: Logger) => Promise<any>;
@@ -1,7 +0,0 @@
1
- import { Logger } from '../util/logger';
2
- import { Options } from '@openfn/compiler';
3
- import type { SafeOpts } from '../commands';
4
- declare const _default: (opts: SafeOpts, log: Logger) => Promise<string>;
5
- export default _default;
6
- export declare const stripVersionSpecifier: (specifier: string) => string;
7
- export declare const loadTransformOptions: (opts: SafeOpts, log: Logger) => Promise<Options>;
@@ -1,3 +0,0 @@
1
- import type { SafeOpts } from '../commands';
2
- declare const _default: (code: string, state: any, opts: SafeOpts) => Promise<any>;
3
- export default _default;
@@ -1,4 +0,0 @@
1
- import type { Logger } from '@openfn/logger';
2
- import type { SafeOpts } from '../commands';
3
- declare const _default: (opts: SafeOpts, log: Logger) => Promise<any>;
4
- export default _default;
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- import type { Opts } from '../commands';
2
- export default function (basePath: string, opts: Opts): void;
@@ -1 +0,0 @@
1
- {"version":3,"file":"runner.js","sources":["../../packages/cli/src/util/logger.ts","../../packages/cli/src/util/ensure-opts.ts","../../packages/cli/src/compile/compile.ts","../../packages/cli/src/execute/load-state.ts","../../packages/cli/src/execute/execute.ts","../../packages/cli/src/commands.ts","../../packages/cli/src/process/runner.ts"],"sourcesContent":[null,null,null,null,null,null,null],"names":["compile"],"mappings":";;;;;;AAAA;AAKA;AACO,MAAM,GAAG,GAAG,KAAK,CAAC;AAClB,MAAM,QAAQ,GAAG,UAAU,CAAC;AAC5B,MAAM,OAAO,GAAG,SAAS,CAAC;AAC1B,MAAM,GAAG,GAAG,KAAK,CAAC;AAEzB,MAAM,UAAU,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AC,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAe,KAAI;AAC9D,IAAA,IAAI,IAAI,EAAE;QACR,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,MAAK;YAC9B,OAAO,CAAC,IAAK,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;AAChC,SAAC,CAAC,CAAA;AACH,KAAA;AACH,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- import type { Opts } from '../commands';
2
- export default function (basePath: string, opts: Opts): void;
@@ -1,8 +0,0 @@
1
- import { Opts, SafeOpts } from '../commands';
2
- export declare const defaultLoggerOptions: {
3
- default: "default";
4
- job: "debug";
5
- };
6
- export declare const ERROR_MESSAGE_LOG_LEVEL = "Unknown log level. Valid levels are none, debug, info and default.";
7
- export declare const ERROR_MESSAGE_LOG_COMPONENT = "Unknown log component. Valid components are cli, compiler, runtime and job.";
8
- export default function ensureOpts(basePath: string | undefined, opts: Opts): SafeOpts;
@@ -1,11 +0,0 @@
1
- import { printDuration } from '@openfn/logger';
2
- export type { Logger, LogOptions, LogLevel } from '@openfn/logger';
3
- import type { SafeOpts } from '../commands';
4
- export declare const CLI = "cli";
5
- export declare const COMPILER = "compiler";
6
- export declare const RUNTIME = "runtime";
7
- export declare const JOB = "job";
8
- export declare const createLogger: (name: string | undefined, options: Pick<SafeOpts, 'log'>) => import("@openfn/logger").Logger;
9
- export default createLogger;
10
- export declare const createNullLogger: () => import("@openfn/logger").Logger;
11
- export { printDuration };
@@ -1,8 +0,0 @@
1
- import { Opts, SafeOpts } from '../commands';
2
- export declare const defaultLoggerOptions: {
3
- default: "default";
4
- job: "debug";
5
- };
6
- export declare const ERROR_MESSAGE_LOG_LEVEL = "Unknown log level. Valid levels are none, debug, info and default.";
7
- export declare const ERROR_MESSAGE_LOG_COMPONENT = "Unknown log component. Valid components are cli, compiler, runtime and job.";
8
- export default function ensureOpts(basePath: string | undefined, opts: Opts): SafeOpts;
@@ -1,11 +0,0 @@
1
- import { printDuration } from '@openfn/logger';
2
- export type { Logger, LogOptions, LogLevel } from '@openfn/logger';
3
- import type { SafeOpts } from '../commands';
4
- export declare const CLI = "cli";
5
- export declare const COMPILER = "compiler";
6
- export declare const RUNTIME = "runtime";
7
- export declare const JOB = "job";
8
- export declare const createLogger: (name: string | undefined, options: Pick<SafeOpts, 'log'>) => import("@openfn/logger").Logger;
9
- export default createLogger;
10
- export declare const createNullLogger: () => import("@openfn/logger").Logger;
11
- export { printDuration };