@docupace/pipeline 1.0.0-alpha.9 → 1.0.1-0.ervins1.2

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.
@@ -0,0 +1,12 @@
1
+ module.exports = {
2
+ parser: 'typescript',
3
+ trailingComma: 'all',
4
+ tabWidth: 2,
5
+ semi: true,
6
+ singleQuote: true,
7
+ printWidth: 80,
8
+ tabs: false,
9
+ jsxSingleQuote: false,
10
+ bracketSameLine: true,
11
+ arrowParens: 'always',
12
+ };
@@ -4,4 +4,5 @@
4
4
  DIR="$(cd "$(dirname "$0")" && pwd)/../@docupace/pipeline"
5
5
 
6
6
  # Pass all arguments to the actual script
7
- bash $DIR/next/changeset.sh validate $2
7
+
8
+ bash $DIR/next/changeset.sh validate $2
@@ -0,0 +1,26 @@
1
+ import globals from 'globals';
2
+ import pluginJs from '@eslint/js';
3
+ import prettierConfig from 'eslint-config-prettier';
4
+ import prettierPlugin from 'eslint-plugin-prettier';
5
+
6
+ /** @type {import('eslint').Linter.Config[]} */
7
+ export default [
8
+ {
9
+ languageOptions: {
10
+ globals: {
11
+ ...globals.browser,
12
+ ...globals.node, // Add Node.js globals
13
+ },
14
+ },
15
+ },
16
+ pluginJs.configs.recommended,
17
+ {
18
+ plugins: {
19
+ prettier: prettierPlugin,
20
+ },
21
+ rules: {
22
+ ...prettierConfig.rules,
23
+ 'prettier/prettier': 'error',
24
+ },
25
+ },
26
+ ];
package/next/changeset.sh CHANGED
@@ -8,8 +8,6 @@ DIR="$(cd "$(dirname "$0")" && pwd)"
8
8
  validate_changesets() {
9
9
  if [ ! -z "$PR_ID" ]; then
10
10
  echo "🔍 Validating changesets..."
11
- echo "Current Dir $DIR"
12
- echo "1=$1"
13
11
  pnpm node $DIR/validateChangeset.cjs $1 || {
14
12
  if [ $? -eq 1 ]; then
15
13
  echo "❌ No changeset found. Please add a changeset to this PR. Please see more information at https://docupacellc.atlassian.net/wiki/spaces/PM/pages/1350893571/Creating+changesets+for+Docupace+Next"
package/next/deploy.sh CHANGED
@@ -1,40 +1,40 @@
1
- #!/bin/bash
1
+ #!/bin/bash
2
2
 
3
- set -e # Enable command tracing
4
- # Variables
5
- REPO_NAME="gitops-dev"
6
- REPO_URL="https://x-token-auth:$GITOPS_REP_TOKEN@bitbucket.org/dp-cloud/${REPO_NAME}.git"
7
- FILE_PATH="dp/$2/$1.values.yaml"
8
- BUILD_NUMBER=$BITBUCKET_BUILD_NUMBER
9
- GITOPS_BRANCH=master
10
- if [ -n "$VERSION_TAG" ]; then
11
- DEPLOY_TAG=$VERSION_TAG
12
- else
13
- DEPLOY_TAG="build-$BUILD_NUMBER"
14
- fi
3
+ set -e # Enable command tracing
4
+ # Variables
5
+ REPO_NAME="gitops-dev"
6
+ REPO_URL="https://x-token-auth:$GITOPS_REP_TOKEN@bitbucket.org/dp-cloud/${REPO_NAME}.git"
7
+ FILE_PATH="dp/$2/$1.values.yaml"
8
+ BUILD_NUMBER=$BITBUCKET_BUILD_NUMBER
9
+ GITOPS_BRANCH=master
10
+ if [ -n "$VERSION_TAG" ]; then
11
+ DEPLOY_TAG=$VERSION_TAG
12
+ else
13
+ DEPLOY_TAG="build-$BUILD_NUMBER"
14
+ fi
15
15
 
16
16
 
17
17
 
18
- # Clone the repository
18
+ # Clone the repository
19
19
 
20
- git config user.email qxebpukjnzljnwty1knte7ym53aogk@bots.bitbucket.org
21
- git clone $REPO_URL
22
- cd ${REPO_NAME} || exit
20
+ git config user.email qxebpukjnzljnwty1knte7ym53aogk@bots.bitbucket.org
21
+ git clone $REPO_URL
22
+ cd ${REPO_NAME} || exit
23
23
 
24
- # Checkout the branch
24
+ # Checkout the branch
25
25
 
26
- # Modify the YAML file
27
- sed -i "s/tag: .*/tag: $DEPLOY_TAG/" $FILE_PATH
26
+ # Modify the YAML file
27
+ sed -i "s/tag: .*/tag: $DEPLOY_TAG/" $FILE_PATH
28
28
 
29
- # Add changes to git
30
- git add $FILE_PATH
29
+ # Add changes to git
30
+ git add $FILE_PATH
31
31
 
32
- # Commit changes
33
- git commit -m "Update image tag to $DEPLOY_TAG"
32
+ # Commit changes
33
+ git commit -m "Update image tag to $DEPLOY_TAG"
34
34
 
35
- # Push changes
36
- git push origin $GITOPS_BRANCH
35
+ # Push changes
36
+ git push origin $GITOPS_BRANCH
37
37
 
38
- # Clean up
39
- cd ..
40
- rm -rf ${REPO_NAME}
38
+ # Clean up
39
+ cd ..
40
+ rm -rf ${REPO_NAME}
package/package.json CHANGED
@@ -1,17 +1,43 @@
1
1
  {
2
2
  "name": "@docupace/pipeline",
3
- "version": "1.0.0-alpha.9",
3
+ "version": "1.0.10.ervins1.2",
4
4
  "description": "",
5
5
  "main": "index.js",
6
+ "type": "module",
6
7
  "bin": {
7
- "next-changeset-validate": "./bin/next-changeset-validate.sh"
8
+ "dp-changeset-cli": "src/changeset/cli.js",
9
+ "dp-next-cli": "src/next/cli.js",
10
+ "dp-auth0-cli": "src/auth0/cli.js"
8
11
  },
9
12
  "keywords": [
10
13
  "bash"
11
14
  ],
12
15
  "author": "",
13
16
  "license": "ISC",
17
+ "dependencies": {
18
+ "@changesets/cli": "^2.27.10",
19
+ "auth0-deploy-cli": "^7.24.3",
20
+ "axios": "^1.7.9",
21
+ "commander": "^12.1.0",
22
+ "dotenv": "^16.4.7",
23
+ "js-yaml": "^4.1.0",
24
+ "lodash": "^4.17.21",
25
+ "openai": "^4.76.3",
26
+ "zod": "^3.24.1",
27
+ "zx": "^8.3.0"
28
+ },
29
+ "devDependencies": {
30
+ "@eslint/js": "^9.17.0",
31
+ "esbuild": "^0.24.0",
32
+ "eslint": "^9.17.0",
33
+ "eslint-config-prettier": "^9.1.0",
34
+ "eslint-plugin-prettier": "^5.2.1",
35
+ "globals": "^15.14.0",
36
+ "prettier": "^3.4.2"
37
+ },
14
38
  "scripts": {
15
- "next-changeset-validate": "bash next/changeset.sh validate"
39
+ "test-deploy-core": "dp-next-cli deploy-core-pipeline dev template",
40
+ "test-deploy-from-site": "dp-next-cli deploy-from-site --from-env dev --to-env dev --from-site financialdev --to-site template --deploy-core true",
41
+ "test-run-pipline": "dp-next-cli run-pipeline -r docupace-next-e2e -b master -p run-tests-qa"
16
42
  }
17
43
  }
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { Command } from 'commander';
4
+ import {
5
+ configureFromSite
6
+ } from './configure.js';
7
+ import {
8
+ getVaultSecrets
9
+ } from './vault.js'
10
+
11
+ import dotenv from 'dotenv';
12
+
13
+ dotenv.config({ path: ['.env.pipeline.local', 'config/.env.pipeline.local'] });
14
+
15
+ const program = new Command();
16
+
17
+ program
18
+ .command('configureFromSite <fromSite> <toSite> <env> <deployUI> <deployGraphQLServer> <useNewDomain>')
19
+ .description('Configure the Auth0 tenants in env for the given site')
20
+ .action(async (fromSite, toSite, env, deployUI, deployGraphQLServer, useNewDomain) => {
21
+ await configureFromSite(fromSite, toSite, env, deployUI, deployGraphQLServer, useNewDomain);
22
+ });
23
+
24
+ program
25
+ .command('getVaultSecrets <vaultPath>')
26
+ .description('Get Secrets for Vault PATH')
27
+ .action(async (vaultPath) => {
28
+ await getVaultSecrets(vaultPath);
29
+ });
30
+
31
+ program.parse(process.argv);