@docupace/pipeline 1.0.39-newrelease.8 → 1.0.39
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/next/execute.sh +2 -8
- package/package.json +3 -11
- package/src/auth0/cli.js +3 -1
- package/src/auth0/configure.js +203 -9
- package/src/auth0/metadata.js +2 -1
- package/src/changeset/cli.js +232 -76
- package/src/changeset/validate.js +1 -38
- package/src/jenkins/setParams.groovy +2 -1
- package/src/next/apache.js +35 -38
- package/src/next/cli.js +5 -14
- package/src/next/config.js +8 -18
- package/src/next/deploy.js +3 -7
- package/src/next/haproxy.js +19 -9
- package/src/next/jira.js +7 -55
- package/src/next/publish.js +30 -53
- package/src/next/vault.js +5 -7
- package/terraform/apply.sh +1 -1
- package/terraform/init.sh +2 -1
- package/terraform/plan.sh +1 -1
- package/README.md +0 -136
- package/src/changeset/canny.js +0 -116
- package/src/changeset/changelog-module.cjs +0 -26
- package/src/changeset/changelog.js +0 -134
- package/src/changeset/config.js +0 -11
- package/src/changeset/create.js +0 -171
- package/src/changeset/openai.js +0 -437
- package/src/changeset/package-util.js +0 -86
- package/src/changeset/util.js +0 -43
- package/src/changeset/version.js +0 -102
- package/src/index.mjs +0 -2
- package/src/next/logger.js +0 -17
- package/src/next/util.js +0 -93
package/src/next/util.js
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { existsSync } from 'fs';
|
|
2
|
-
import path, { join } from 'path';
|
|
3
|
-
import { $ } from 'zx';
|
|
4
|
-
|
|
5
|
-
export function isMonoRepo() {
|
|
6
|
-
// Check for the presence of turbo.json which indicates a Turborepo monorepo
|
|
7
|
-
return existsSync(join(process.cwd(), 'turbo.json'));
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Gets the packages that have changed between two git references (branches or tags)
|
|
12
|
-
* @param {string} fromRef - The starting git reference (branch or tag)
|
|
13
|
-
* @param {string} toRef - The ending git reference (branch or tag)
|
|
14
|
-
* @returns {Promise<Array<{name: string, path: string}>>} - Array of changed packages with name and path
|
|
15
|
-
*/
|
|
16
|
-
export async function getChangedPackagesInternal(fromRef, toRef) {
|
|
17
|
-
try {
|
|
18
|
-
console.log(process.cwd());
|
|
19
|
-
// Run the turbo command to get changed packages between branches
|
|
20
|
-
const filterArg = `[${fromRef}...${toRef}]`;
|
|
21
|
-
const turboDryOutput =
|
|
22
|
-
await $`turbo run build --filter=${filterArg} --dry=json`;
|
|
23
|
-
|
|
24
|
-
const dryRunJson = turboDryOutput.stdout.trim();
|
|
25
|
-
|
|
26
|
-
const dryRun = JSON.parse(dryRunJson);
|
|
27
|
-
|
|
28
|
-
const packages = dryRun.tasks.map((task) => ({
|
|
29
|
-
name: task.package,
|
|
30
|
-
directory: task.directory,
|
|
31
|
-
path: path.resolve(process.cwd(), task.directory),
|
|
32
|
-
}));
|
|
33
|
-
|
|
34
|
-
return packages;
|
|
35
|
-
} catch (error) {
|
|
36
|
-
console.error('Error getting changed packages:', error);
|
|
37
|
-
return [];
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export async function getAllPackages() {
|
|
42
|
-
try {
|
|
43
|
-
const turboDryOutput = await $`turbo run build --dry=json`;
|
|
44
|
-
const dryRunJson = turboDryOutput.stdout.trim();
|
|
45
|
-
const dryRun = JSON.parse(dryRunJson);
|
|
46
|
-
|
|
47
|
-
const packages = dryRun.tasks.map((task) => ({
|
|
48
|
-
name: task.package,
|
|
49
|
-
directory: task.directory,
|
|
50
|
-
path: path.resolve(process.cwd(), task.directory),
|
|
51
|
-
}));
|
|
52
|
-
|
|
53
|
-
return packages;
|
|
54
|
-
} catch (error) {
|
|
55
|
-
console.error('Error getting changed packages:', error);
|
|
56
|
-
return [];
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export async function getAllAppPackages() {
|
|
61
|
-
const changedPackages = await getAllPackages();
|
|
62
|
-
const appPackages = changedPackages.filter((appPackage) =>
|
|
63
|
-
appPackage.directory.startsWith('apps'),
|
|
64
|
-
);
|
|
65
|
-
return appPackages;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export async function getChangedPackages() {
|
|
69
|
-
const branch = process.env.BITBUCKET_BRANCH;
|
|
70
|
-
const destBranch = process.env.BITBUCKET_PR_DESTINATION_BRANCH;
|
|
71
|
-
|
|
72
|
-
await $`git fetch origin ${destBranch}:${destBranch}`;
|
|
73
|
-
console.log(`Getting changed packages for [${destBranch}...${branch}]`);
|
|
74
|
-
const changedPackages = await getChangedPackagesInternal(destBranch, branch);
|
|
75
|
-
console.log('Changed Packages:\n', JSON.stringify(changedPackages, null, 2));
|
|
76
|
-
return changedPackages;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export async function getChangedAppPackages() {
|
|
80
|
-
const changedPackages = await getChangedPackages();
|
|
81
|
-
const appPackages = changedPackages.filter((appPackage) =>
|
|
82
|
-
appPackage.directory.startsWith('apps'),
|
|
83
|
-
);
|
|
84
|
-
return appPackages;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
export async function setGitInfo() {
|
|
88
|
-
if (process.env.SET_GITOPS_USER) {
|
|
89
|
-
await $`git config --global user.email "gitops@docupace.com"`;
|
|
90
|
-
await $`git config --global user.name "Gitops"`;
|
|
91
|
-
await $`git remote set-url origin https://${process.env.THIS_REP_TOKEN}@bitbucket.org/${process.env.BITBUCKET_REPO_FULL_NAME}.git`;
|
|
92
|
-
}
|
|
93
|
-
}
|