@openfn/cli 1.23.0 → 1.24.1
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 +45 -9
- package/dist/process/runner.js +999 -804
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -250,12 +250,16 @@ var compile = {
|
|
|
250
250
|
}
|
|
251
251
|
};
|
|
252
252
|
var confirm = {
|
|
253
|
-
name: "
|
|
253
|
+
name: "confirm",
|
|
254
254
|
yargs: {
|
|
255
|
+
alias: ["y"],
|
|
255
256
|
boolean: true,
|
|
256
257
|
description: "Skip confirmation prompts (e.g. 'Are you sure?')"
|
|
257
258
|
},
|
|
258
259
|
ensure: (opts2) => {
|
|
260
|
+
if (opts2.y) {
|
|
261
|
+
opts2.confirm = false;
|
|
262
|
+
}
|
|
259
263
|
setDefaultValue(opts2, "confirm", true);
|
|
260
264
|
}
|
|
261
265
|
};
|
|
@@ -596,8 +600,8 @@ function build(opts2, yargs2) {
|
|
|
596
600
|
return yargs2.option(o.name, expandYargs(o.yargs));
|
|
597
601
|
}, yargs2);
|
|
598
602
|
}
|
|
599
|
-
var ensure = (
|
|
600
|
-
yargs2.command =
|
|
603
|
+
var ensure = (command8, opts2) => (yargs2) => {
|
|
604
|
+
yargs2.command = command8;
|
|
601
605
|
opts2.filter((opt) => opt.ensure).forEach((opt) => {
|
|
602
606
|
try {
|
|
603
607
|
opt.ensure(yargs2);
|
|
@@ -605,7 +609,7 @@ var ensure = (command7, opts2) => (yargs2) => {
|
|
|
605
609
|
console.log(e);
|
|
606
610
|
console.error(
|
|
607
611
|
c.red(`
|
|
608
|
-
Error parsing command arguments: ${
|
|
612
|
+
Error parsing command arguments: ${command8}.${opt.name}
|
|
609
613
|
`)
|
|
610
614
|
);
|
|
611
615
|
console.error(c.red("Aborting"));
|
|
@@ -614,11 +618,11 @@ Error parsing command arguments: ${command7}.${opt.name}
|
|
|
614
618
|
}
|
|
615
619
|
});
|
|
616
620
|
};
|
|
617
|
-
var override = (
|
|
621
|
+
var override = (command8, yargs2) => {
|
|
618
622
|
return {
|
|
619
|
-
...
|
|
623
|
+
...command8,
|
|
620
624
|
yargs: {
|
|
621
|
-
...
|
|
625
|
+
...command8.yargs || {},
|
|
622
626
|
...yargs2
|
|
623
627
|
}
|
|
624
628
|
};
|
|
@@ -919,6 +923,12 @@ var alias = {
|
|
|
919
923
|
description: "Environment name (eg staging, prod, branch)"
|
|
920
924
|
}
|
|
921
925
|
};
|
|
926
|
+
var dryRun2 = {
|
|
927
|
+
name: "dryRun",
|
|
928
|
+
yargs: {
|
|
929
|
+
description: "Runs the command but does not commit any changes to disk or app"
|
|
930
|
+
}
|
|
931
|
+
};
|
|
922
932
|
var removeUnmapped = {
|
|
923
933
|
name: "remove-unmapped",
|
|
924
934
|
yargs: {
|
|
@@ -1308,7 +1318,6 @@ var options14 = [
|
|
|
1308
1318
|
description: "path to output the project to"
|
|
1309
1319
|
}),
|
|
1310
1320
|
logJson,
|
|
1311
|
-
projectPath,
|
|
1312
1321
|
snapshots,
|
|
1313
1322
|
path2,
|
|
1314
1323
|
force
|
|
@@ -1325,6 +1334,33 @@ var command6 = {
|
|
|
1325
1334
|
handler: ensure("project-pull", options14)
|
|
1326
1335
|
};
|
|
1327
1336
|
|
|
1337
|
+
// src/projects/deploy.ts
|
|
1338
|
+
import Project5 from "@openfn/project";
|
|
1339
|
+
import c2 from "chalk";
|
|
1340
|
+
var options15 = [
|
|
1341
|
+
env2,
|
|
1342
|
+
workspace,
|
|
1343
|
+
dryRun2,
|
|
1344
|
+
apiKey,
|
|
1345
|
+
endpoint,
|
|
1346
|
+
log,
|
|
1347
|
+
logJson,
|
|
1348
|
+
snapshots,
|
|
1349
|
+
force,
|
|
1350
|
+
confirm
|
|
1351
|
+
];
|
|
1352
|
+
var command7 = {
|
|
1353
|
+
command: "deploy",
|
|
1354
|
+
describe: `Deploy the checked out project to a Lightning Instance`,
|
|
1355
|
+
builder: (yargs2) => build(options15, yargs2).positional("project", {
|
|
1356
|
+
describe: "The UUID, local id or local alias of the project to deploy to"
|
|
1357
|
+
}).example(
|
|
1358
|
+
"deploy",
|
|
1359
|
+
"Deploy the checkout project to the connected instance"
|
|
1360
|
+
),
|
|
1361
|
+
handler: ensure("project-deploy", options15)
|
|
1362
|
+
};
|
|
1363
|
+
|
|
1328
1364
|
// src/projects/command.ts
|
|
1329
1365
|
var projectsCommand = {
|
|
1330
1366
|
command: "project [subcommand]",
|
|
@@ -1332,7 +1368,7 @@ var projectsCommand = {
|
|
|
1332
1368
|
describe: "Sync and manage an OpenFn project",
|
|
1333
1369
|
handler: () => {
|
|
1334
1370
|
},
|
|
1335
|
-
builder: (yargs2) => yargs2.command(command6).command(list_default).command(version_default).command(merge_default).command(checkout_default).command(fetch_default).example("project", "list all projects in the workspace").example("project list", "list all projects in the workspace").example(
|
|
1371
|
+
builder: (yargs2) => yargs2.command(command6).command(command7).command(list_default).command(version_default).command(merge_default).command(checkout_default).command(fetch_default).example("project", "list all projects in the workspace").example("project list", "list all projects in the workspace").example(
|
|
1336
1372
|
"project checkout staging",
|
|
1337
1373
|
"Checkout the project with id staging"
|
|
1338
1374
|
).example(
|