@docupace/pipeline 1.0.94 → 1.0.96

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.94",
3
+ "version": "1.0.96",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",
package/src/next/cli.js CHANGED
@@ -116,11 +116,25 @@ program
116
116
  program
117
117
  .command('deploy-template [tagPrefix]')
118
118
  .description('Deploy an standard configuration for configured sites')
119
- .action(async (tagPrefix) => {
119
+ .option('-e, --env <env>', 'Target environment (overrides default sites)')
120
+ .option('-s, --site <site>', 'Target site (overrides default sites)')
121
+ .option('-a, --app <app>', 'Target site (overrides default sites)')
122
+
123
+ .action(async (tagPrefix, options) => {
120
124
  const deployTag = await getDeployTag(tagPrefix);
121
- const sites = await getDefaultDeploySite(deployTag);
125
+ const app = options.app ?? 'graphql-server';
126
+ const sites =
127
+ options.env && options.site
128
+ ? [{ env: options.env, site: options.site }]
129
+ : await getDefaultDeploySite(deployTag);
122
130
  for (const { env, site } of sites) {
123
- await deployTemplate(env, site, deployTag);
131
+ await deployTemplate(
132
+ env,
133
+ site,
134
+ deployTag,
135
+ 'standardConfigRemoteBranch',
136
+ app,
137
+ );
124
138
  }
125
139
  });
126
140
 
@@ -135,9 +149,14 @@ program
135
149
  program
136
150
  .command('deploy-app <application>')
137
151
  .description('Deploy an application for a specific site')
138
- .action(async (application) => {
152
+ .option('-e, --env <env>', 'Target environment (overrides default sites)')
153
+ .option('-s, --site <site>', 'Target site (overrides default sites)')
154
+ .action(async (application, options) => {
139
155
  const deployTag = await getDeployTag();
140
- const sites = await getDefaultDeploySite(deployTag);
156
+ const sites =
157
+ options.env && options.site
158
+ ? [{ env: options.env, site: options.site }]
159
+ : await getDefaultDeploySite(deployTag);
141
160
  for (const { env, site } of sites) {
142
161
  await deployAppWithTag(application, env, site, deployTag);
143
162
  }
@@ -146,10 +165,15 @@ program
146
165
  program
147
166
  .command('deploy-mono-app <tag> <application>')
148
167
  .description('Deploy an mono application for a specific site')
149
- .action(async (tag, application) => {
168
+ .option('-e, --env <env>', 'Target environment (overrides default sites)')
169
+ .option('-s, --site <site>', 'Target site (overrides default sites)')
170
+ .action(async (tag, application, options) => {
150
171
  const deployTag = await getDeployTag(tag);
151
172
  const version = 'v' + deployTag.split('@')[1];
152
- const sites = await getDefaultDeploySite(version);
173
+ const sites =
174
+ options.env && options.site
175
+ ? [{ env: options.env, site: options.site }]
176
+ : await getDefaultDeploySite(version);
153
177
  for (const { env, site } of sites) {
154
178
  await deployAppWithTag(application, env, site, version);
155
179
  }
@@ -354,11 +354,12 @@ export async function deployTemplate(
354
354
  site,
355
355
  deployTag,
356
356
  templateType = 'standardConfigRemoteBranch',
357
+ appName = 'graphql-server',
357
358
  ) {
358
359
  console.log(`Deploying standard template for site: ${site}`);
359
360
  console.log(`Using deployment tag: ${deployTag}`);
360
361
  const { repoPath, deployConfigFilePath, deployConfig } =
361
- await cloneAndReadDeployConfig('graphql-server', env, site);
362
+ await cloneAndReadDeployConfig(appName, env, site);
362
363
 
363
364
  deployConfig.graphqlServer[templateType] = deployTag;
364
365