@openfn/cli 1.2.5 → 1.3.0
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/dist/index.js +82 -31
- package/dist/process/runner.js +234 -92
- package/package.json +6 -4
package/dist/index.js
CHANGED
|
@@ -171,6 +171,29 @@ var autoinstall = {
|
|
|
171
171
|
default: true
|
|
172
172
|
}
|
|
173
173
|
};
|
|
174
|
+
var apolloUrl = {
|
|
175
|
+
name: "apollo-url",
|
|
176
|
+
yargs: {
|
|
177
|
+
alias: ["url"],
|
|
178
|
+
description: "Auto-install the language adaptor(s)"
|
|
179
|
+
},
|
|
180
|
+
// map local, staging, prod to apollo-url
|
|
181
|
+
ensure: (opts2) => {
|
|
182
|
+
let didLoadShortcut = false;
|
|
183
|
+
["local", "staging", "prod", "production"].forEach((shortcut) => {
|
|
184
|
+
if (shortcut in opts2) {
|
|
185
|
+
if (didLoadShortcut) {
|
|
186
|
+
throw new Error(
|
|
187
|
+
"Invalid apollo URL - please only enter one of local, staging or prod"
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
opts2.apolloUrl = shortcut;
|
|
191
|
+
delete opts2[shortcut];
|
|
192
|
+
didLoadShortcut = true;
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
};
|
|
174
197
|
var cacheSteps = {
|
|
175
198
|
name: "cache-steps",
|
|
176
199
|
yargs: {
|
|
@@ -319,7 +342,7 @@ var outputPath = {
|
|
|
319
342
|
description: "Path to the output file"
|
|
320
343
|
},
|
|
321
344
|
ensure: (opts2) => {
|
|
322
|
-
if (opts2.command
|
|
345
|
+
if (/^(compile|apollo)$/.test(opts2.command)) {
|
|
323
346
|
if (opts2.outputPath) {
|
|
324
347
|
delete opts2.outputStdout;
|
|
325
348
|
}
|
|
@@ -476,8 +499,36 @@ var override = (command, yargs2) => {
|
|
|
476
499
|
};
|
|
477
500
|
};
|
|
478
501
|
|
|
479
|
-
// src/
|
|
502
|
+
// src/apollo/util.ts
|
|
503
|
+
var STAGING_URL = "http://34.95.82.109";
|
|
504
|
+
|
|
505
|
+
// src/apollo/command.ts
|
|
480
506
|
var options = [
|
|
507
|
+
apolloUrl,
|
|
508
|
+
stateStdin,
|
|
509
|
+
log,
|
|
510
|
+
logJson,
|
|
511
|
+
outputPath,
|
|
512
|
+
override(outputStdout, {
|
|
513
|
+
default: true
|
|
514
|
+
})
|
|
515
|
+
];
|
|
516
|
+
var desc = `Call services on the openfn apollo server. Set the local server location with OPENFN_APOLLO_SERVER. The staging server is set to ${STAGING_URL}`;
|
|
517
|
+
var command_default = {
|
|
518
|
+
command: "apollo <service> [payload]",
|
|
519
|
+
desc,
|
|
520
|
+
handler: ensure("apollo", options),
|
|
521
|
+
builder: (yargs2) => build(options, yargs2).example(
|
|
522
|
+
"apollo echo path/to/json",
|
|
523
|
+
"Call the echo service, which returns json back"
|
|
524
|
+
).example(
|
|
525
|
+
"apollo adaptor_gen cat-facts.example.json --local",
|
|
526
|
+
"Generate an adaptor template against a local server"
|
|
527
|
+
)
|
|
528
|
+
};
|
|
529
|
+
|
|
530
|
+
// src/compile/command.ts
|
|
531
|
+
var options2 = [
|
|
481
532
|
expandAdaptors,
|
|
482
533
|
adaptors,
|
|
483
534
|
ignoreImports,
|
|
@@ -494,8 +545,8 @@ var options = [
|
|
|
494
545
|
var compileCommand = {
|
|
495
546
|
command: "compile [path]",
|
|
496
547
|
describe: "Compile an openfn job or workflow and print or save the resulting JavaScript.",
|
|
497
|
-
handler: ensure("compile",
|
|
498
|
-
builder: (yargs2) => build(
|
|
548
|
+
handler: ensure("compile", options2),
|
|
549
|
+
builder: (yargs2) => build(options2, yargs2).positional("path", {
|
|
499
550
|
describe: "The path to load the job or workflow from (a .js or .json file or a dir containing a job.js file)",
|
|
500
551
|
demandOption: true
|
|
501
552
|
}).example(
|
|
@@ -506,10 +557,10 @@ var compileCommand = {
|
|
|
506
557
|
"Compiles the workflow at foo/work.json and prints the result to -o foo/workflow-compiled.json"
|
|
507
558
|
)
|
|
508
559
|
};
|
|
509
|
-
var
|
|
560
|
+
var command_default2 = compileCommand;
|
|
510
561
|
|
|
511
562
|
// src/deploy/command.ts
|
|
512
|
-
var
|
|
563
|
+
var options3 = [
|
|
513
564
|
configPath,
|
|
514
565
|
confirm,
|
|
515
566
|
describe,
|
|
@@ -521,10 +572,10 @@ var options2 = [
|
|
|
521
572
|
var deployCommand = {
|
|
522
573
|
command: "deploy",
|
|
523
574
|
describe: "Deploy a project's config to a remote Lightning instance",
|
|
524
|
-
handler: ensure("deploy",
|
|
525
|
-
builder: (yargs2) => build(
|
|
575
|
+
handler: ensure("deploy", options3),
|
|
576
|
+
builder: (yargs2) => build(options3, yargs2)
|
|
526
577
|
};
|
|
527
|
-
var
|
|
578
|
+
var command_default3 = deployCommand;
|
|
528
579
|
|
|
529
580
|
// src/docgen/command.ts
|
|
530
581
|
var docgenCommand = {
|
|
@@ -537,23 +588,23 @@ var docgenCommand = {
|
|
|
537
588
|
},
|
|
538
589
|
builder: (yargs2) => yargs2.example("docgen @openfn/language-common@1.7.5", "")
|
|
539
590
|
};
|
|
540
|
-
var
|
|
591
|
+
var command_default4 = docgenCommand;
|
|
541
592
|
|
|
542
593
|
// src/docs/command.ts
|
|
543
|
-
var
|
|
594
|
+
var options4 = [log, logJson, repoDir];
|
|
544
595
|
var docsCommand = {
|
|
545
596
|
command: "docs <adaptor> [operation]",
|
|
546
597
|
describe: "Print help for an adaptor function. You can use short-hand for adaptor names (ie, common instead of @openfn/language-common)",
|
|
547
|
-
handler: ensure("docs",
|
|
548
|
-
builder: (yargs2) => build(
|
|
598
|
+
handler: ensure("docs", options4),
|
|
599
|
+
builder: (yargs2) => build(options4, yargs2).example(
|
|
549
600
|
"docs common fn",
|
|
550
601
|
"Print help for the common fn operation"
|
|
551
602
|
)
|
|
552
603
|
};
|
|
553
|
-
var
|
|
604
|
+
var command_default5 = docsCommand;
|
|
554
605
|
|
|
555
606
|
// src/execute/command.ts
|
|
556
|
-
var
|
|
607
|
+
var options5 = [
|
|
557
608
|
expandAdaptors,
|
|
558
609
|
adaptors,
|
|
559
610
|
autoinstall,
|
|
@@ -585,8 +636,8 @@ Execute will run a expression/workflow at the path and write the output state to
|
|
|
585
636
|
|
|
586
637
|
Remember to include the adaptor name with -a. Auto install adaptors with the -i flag.`,
|
|
587
638
|
aliases: ["$0"],
|
|
588
|
-
handler: ensure("execute",
|
|
589
|
-
builder: (yargs2) => build(
|
|
639
|
+
handler: ensure("execute", options5),
|
|
640
|
+
builder: (yargs2) => build(options5, yargs2).positional("path", {
|
|
590
641
|
describe: "The path to load the job or workflow from (a .js or .json file or a dir containing a job.js file)",
|
|
591
642
|
demandOption: true
|
|
592
643
|
}).example(
|
|
@@ -603,10 +654,10 @@ Remember to include the adaptor name with -a. Auto install adaptors with the -i
|
|
|
603
654
|
"Compile the expression at job.js with the http adaptor and print the code to stdout"
|
|
604
655
|
)
|
|
605
656
|
};
|
|
606
|
-
var
|
|
657
|
+
var command_default6 = executeCommand;
|
|
607
658
|
|
|
608
659
|
// src/metadata/command.ts
|
|
609
|
-
var
|
|
660
|
+
var options6 = [
|
|
610
661
|
expandAdaptors,
|
|
611
662
|
adaptors,
|
|
612
663
|
force,
|
|
@@ -617,31 +668,31 @@ var options5 = [
|
|
|
617
668
|
stateStdin,
|
|
618
669
|
useAdaptorsMonorepo
|
|
619
670
|
];
|
|
620
|
-
var
|
|
671
|
+
var command_default7 = {
|
|
621
672
|
command: "metadata",
|
|
622
673
|
describe: "Generate metadata for an adaptor config",
|
|
623
|
-
handler: ensure("metadata",
|
|
624
|
-
builder: (yargs2) => build(
|
|
674
|
+
handler: ensure("metadata", options6),
|
|
675
|
+
builder: (yargs2) => build(options6, yargs2).example(
|
|
625
676
|
"metadata -a salesforce -s tmp/state.json",
|
|
626
677
|
"Generate salesforce metadata from config in state.json"
|
|
627
678
|
)
|
|
628
679
|
};
|
|
629
680
|
|
|
630
681
|
// src/pull/command.ts
|
|
631
|
-
var
|
|
682
|
+
var options7 = [statePath, projectPath, configPath, log, logJson];
|
|
632
683
|
var pullCommand = {
|
|
633
684
|
command: "pull [projectId]",
|
|
634
685
|
describe: "Pull a project's state and spec from a Lightning Instance to the local directory",
|
|
635
|
-
builder: (yargs2) => build(
|
|
686
|
+
builder: (yargs2) => build(options7, yargs2).positional("projectId", {
|
|
636
687
|
describe: "The id of the project that should be pulled shouled be a UUID",
|
|
637
688
|
demandOption: true
|
|
638
689
|
}).example(
|
|
639
690
|
"pull 57862287-23e6-4650-8d79-e1dd88b24b1c",
|
|
640
691
|
"Pull an updated copy of a the above spec and state from a Lightning Instance"
|
|
641
692
|
),
|
|
642
|
-
handler: ensure("pull",
|
|
693
|
+
handler: ensure("pull", options7)
|
|
643
694
|
};
|
|
644
|
-
var
|
|
695
|
+
var command_default8 = pullCommand;
|
|
645
696
|
|
|
646
697
|
// src/repo/command.ts
|
|
647
698
|
var repo = {
|
|
@@ -702,17 +753,17 @@ var list = {
|
|
|
702
753
|
};
|
|
703
754
|
|
|
704
755
|
// src/test/command.ts
|
|
705
|
-
var
|
|
706
|
-
var
|
|
756
|
+
var options8 = [stateStdin, log, logJson];
|
|
757
|
+
var command_default9 = {
|
|
707
758
|
command: "test",
|
|
708
759
|
desc: "Compiles and runs a test job, printing the result to stdout",
|
|
709
|
-
handler: ensure("test",
|
|
710
|
-
builder: (yargs2) => build(
|
|
760
|
+
handler: ensure("test", options8),
|
|
761
|
+
builder: (yargs2) => build(options8, yargs2).example("test", "Run the test script")
|
|
711
762
|
};
|
|
712
763
|
|
|
713
764
|
// src/cli.ts
|
|
714
765
|
var y = yargs(hideBin(process.argv));
|
|
715
|
-
var cmd = y.command(
|
|
766
|
+
var cmd = y.command(command_default6).command(command_default2).command(command_default3).command(install).command(repo).command(command_default9).command(command_default5).command(command_default).command(command_default7).command(command_default4).command(command_default8).command({
|
|
716
767
|
command: "version",
|
|
717
768
|
describe: "Show the currently installed version of the CLI, compiler and runtime.",
|
|
718
769
|
handler: (argv) => {
|
package/dist/process/runner.js
CHANGED
|
@@ -1,3 +1,144 @@
|
|
|
1
|
+
// src/apollo/handler.ts
|
|
2
|
+
import { WebSocket } from "ws";
|
|
3
|
+
import { readFile, writeFile, mkdir } from "node:fs/promises";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
import createLogger from "@openfn/logger";
|
|
6
|
+
|
|
7
|
+
// src/apollo/util.ts
|
|
8
|
+
var PRODUCTION_URL = "https://apollo.openfn.org";
|
|
9
|
+
var STAGING_URL = "http://34.95.82.109";
|
|
10
|
+
var LOCAL_URL = "http://localhost:3000";
|
|
11
|
+
var urlMap = {
|
|
12
|
+
["prod"]: PRODUCTION_URL,
|
|
13
|
+
["production"]: PRODUCTION_URL,
|
|
14
|
+
["staging"]: STAGING_URL,
|
|
15
|
+
["local"]: LOCAL_URL
|
|
16
|
+
};
|
|
17
|
+
var DEFAULT_ENV = "staging";
|
|
18
|
+
var getURL = (options) => {
|
|
19
|
+
if (options.apolloUrl) {
|
|
20
|
+
if (options.apolloUrl in urlMap) {
|
|
21
|
+
return urlMap[options.apolloUrl];
|
|
22
|
+
}
|
|
23
|
+
if (options.apolloUrl.startsWith("http")) {
|
|
24
|
+
return options.apolloUrl;
|
|
25
|
+
}
|
|
26
|
+
throw new Error(`Unrecognised apollo URL`);
|
|
27
|
+
}
|
|
28
|
+
const userDefault = process.env.OPENFN_APOLLO_DEFAULT_ENV || DEFAULT_ENV;
|
|
29
|
+
if (!/^(staging|prod|production|local|http*)$/.test(userDefault)) {
|
|
30
|
+
throw new Error(`Unrecognised apollo URL loaded from env: ${userDefault}`);
|
|
31
|
+
}
|
|
32
|
+
return urlMap[userDefault || "staging"];
|
|
33
|
+
};
|
|
34
|
+
var outputFiles = (files, logger) => {
|
|
35
|
+
logger.print();
|
|
36
|
+
for (const k in files) {
|
|
37
|
+
const line = new Array(k.length + 1).fill("-").join("");
|
|
38
|
+
logger.print(line);
|
|
39
|
+
logger.print(`${k}`);
|
|
40
|
+
logger.print(line);
|
|
41
|
+
logger.print();
|
|
42
|
+
logger.print(files[k]);
|
|
43
|
+
logger.print();
|
|
44
|
+
logger.print();
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
// src/apollo/handler.ts
|
|
49
|
+
var apolloHandler = async (options, logger) => {
|
|
50
|
+
logger.always(`Calling Apollo service: ${options.service}`);
|
|
51
|
+
const json = await loadPayload(logger, options.payload);
|
|
52
|
+
const url2 = getURL(options);
|
|
53
|
+
logger.success(`Using apollo server at`, url2);
|
|
54
|
+
const result = await callApollo(url2, options.service, json, logger);
|
|
55
|
+
if (result) {
|
|
56
|
+
await serializeOutput(options, result, logger);
|
|
57
|
+
} else {
|
|
58
|
+
logger.warn("No output returned from Apollo");
|
|
59
|
+
}
|
|
60
|
+
logger.success("Done!");
|
|
61
|
+
};
|
|
62
|
+
var write = async (basePath, filePath, content, logger) => {
|
|
63
|
+
const ext = path.extname(basePath);
|
|
64
|
+
let dir;
|
|
65
|
+
if (ext) {
|
|
66
|
+
dir = path.dirname(path.resolve(basePath));
|
|
67
|
+
} else {
|
|
68
|
+
dir = basePath;
|
|
69
|
+
}
|
|
70
|
+
await mkdir(dir, { recursive: true });
|
|
71
|
+
console.log(content);
|
|
72
|
+
const dest = path.resolve(basePath, filePath);
|
|
73
|
+
await writeFile(dest, content);
|
|
74
|
+
logger.success(`Wrote content to ${dest}`);
|
|
75
|
+
};
|
|
76
|
+
var serializeOutput = async (options, result, logger) => {
|
|
77
|
+
if (options.outputPath) {
|
|
78
|
+
if (result.files && !options.outputPath.endsWith(".json")) {
|
|
79
|
+
for (const p in result.files) {
|
|
80
|
+
await write(options.outputPath, p, result.files[p], logger);
|
|
81
|
+
}
|
|
82
|
+
} else {
|
|
83
|
+
await write(
|
|
84
|
+
options.outputPath,
|
|
85
|
+
"",
|
|
86
|
+
JSON.stringify(result, null, 2),
|
|
87
|
+
logger
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
logger.success("Result:");
|
|
93
|
+
if (result.files) {
|
|
94
|
+
outputFiles(result.files, logger);
|
|
95
|
+
} else {
|
|
96
|
+
logger.always(JSON.stringify(result, void 0, 2));
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
var callApollo = async (apolloBaseUrl, serviceName, payload, logger) => {
|
|
100
|
+
return new Promise((resolve) => {
|
|
101
|
+
const apolloLogger = createLogger("APO", { level: "debug" });
|
|
102
|
+
const url2 = `${apolloBaseUrl.replace(
|
|
103
|
+
/^http/,
|
|
104
|
+
"ws"
|
|
105
|
+
)}/services/${serviceName}`;
|
|
106
|
+
logger.always("Calling apollo: ", url2);
|
|
107
|
+
const socket = new WebSocket(url2);
|
|
108
|
+
socket.addEventListener("message", ({ data }) => {
|
|
109
|
+
const evt = JSON.parse(data);
|
|
110
|
+
if (evt.event === "complete") {
|
|
111
|
+
logger.debug("Apollo responded with: ", evt.data);
|
|
112
|
+
resolve(evt.data);
|
|
113
|
+
} else if (evt.event === "log") {
|
|
114
|
+
apolloLogger.info(evt.data);
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
socket.addEventListener("open", () => {
|
|
118
|
+
socket.send(
|
|
119
|
+
JSON.stringify({
|
|
120
|
+
event: "start",
|
|
121
|
+
data: payload
|
|
122
|
+
})
|
|
123
|
+
);
|
|
124
|
+
});
|
|
125
|
+
});
|
|
126
|
+
};
|
|
127
|
+
var loadPayload = async (logger, path9) => {
|
|
128
|
+
if (!path9) {
|
|
129
|
+
logger.warn("No JSON payload provided");
|
|
130
|
+
logger.warn("Most apollo services require JSON to be uploaded");
|
|
131
|
+
return {};
|
|
132
|
+
}
|
|
133
|
+
if (path9.endsWith(".json")) {
|
|
134
|
+
const str = await readFile(path9, "utf8");
|
|
135
|
+
const json = JSON.parse(str);
|
|
136
|
+
logger.debug("Loaded JSON payload");
|
|
137
|
+
return json;
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
var handler_default = apolloHandler;
|
|
141
|
+
|
|
1
142
|
// src/execute/execute.ts
|
|
2
143
|
import run, { NOTIFY_JOB_COMPLETE, getNameAndVersion } from "@openfn/runtime";
|
|
3
144
|
|
|
@@ -14,7 +155,7 @@ var namespaces = {
|
|
|
14
155
|
[COMPILER]: "CMP",
|
|
15
156
|
[JOB]: "JOB"
|
|
16
157
|
};
|
|
17
|
-
var
|
|
158
|
+
var createLogger2 = (name = "", options) => {
|
|
18
159
|
const logOptions = options.log || {};
|
|
19
160
|
let json = false;
|
|
20
161
|
let level = logOptions[name] || logOptions.default || "default";
|
|
@@ -28,25 +169,25 @@ var createLogger = (name = "", options) => {
|
|
|
28
169
|
...logOptions
|
|
29
170
|
});
|
|
30
171
|
};
|
|
31
|
-
var logger_default =
|
|
32
|
-
var createNullLogger = () =>
|
|
172
|
+
var logger_default = createLogger2;
|
|
173
|
+
var createNullLogger = () => createLogger2(void 0, { log: { default: "none" } });
|
|
33
174
|
|
|
34
175
|
// src/util/cache.ts
|
|
35
176
|
import fs from "node:fs";
|
|
36
|
-
import
|
|
177
|
+
import path2 from "node:path";
|
|
37
178
|
import { rmdir } from "node:fs/promises";
|
|
38
179
|
var getCachePath = async (plan, options, stepId) => {
|
|
39
180
|
const { baseDir } = options;
|
|
40
181
|
const { name } = plan.workflow;
|
|
41
182
|
const basePath = `${baseDir}/.cli-cache/${name}`;
|
|
42
183
|
if (stepId) {
|
|
43
|
-
return
|
|
184
|
+
return path2.resolve(`${basePath}/${stepId.replace(/ /, "-")}.json`);
|
|
44
185
|
}
|
|
45
|
-
return
|
|
186
|
+
return path2.resolve(basePath);
|
|
46
187
|
};
|
|
47
188
|
var ensureGitIgnore = (options) => {
|
|
48
189
|
if (!options._hasGitIgnore) {
|
|
49
|
-
const ignorePath =
|
|
190
|
+
const ignorePath = path2.resolve(
|
|
50
191
|
options.baseDir,
|
|
51
192
|
".cli-cache",
|
|
52
193
|
".gitignore"
|
|
@@ -62,7 +203,7 @@ var ensureGitIgnore = (options) => {
|
|
|
62
203
|
var saveToCache = async (plan, stepId, output, options, logger) => {
|
|
63
204
|
if (options.cacheSteps) {
|
|
64
205
|
const cachePath = await getCachePath(plan, options, stepId);
|
|
65
|
-
fs.mkdirSync(
|
|
206
|
+
fs.mkdirSync(path2.dirname(cachePath), { recursive: true });
|
|
66
207
|
ensureGitIgnore(options);
|
|
67
208
|
logger.info(`Writing ${stepId} output to ${cachePath}`);
|
|
68
209
|
fs.writeFileSync(cachePath, JSON.stringify(output));
|
|
@@ -112,13 +253,13 @@ var execute_default = async (plan, input, opts, logger) => {
|
|
|
112
253
|
};
|
|
113
254
|
function parseAdaptors(plan) {
|
|
114
255
|
const extractInfo = (specifier) => {
|
|
115
|
-
const [module,
|
|
256
|
+
const [module, path9] = specifier.split("=");
|
|
116
257
|
const { name, version } = getNameAndVersion(module);
|
|
117
258
|
const info = {
|
|
118
259
|
name
|
|
119
260
|
};
|
|
120
|
-
if (
|
|
121
|
-
info.path =
|
|
261
|
+
if (path9) {
|
|
262
|
+
info.path = path9;
|
|
122
263
|
}
|
|
123
264
|
if (version) {
|
|
124
265
|
info.version = version;
|
|
@@ -137,8 +278,8 @@ function parseAdaptors(plan) {
|
|
|
137
278
|
}
|
|
138
279
|
|
|
139
280
|
// src/execute/serialize-output.ts
|
|
140
|
-
import { writeFile } from "node:fs/promises";
|
|
141
|
-
var
|
|
281
|
+
import { writeFile as writeFile2 } from "node:fs/promises";
|
|
282
|
+
var serializeOutput2 = async (options, result, logger) => {
|
|
142
283
|
let output = result;
|
|
143
284
|
if (output && (output.configuration || output.data)) {
|
|
144
285
|
const { configuration, ...rest } = result;
|
|
@@ -154,12 +295,12 @@ var serializeOutput = async (options, result, logger) => {
|
|
|
154
295
|
logger.always(output);
|
|
155
296
|
} else if (options.outputPath) {
|
|
156
297
|
logger.debug(`Writing output to ${options.outputPath}`);
|
|
157
|
-
await
|
|
298
|
+
await writeFile2(options.outputPath, output);
|
|
158
299
|
logger.success(`State written to ${options.outputPath}`);
|
|
159
300
|
}
|
|
160
301
|
return output;
|
|
161
302
|
};
|
|
162
|
-
var serialize_output_default =
|
|
303
|
+
var serialize_output_default = serializeOutput2;
|
|
163
304
|
|
|
164
305
|
// src/execute/get-autoinstall-targets.ts
|
|
165
306
|
var getAutoinstallTargets = (plan) => {
|
|
@@ -324,10 +465,10 @@ var stripVersionSpecifier = (specifier) => {
|
|
|
324
465
|
return specifier;
|
|
325
466
|
};
|
|
326
467
|
var resolveSpecifierPath = async (pattern, repoDir, log) => {
|
|
327
|
-
const [specifier,
|
|
328
|
-
if (
|
|
329
|
-
log.debug(`Resolved ${specifier} to path: ${
|
|
330
|
-
return
|
|
468
|
+
const [specifier, path9] = pattern.split("=");
|
|
469
|
+
if (path9) {
|
|
470
|
+
log.debug(`Resolved ${specifier} to path: ${path9}`);
|
|
471
|
+
return path9;
|
|
331
472
|
}
|
|
332
473
|
const repoPath = await getModulePath(specifier, repoDir, log);
|
|
333
474
|
if (repoPath) {
|
|
@@ -344,16 +485,16 @@ var loadTransformOptions = async (opts, log) => {
|
|
|
344
485
|
const [pattern] = opts.adaptors;
|
|
345
486
|
const [specifier] = pattern.split("=");
|
|
346
487
|
log.debug(`Trying to preload types for ${specifier}`);
|
|
347
|
-
const
|
|
348
|
-
if (
|
|
488
|
+
const path9 = await resolveSpecifierPath(pattern, opts.repoDir, log);
|
|
489
|
+
if (path9) {
|
|
349
490
|
try {
|
|
350
491
|
exports = await preloadAdaptorExports(
|
|
351
|
-
|
|
492
|
+
path9,
|
|
352
493
|
opts.useAdaptorsMonorepo,
|
|
353
494
|
log
|
|
354
495
|
);
|
|
355
496
|
} catch (e) {
|
|
356
|
-
log.error(`Failed to load adaptor typedefs from path ${
|
|
497
|
+
log.error(`Failed to load adaptor typedefs from path ${path9}`);
|
|
357
498
|
log.error(e);
|
|
358
499
|
}
|
|
359
500
|
}
|
|
@@ -489,7 +630,7 @@ var validate_adaptors_default = validateAdaptors;
|
|
|
489
630
|
|
|
490
631
|
// src/util/load-plan.ts
|
|
491
632
|
import fs3 from "node:fs/promises";
|
|
492
|
-
import
|
|
633
|
+
import path4 from "node:path";
|
|
493
634
|
import { isPath } from "@openfn/compiler";
|
|
494
635
|
|
|
495
636
|
// src/util/expand-adaptors.ts
|
|
@@ -518,13 +659,13 @@ var expand_adaptors_default = (input) => {
|
|
|
518
659
|
};
|
|
519
660
|
|
|
520
661
|
// src/util/map-adaptors-to-monorepo.ts
|
|
521
|
-
import { readFile } from "node:fs/promises";
|
|
522
|
-
import
|
|
662
|
+
import { readFile as readFile2 } from "node:fs/promises";
|
|
663
|
+
import path3 from "node:path";
|
|
523
664
|
import assert from "node:assert";
|
|
524
665
|
import { getNameAndVersion as getNameAndVersion2 } from "@openfn/runtime";
|
|
525
666
|
var validateMonoRepo = async (repoPath, log) => {
|
|
526
667
|
try {
|
|
527
|
-
const raw = await
|
|
668
|
+
const raw = await readFile2(`${repoPath}/package.json`, "utf8");
|
|
528
669
|
const pkg = JSON.parse(raw);
|
|
529
670
|
assert(pkg.name === "adaptors");
|
|
530
671
|
} catch (e) {
|
|
@@ -543,7 +684,7 @@ var updatePath = (adaptor, repoPath, log) => {
|
|
|
543
684
|
);
|
|
544
685
|
}
|
|
545
686
|
const shortName = name.replace("@openfn/language-", "");
|
|
546
|
-
const abspath =
|
|
687
|
+
const abspath = path3.resolve(repoPath, "packages", shortName);
|
|
547
688
|
log.info(`Mapped adaptor ${name} to monorepo: ${abspath}`);
|
|
548
689
|
return `${name}=${abspath}`;
|
|
549
690
|
};
|
|
@@ -574,10 +715,10 @@ var loadPlan = async (options, logger) => {
|
|
|
574
715
|
}
|
|
575
716
|
const jsonPath = planPath || workflowPath;
|
|
576
717
|
if (!options.baseDir) {
|
|
577
|
-
options.baseDir =
|
|
718
|
+
options.baseDir = path4.dirname(jsonPath);
|
|
578
719
|
}
|
|
579
720
|
const json = await loadJson(jsonPath, logger);
|
|
580
|
-
const defaultName =
|
|
721
|
+
const defaultName = path4.parse(jsonPath).name;
|
|
581
722
|
if (json.workflow) {
|
|
582
723
|
return loadXPlan(json, options, logger, defaultName);
|
|
583
724
|
} else {
|
|
@@ -623,7 +764,7 @@ var loadExpression = async (options, logger) => {
|
|
|
623
764
|
logger.debug(`Loading expression from ${expressionPath}`);
|
|
624
765
|
try {
|
|
625
766
|
const expression = await fs3.readFile(expressionPath, "utf8");
|
|
626
|
-
const name =
|
|
767
|
+
const name = path4.parse(expressionPath).name;
|
|
627
768
|
const step = { expression };
|
|
628
769
|
if (options.adaptors) {
|
|
629
770
|
const [adaptor] = options.adaptors;
|
|
@@ -670,7 +811,7 @@ var loadOldWorkflow = async (workflow, options, logger, defaultName = "") => {
|
|
|
670
811
|
};
|
|
671
812
|
var fetchFile = async (jobId, rootDir = "", filePath, log) => {
|
|
672
813
|
try {
|
|
673
|
-
const fullPath = filePath.startsWith("~") ? filePath :
|
|
814
|
+
const fullPath = filePath.startsWith("~") ? filePath : path4.resolve(rootDir, filePath);
|
|
674
815
|
const result = await fs3.readFile(fullPath, "utf8");
|
|
675
816
|
log.debug("Loaded file", fullPath);
|
|
676
817
|
return result;
|
|
@@ -733,8 +874,8 @@ var loadXPlan = async (plan, options, logger, defaultName = "") => {
|
|
|
733
874
|
};
|
|
734
875
|
|
|
735
876
|
// src/util/assert-path.ts
|
|
736
|
-
var assert_path_default = (
|
|
737
|
-
if (!
|
|
877
|
+
var assert_path_default = (path9) => {
|
|
878
|
+
if (!path9) {
|
|
738
879
|
console.error("ERROR: no path provided!");
|
|
739
880
|
console.error("\nUsage:");
|
|
740
881
|
console.error(" open path/to/job");
|
|
@@ -876,10 +1017,10 @@ var executeHandler = async (options, logger) => {
|
|
|
876
1017
|
process.exitCode = 1;
|
|
877
1018
|
}
|
|
878
1019
|
};
|
|
879
|
-
var
|
|
1020
|
+
var handler_default2 = executeHandler;
|
|
880
1021
|
|
|
881
1022
|
// src/compile/handler.ts
|
|
882
|
-
import { writeFile as
|
|
1023
|
+
import { writeFile as writeFile3 } from "node:fs/promises";
|
|
883
1024
|
var compileHandler = async (options, logger) => {
|
|
884
1025
|
assert_path_default(options.path);
|
|
885
1026
|
let result;
|
|
@@ -893,11 +1034,11 @@ var compileHandler = async (options, logger) => {
|
|
|
893
1034
|
if (options.outputStdout) {
|
|
894
1035
|
logger.success("Result:\n\n" + result);
|
|
895
1036
|
} else {
|
|
896
|
-
await
|
|
1037
|
+
await writeFile3(options.outputPath, result);
|
|
897
1038
|
logger.success(`Compiled to ${options.outputPath}`);
|
|
898
1039
|
}
|
|
899
1040
|
};
|
|
900
|
-
var
|
|
1041
|
+
var handler_default3 = compileHandler;
|
|
901
1042
|
|
|
902
1043
|
// src/test/handler.ts
|
|
903
1044
|
var testHandler = async (options, logger) => {
|
|
@@ -949,7 +1090,7 @@ var testHandler = async (options, logger) => {
|
|
|
949
1090
|
logger.success(`Result: ${result.data.answer}`);
|
|
950
1091
|
return result;
|
|
951
1092
|
};
|
|
952
|
-
var
|
|
1093
|
+
var handler_default4 = testHandler;
|
|
953
1094
|
|
|
954
1095
|
// src/deploy/handler.ts
|
|
955
1096
|
import {
|
|
@@ -1002,33 +1143,33 @@ function mergeOverrides(config, options) {
|
|
|
1002
1143
|
function pickFirst(...args) {
|
|
1003
1144
|
return args.find((arg) => arg !== void 0 && arg !== null);
|
|
1004
1145
|
}
|
|
1005
|
-
var
|
|
1146
|
+
var handler_default5 = deployHandler;
|
|
1006
1147
|
|
|
1007
1148
|
// src/docgen/handler.ts
|
|
1008
|
-
import { writeFile as
|
|
1149
|
+
import { writeFile as writeFile4 } from "node:fs/promises";
|
|
1009
1150
|
import { readFileSync, writeFileSync, mkdirSync, rmSync } from "node:fs";
|
|
1010
|
-
import
|
|
1151
|
+
import path5 from "node:path";
|
|
1011
1152
|
import { describePackage } from "@openfn/describe-package";
|
|
1012
1153
|
import { getNameAndVersion as getNameAndVersion3 } from "@openfn/runtime";
|
|
1013
1154
|
var RETRY_DURATION = 500;
|
|
1014
1155
|
var RETRY_COUNT = 20;
|
|
1015
1156
|
var TIMEOUT_MS = 1e3 * 60;
|
|
1016
1157
|
var actualDocGen = (specifier) => describePackage(specifier, {});
|
|
1017
|
-
var ensurePath = (filePath) => mkdirSync(
|
|
1018
|
-
var generatePlaceholder = (
|
|
1019
|
-
writeFileSync(
|
|
1158
|
+
var ensurePath = (filePath) => mkdirSync(path5.dirname(filePath), { recursive: true });
|
|
1159
|
+
var generatePlaceholder = (path9) => {
|
|
1160
|
+
writeFileSync(path9, `{ "loading": true, "timestamp": ${Date.now()}}`);
|
|
1020
1161
|
};
|
|
1021
1162
|
var finish = (logger, resultPath) => {
|
|
1022
1163
|
logger.success("Done! Docs can be found at:\n");
|
|
1023
|
-
logger.print(` ${
|
|
1164
|
+
logger.print(` ${path5.resolve(resultPath)}`);
|
|
1024
1165
|
};
|
|
1025
|
-
var generateDocs = async (specifier,
|
|
1166
|
+
var generateDocs = async (specifier, path9, docgen, logger) => {
|
|
1026
1167
|
const result = await docgen(specifier);
|
|
1027
|
-
await
|
|
1028
|
-
finish(logger,
|
|
1029
|
-
return
|
|
1168
|
+
await writeFile4(path9, JSON.stringify(result, null, 2));
|
|
1169
|
+
finish(logger, path9);
|
|
1170
|
+
return path9;
|
|
1030
1171
|
};
|
|
1031
|
-
var waitForDocs = async (docs,
|
|
1172
|
+
var waitForDocs = async (docs, path9, logger, retryDuration = RETRY_DURATION) => {
|
|
1032
1173
|
try {
|
|
1033
1174
|
if (docs.hasOwnProperty("loading")) {
|
|
1034
1175
|
logger.info("Docs are being loaded by another process. Waiting.");
|
|
@@ -1040,19 +1181,19 @@ var waitForDocs = async (docs, path8, logger, retryDuration = RETRY_DURATION) =>
|
|
|
1040
1181
|
clearInterval(i);
|
|
1041
1182
|
reject(new Error("Timed out waiting for docs to load"));
|
|
1042
1183
|
}
|
|
1043
|
-
const updated = JSON.parse(readFileSync(
|
|
1184
|
+
const updated = JSON.parse(readFileSync(path9, "utf8"));
|
|
1044
1185
|
if (!updated.hasOwnProperty("loading")) {
|
|
1045
1186
|
logger.info("Docs found!");
|
|
1046
1187
|
clearInterval(i);
|
|
1047
|
-
resolve(
|
|
1188
|
+
resolve(path9);
|
|
1048
1189
|
}
|
|
1049
1190
|
count++;
|
|
1050
1191
|
}, retryDuration);
|
|
1051
1192
|
});
|
|
1052
1193
|
} else {
|
|
1053
|
-
logger.info(`Docs already written to cache at ${
|
|
1054
|
-
finish(logger,
|
|
1055
|
-
return
|
|
1194
|
+
logger.info(`Docs already written to cache at ${path9}`);
|
|
1195
|
+
finish(logger, path9);
|
|
1196
|
+
return path9;
|
|
1056
1197
|
}
|
|
1057
1198
|
} catch (e) {
|
|
1058
1199
|
logger.error("Existing doc JSON corrupt. Aborting");
|
|
@@ -1069,38 +1210,38 @@ var docgenHandler = (options, logger, docgen = actualDocGen, retryDuration = RET
|
|
|
1069
1210
|
process.exit(9);
|
|
1070
1211
|
}
|
|
1071
1212
|
logger.success(`Generating docs for ${specifier}`);
|
|
1072
|
-
const
|
|
1073
|
-
ensurePath(
|
|
1213
|
+
const path9 = `${repoDir}/docs/${specifier}.json`;
|
|
1214
|
+
ensurePath(path9);
|
|
1074
1215
|
const handleError = () => {
|
|
1075
1216
|
logger.info("Removing placeholder");
|
|
1076
|
-
rmSync(
|
|
1217
|
+
rmSync(path9);
|
|
1077
1218
|
};
|
|
1078
1219
|
try {
|
|
1079
|
-
const existing = readFileSync(
|
|
1220
|
+
const existing = readFileSync(path9, "utf8");
|
|
1080
1221
|
const json = JSON.parse(existing);
|
|
1081
1222
|
if (json && json.timeout && Date.now() - json.timeout >= TIMEOUT_MS) {
|
|
1082
1223
|
logger.info(`Expired placeholder found. Removing.`);
|
|
1083
|
-
rmSync(
|
|
1224
|
+
rmSync(path9);
|
|
1084
1225
|
throw new Error("TIMEOUT");
|
|
1085
1226
|
}
|
|
1086
|
-
return waitForDocs(json,
|
|
1227
|
+
return waitForDocs(json, path9, logger, retryDuration);
|
|
1087
1228
|
} catch (e) {
|
|
1088
1229
|
if (e.message !== "TIMEOUT") {
|
|
1089
|
-
logger.info(`Docs JSON not found at ${
|
|
1230
|
+
logger.info(`Docs JSON not found at ${path9}`);
|
|
1090
1231
|
}
|
|
1091
1232
|
logger.debug("Generating placeholder");
|
|
1092
|
-
generatePlaceholder(
|
|
1093
|
-
return generateDocs(specifier,
|
|
1233
|
+
generatePlaceholder(path9);
|
|
1234
|
+
return generateDocs(specifier, path9, docgen, logger).catch((e2) => {
|
|
1094
1235
|
logger.error("Error generating documentation");
|
|
1095
1236
|
logger.error(e2);
|
|
1096
1237
|
handleError();
|
|
1097
1238
|
});
|
|
1098
1239
|
}
|
|
1099
1240
|
};
|
|
1100
|
-
var
|
|
1241
|
+
var handler_default6 = docgenHandler;
|
|
1101
1242
|
|
|
1102
1243
|
// src/docs/handler.ts
|
|
1103
|
-
import { readFile as
|
|
1244
|
+
import { readFile as readFile3 } from "node:fs/promises";
|
|
1104
1245
|
import c from "chalk";
|
|
1105
1246
|
import { getNameAndVersion as getNameAndVersion4, getLatestVersion } from "@openfn/runtime";
|
|
1106
1247
|
var describeFn = (adaptorName, fn) => [
|
|
@@ -1137,7 +1278,7 @@ var docsHandler = async (options, logger) => {
|
|
|
1137
1278
|
logger.success(`Showing docs for ${adaptorName} v${version}`);
|
|
1138
1279
|
}
|
|
1139
1280
|
logger.info("Generating/loading documentation...");
|
|
1140
|
-
const
|
|
1281
|
+
const path9 = await handler_default6(
|
|
1141
1282
|
{
|
|
1142
1283
|
specifier: `${name}@${version}`,
|
|
1143
1284
|
repoDir
|
|
@@ -1146,8 +1287,8 @@ var docsHandler = async (options, logger) => {
|
|
|
1146
1287
|
createNullLogger()
|
|
1147
1288
|
);
|
|
1148
1289
|
let didError = false;
|
|
1149
|
-
if (
|
|
1150
|
-
const source = await
|
|
1290
|
+
if (path9) {
|
|
1291
|
+
const source = await readFile3(path9, "utf8");
|
|
1151
1292
|
const data = JSON.parse(source);
|
|
1152
1293
|
let desc;
|
|
1153
1294
|
if (operation) {
|
|
@@ -1180,13 +1321,13 @@ var docsHandler = async (options, logger) => {
|
|
|
1180
1321
|
logger.error("Not found");
|
|
1181
1322
|
}
|
|
1182
1323
|
};
|
|
1183
|
-
var
|
|
1324
|
+
var handler_default7 = docsHandler;
|
|
1184
1325
|
|
|
1185
1326
|
// src/metadata/cache.ts
|
|
1186
1327
|
import { createHash } from "node:crypto";
|
|
1187
1328
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
1188
|
-
import
|
|
1189
|
-
import { writeFile as
|
|
1329
|
+
import path6 from "node:path";
|
|
1330
|
+
import { writeFile as writeFile5, mkdir as mkdir2 } from "node:fs/promises";
|
|
1190
1331
|
var getPath = (repoDir, key) => `${repoDir}/meta/${key}.json`;
|
|
1191
1332
|
var sortKeys = (obj) => {
|
|
1192
1333
|
const newObj = {};
|
|
@@ -1216,8 +1357,8 @@ var get = (repoPath, key) => {
|
|
|
1216
1357
|
};
|
|
1217
1358
|
var set = async (repoPath, key, data) => {
|
|
1218
1359
|
const fullPath = getPath(repoPath, key);
|
|
1219
|
-
await
|
|
1220
|
-
await
|
|
1360
|
+
await mkdir2(path6.dirname(fullPath), { recursive: true });
|
|
1361
|
+
await writeFile5(fullPath, JSON.stringify(data));
|
|
1221
1362
|
};
|
|
1222
1363
|
var cache_default = { get, set, generateKey, getPath, sortKeys };
|
|
1223
1364
|
|
|
@@ -1301,10 +1442,10 @@ var metadataHandler = async (options, logger) => {
|
|
|
1301
1442
|
process.exit(1);
|
|
1302
1443
|
}
|
|
1303
1444
|
};
|
|
1304
|
-
var
|
|
1445
|
+
var handler_default8 = metadataHandler;
|
|
1305
1446
|
|
|
1306
1447
|
// src/pull/handler.ts
|
|
1307
|
-
import
|
|
1448
|
+
import path7 from "path";
|
|
1308
1449
|
import fs4 from "node:fs/promises";
|
|
1309
1450
|
import {
|
|
1310
1451
|
getConfig as getConfig2,
|
|
@@ -1328,7 +1469,7 @@ async function pullHandler(options, logger) {
|
|
|
1328
1469
|
}
|
|
1329
1470
|
const state = getStateFromProjectPayload(project);
|
|
1330
1471
|
await fs4.writeFile(
|
|
1331
|
-
|
|
1472
|
+
path7.resolve(config.statePath),
|
|
1332
1473
|
JSON.stringify(state, null, 2)
|
|
1333
1474
|
);
|
|
1334
1475
|
logger.always(
|
|
@@ -1353,7 +1494,7 @@ async function pullHandler(options, logger) {
|
|
|
1353
1494
|
process.exitCode = 1;
|
|
1354
1495
|
process.exit(1);
|
|
1355
1496
|
}
|
|
1356
|
-
const resolvedPath =
|
|
1497
|
+
const resolvedPath = path7.resolve(config.specPath);
|
|
1357
1498
|
logger.debug("reading spec from", resolvedPath);
|
|
1358
1499
|
await fs4.writeFile(resolvedPath, res.body);
|
|
1359
1500
|
const spec = await getSpec(resolvedPath);
|
|
@@ -1382,11 +1523,11 @@ function mergeOverrides2(config, options) {
|
|
|
1382
1523
|
function pickFirst2(...args) {
|
|
1383
1524
|
return args.find((arg) => arg !== void 0 && arg !== null);
|
|
1384
1525
|
}
|
|
1385
|
-
var
|
|
1526
|
+
var handler_default9 = pullHandler;
|
|
1386
1527
|
|
|
1387
1528
|
// src/util/print-versions.ts
|
|
1388
1529
|
import { readFileSync as readFileSync3 } from "node:fs";
|
|
1389
|
-
import
|
|
1530
|
+
import path8 from "node:path";
|
|
1390
1531
|
import url from "node:url";
|
|
1391
1532
|
import { getNameAndVersion as getNameAndVersion5 } from "@openfn/runtime";
|
|
1392
1533
|
import { mainSymbols } from "figures";
|
|
@@ -1398,7 +1539,7 @@ var { triangleRightSmall: t } = mainSymbols;
|
|
|
1398
1539
|
var loadVersionFromPath = (adaptorPath) => {
|
|
1399
1540
|
try {
|
|
1400
1541
|
const pkg = JSON.parse(
|
|
1401
|
-
readFileSync3(
|
|
1542
|
+
readFileSync3(path8.resolve(adaptorPath, "package.json"), "utf8")
|
|
1402
1543
|
);
|
|
1403
1544
|
return pkg.version;
|
|
1404
1545
|
} catch (e) {
|
|
@@ -1431,7 +1572,7 @@ var printVersions = async (logger, options = {}, includeComponents = false) => {
|
|
|
1431
1572
|
...[NODE, CLI2, RUNTIME2, COMPILER2, adaptorName].map((s) => s.length)
|
|
1432
1573
|
);
|
|
1433
1574
|
const prefix = (str) => ` ${t} ${str.padEnd(longest + 4, " ")}`;
|
|
1434
|
-
const dirname =
|
|
1575
|
+
const dirname = path8.dirname(url.fileURLToPath(import.meta.url));
|
|
1435
1576
|
const pkg = JSON.parse(readFileSync3(`${dirname}/../../package.json`, "utf8"));
|
|
1436
1577
|
const { version, dependencies } = pkg;
|
|
1437
1578
|
const compilerVersion = dependencies["@openfn/compiler"];
|
|
@@ -1471,14 +1612,15 @@ var print_versions_default = printVersions;
|
|
|
1471
1612
|
|
|
1472
1613
|
// src/commands.ts
|
|
1473
1614
|
var handlers = {
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1615
|
+
apollo: handler_default,
|
|
1616
|
+
execute: handler_default2,
|
|
1617
|
+
compile: handler_default3,
|
|
1618
|
+
test: handler_default4,
|
|
1619
|
+
deploy: handler_default5,
|
|
1620
|
+
docgen: handler_default6,
|
|
1621
|
+
docs: handler_default7,
|
|
1622
|
+
metadata: handler_default8,
|
|
1623
|
+
pull: handler_default9,
|
|
1482
1624
|
["repo-clean"]: clean,
|
|
1483
1625
|
["repo-install"]: install,
|
|
1484
1626
|
["repo-pwd"]: pwd,
|
|
@@ -1507,7 +1649,7 @@ var parse = async (options, log) => {
|
|
|
1507
1649
|
logger
|
|
1508
1650
|
);
|
|
1509
1651
|
}
|
|
1510
|
-
if (!/^(pull|deploy|test|version)$/.test(options.command) && !options.repoDir) {
|
|
1652
|
+
if (!/^(pull|deploy|test|version|apollo)$/.test(options.command) && !options.repoDir) {
|
|
1511
1653
|
logger.warn(
|
|
1512
1654
|
"WARNING: no repo module dir found! Using the default (/tmp/repo)"
|
|
1513
1655
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfn/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "CLI devtools for the openfn toolchain.",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=18",
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"@types/node": "^18.15.13",
|
|
30
30
|
"@types/rimraf": "^3.0.2",
|
|
31
31
|
"@types/treeify": "^1.0.0",
|
|
32
|
+
"@types/ws": "^8.5.10",
|
|
32
33
|
"@types/yargs": "^17.0.24",
|
|
33
34
|
"ava": "5.3.1",
|
|
34
35
|
"mock-fs": "^5.1.4",
|
|
@@ -44,12 +45,13 @@
|
|
|
44
45
|
"figures": "^5.0.0",
|
|
45
46
|
"rimraf": "^3.0.2",
|
|
46
47
|
"treeify": "^1.1.0",
|
|
48
|
+
"ws": "^8.14.1",
|
|
47
49
|
"yargs": "^17.7.2",
|
|
48
|
-
"@openfn/compiler": "0.1.2",
|
|
49
50
|
"@openfn/describe-package": "0.0.19",
|
|
51
|
+
"@openfn/compiler": "0.1.2",
|
|
50
52
|
"@openfn/logger": "1.0.1",
|
|
51
|
-
"@openfn/
|
|
52
|
-
"@openfn/
|
|
53
|
+
"@openfn/deploy": "0.4.6",
|
|
54
|
+
"@openfn/runtime": "1.1.3"
|
|
53
55
|
},
|
|
54
56
|
"files": [
|
|
55
57
|
"dist",
|