@docupace/pipeline 1.0.6-alpha.3 → 1.0.6-alpha.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docupace/pipeline",
3
- "version": "1.0.6-alpha.3",
3
+ "version": "1.0.6-alpha.4",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",
package/src/next/cli.js CHANGED
@@ -112,7 +112,8 @@ program
112
112
  return { ...previous, [key]: val };
113
113
  },
114
114
  {},
115
- ) // Initialize as an empty object
115
+ )
116
+ .option('-w, --wait', 'Wait for the pipeline to complete', false) // Defaults to false
116
117
  .action(async (cmdObj) => {
117
118
  try {
118
119
  const { repository, pipelineName, branch, variables } = cmdObj;
@@ -67,7 +67,13 @@ async function getPipelineStatus(repository, pipelineUUID) {
67
67
  }
68
68
  }
69
69
 
70
- export async function runPipeline(repository, pipelineName, branch, variables) {
70
+ export async function runPipeline(
71
+ repository,
72
+ pipelineName,
73
+ branch,
74
+ variables,
75
+ wait,
76
+ ) {
71
77
  try {
72
78
  console.log(
73
79
  `Triggering custom pipeline: ${pipelineName} for branch: ${branch}...`,
@@ -77,7 +83,13 @@ export async function runPipeline(repository, pipelineName, branch, variables) {
77
83
  pipelineName,
78
84
  branch,
79
85
  variables,
86
+ (wait = false),
80
87
  );
88
+
89
+ if (!wait) {
90
+ return;
91
+ }
92
+
81
93
  const pipelineUUID = pipeline.uuid;
82
94
 
83
95
  console.log(`Pipeline triggered with UUID: ${pipelineUUID}`);