@leverege/build-tools 2.23.6 → 2.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.
@@ -0,0 +1,29 @@
1
+ {
2
+ // Use IntelliSense to learn about possible attributes.
3
+ // Hover to view descriptions of existing attributes.
4
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
+ "version": "0.2.0",
6
+ "configurations": [
7
+ {
8
+ "type": "node",
9
+ "request": "launch",
10
+ "name": "firebase deploy",
11
+ "skipFiles": [
12
+ "<node_internals>/**"
13
+ ],
14
+ "program": "${workspaceFolder}/src/firebaseDeploy.mjs",
15
+ "console": "integratedTerminal"
16
+ },
17
+ {
18
+ "type": "node",
19
+ "request": "launch",
20
+ "name": "unleash",
21
+ "skipFiles": [
22
+ "<node_internals>/**"
23
+ ],
24
+ "program": "${workspaceFolder}/src/unleash.js",
25
+ "args": [ "unleasb","unleash-flex" ],
26
+ "console": "integratedTerminal"
27
+ }
28
+ ]
29
+ }
@@ -14,9 +14,17 @@ const getCurrentBranchName = async () => {
14
14
  return Object.entries(branchInfo.branches).find(([name, info]) => info.current)[0];
15
15
  };
16
16
  const isProtected = async () => {
17
- const protectedBranches = ['main', 'master', 'development', ...process.argv.slice(2)];
18
17
  const theBranch = await getCurrentBranchName();
19
- return protectedBranches.includes(theBranch);
18
+ const protectedBranches = ['main', 'master', 'development'];
19
+ const additionalProtectedBranches = [...process.argv.slice(2)];
20
+
21
+ // Check if the current branch starts with any of the additional
22
+ // protected branch name
23
+ let matchesAdditionalBranch = false;
24
+ for (let i = 0; i < additionalProtectedBranches.length; i++) {
25
+ matchesAdditionalBranch = matchesAdditionalBranch || theBranch.startsWith(additionalProtectedBranches[i]);
26
+ }
27
+ return protectedBranches.includes(theBranch) || matchesAdditionalBranch;
20
28
  };
21
29
  const npmRunner = async script => {
22
30
  try {
@@ -14,9 +14,17 @@ const getCurrentBranchName = async () => {
14
14
  return Object.entries(branchInfo.branches).find(([name, info]) => info.current)[0];
15
15
  };
16
16
  const isProtected = async () => {
17
- const protectedBranches = ['main', 'master', 'development', ...process.argv.slice(2)];
18
17
  const theBranch = await getCurrentBranchName();
19
- return protectedBranches.includes(theBranch);
18
+ const protectedBranches = ['main', 'master', 'development'];
19
+ const additionalProtectedBranches = [...process.argv.slice(2)];
20
+
21
+ // Check if the current branch starts with any of the additional
22
+ // protected branch name
23
+ let matchesAdditionalBranch = false;
24
+ for (let i = 0; i < additionalProtectedBranches.length; i++) {
25
+ matchesAdditionalBranch = matchesAdditionalBranch || theBranch.startsWith(additionalProtectedBranches[i]);
26
+ }
27
+ return protectedBranches.includes(theBranch) || matchesAdditionalBranch;
20
28
  };
21
29
  const npmRunner = async script => {
22
30
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leverege/build-tools",
3
- "version": "2.23.6",
3
+ "version": "2.24.1",
4
4
  "description": "A collection of build / support tools for Leverege developers",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -71,6 +71,6 @@
71
71
  "@babel/core": "^7.20.12",
72
72
  "@leverege/babel-preset-leverege-node": "^2.0.0",
73
73
  "@leverege/eslint-config-leverege": "^3.0.1",
74
- "npm": "^9.3.1"
74
+ "npm": "^9.4.0"
75
75
  }
76
76
  }
package/src/dockreate CHANGED
@@ -4,6 +4,8 @@ if [ -z "$1" ]; then
4
4
  exit 1
5
5
  fi
6
6
 
7
+ # printf "\n****LOCAL DOCKREATE****\n\n" && sleep 1
8
+
7
9
  # Load common bash functions
8
10
  . `build-tools --bashfun`
9
11
  PKGTOP="$npm_config_local_prefix"
@@ -266,7 +268,7 @@ artifact=$(packageJson '.leverege.artifact') # 'leverege')
266
268
  if [ ! -z "$artifact" ];
267
269
  then
268
270
  imagerepo=us-docker.pkg.dev/leverege-registry
269
- registry=$imagerepo/$artifact/$container/images
271
+ registry=$imagerepo/$artifact/images/$container
270
272
  fi
271
273
 
272
274
  version=$1
package/src/unleash.js CHANGED
@@ -17,9 +17,20 @@ const getCurrentBranchName = async () => {
17
17
  }
18
18
 
19
19
  const isProtected = async () => {
20
- const protectedBranches = [ 'main', 'master', 'development', ...process.argv.slice( 2 ) ]
21
20
  const theBranch = await getCurrentBranchName()
22
- return protectedBranches.includes( theBranch )
21
+
22
+ const protectedBranches = [ 'main', 'master', 'development' ]
23
+ const additionalProtectedBranches = [ ...process.argv.slice( 2 ) ]
24
+
25
+ // Check if the current branch starts with any of the additional
26
+ // protected branch name
27
+ let matchesAdditionalBranch = false
28
+ for ( let i = 0; i < additionalProtectedBranches.length; i++ ) {
29
+ matchesAdditionalBranch = matchesAdditionalBranch ||
30
+ theBranch.startsWith( additionalProtectedBranches[i] )
31
+ }
32
+
33
+ return protectedBranches.includes( theBranch ) || matchesAdditionalBranch
23
34
  }
24
35
 
25
36
  const npmRunner = async ( script ) => {