cob-cli 2.43.0 → 2.43.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.
@@ -26,6 +26,8 @@ exports.testEquality = testEquality;
26
26
  async function _syncFiles(executionType, cmdEnv, from, to, extraOptions = [], args = []) {
27
27
  let changes = [];
28
28
  let products = cmdEnv.products.length ? cmdEnv.products : COB_PRODUCTS;
29
+ // we need to recheck, because it can exist in head but not in the commit we're testing
30
+ let hasRsyncFilter = cmdEnv.rsyncFilter && fs.lstatSync(cmdEnv.rsyncFilter, {throwIfNoEntry: false})?.isFile();
29
31
  let requests = products.map(product => {
30
32
  return new Promise(async (resolve, reject) => {
31
33
  let fromPath = resolveCobPath(cmdEnv.server, from, product);
@@ -52,7 +54,7 @@ async function _syncFiles(executionType, cmdEnv, from, to, extraOptions = [], ar
52
54
  "--chmod=g+w",
53
55
  "--perms",
54
56
  "--filter='merge " + path.resolve(__dirname,"rsyncFilter-pre.txt") + "'",
55
- cmdEnv.rsyncFilter ? "--filter='merge " + cmdEnv.rsyncFilter + "'" : "",
57
+ hasRsyncFilter ? "--filter='merge " + cmdEnv.rsyncFilter + "'" : "",
56
58
  "--filter='merge " + path.resolve(__dirname,"rsyncFilter-post.txt") + "'",
57
59
  executionType == _syncFiles.COPY ? "-v" : "--dry-run"
58
60
  ].concat(productExtraOptions),
@@ -101,7 +103,7 @@ async function _syncFiles(executionType, cmdEnv, from, to, extraOptions = [], ar
101
103
  reject(new Error(err));;
102
104
  } else {
103
105
  if (args.verbose > 1)
104
- console.log("warning".yellow + "rsync '" + (product).blue + "': attempt " + (count + 1) + " failed with code " + err.exitCode);
106
+ console.log("warning".yellow + " rsync '" + (product).blue + "': attempt " + (count + 1) + " failed with code " + err.exitCode);
105
107
  }
106
108
  });
107
109
  count++;
@@ -18,7 +18,7 @@ function validateDeployConditions(cmdEnv, args) {
18
18
  { title: "find out SHA for last-deploy on specified server", skip: () => args.force, task: (ctx) => getLastDeployedSha(cmdEnv.server).then(lastSha => _handleGetLastDeployedSha(ctx, cmdEnv, lastSha)) },
19
19
  { title: "git checkout SHA-for-last-deploy", skip: ctx => args.force || !ctx.lastSha, task: (ctx) => git().checkout(ctx.lastSha) },
20
20
  { title: "Apply last enviroment specifics".bold, skip: ctx => args.force || !ctx.lastSha, task: () => cmdEnv.applyLastEnvironmentDeployedToServerChanges() },
21
- { title: "Check last-deploy == serverLive".bold, skip: ctx => args.force || !ctx.lastSha, task: (ctx) => testEquality(cmdEnv, "localCopy", "serverLive").then( changes => _handleTestEquality(ctx, changes)) },
21
+ { title: "Check last-deploy == serverLive".bold, skip: ctx => args.force || !ctx.lastSha, task: (ctx) => testEquality(cmdEnv, "localCopy", "serverLive", args).then( changes => _handleTestEquality(ctx, changes)) },
22
22
  { title: "Undo last enviroment specifics".bold, skip: ctx => args.force || !ctx.lastSha, task: () => cmdEnv.unApplyLastEnvironmentDeployedToServerChanges() },
23
23
  { title: "git checkout branch-for-HEAD", skip: ctx => args.force || !ctx.lastSha, task: (ctx) => git().checkout(ctx.currentBranch) },
24
24
  { title: "report problems", enabled: ctx => ctx.err, task: (ctx) => {throw new Error(ctx.err)} },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cob-cli",
3
- "version": "2.43.0",
3
+ "version": "2.43.1",
4
4
  "description": "A command line utility to help Cult of Bits partners develop with higher speed and reusing common code and best practices.",
5
5
  "preferGlobal": true,
6
6
  "repository": {
@@ -1,32 +0,0 @@
1
- {
2
- "date": "2023-10-19T08:52:33.010Z",
3
- "argv": [
4
- "/Users/jnelas/.nvm/versions/node/v16.18.0/bin/node",
5
- "/Users/jnelas/reps/cob/cob-cli/test/test_common_environmentHandler.js"
6
- ],
7
- "execArgv": [
8
- "--loader=file:///Users/jnelas/reps/cob/cob-cli/node_modules/@isaacs/ts-node-temp-fork-for-pr-2009/esm.mjs",
9
- "--loader=file:///Users/jnelas/reps/cob/cob-cli/node_modules/@tapjs/mock/dist/esm/legacy-loader.mjs",
10
- "--no-warnings",
11
- "--enable-source-maps",
12
- "--loader=file:///Users/jnelas/reps/cob/cob-cli/node_modules/@tapjs/processinfo/dist/esm/loader-legacy.mjs"
13
- ],
14
- "NODE_OPTIONS": "\"--loader=file:///Users/jnelas/reps/cob/cob-cli/node_modules/@tapjs/processinfo/dist/esm/loader-legacy.mjs\" \"--no-warnings\"",
15
- "cwd": "/Users/jnelas/reps/cob/cob-cli",
16
- "pid": 12082,
17
- "ppid": 12080,
18
- "parent": null,
19
- "uuid": "0db03a1d-f054-4ba8-9873-7efb81723721",
20
- "files": [
21
- "/Users/jnelas/reps/cob/cob-cli/test/test_common_environmentHandler.js",
22
- "/Users/jnelas/reps/cob/cob-cli/lib/task_lists/common_enviromentHandler.js",
23
- "/Users/jnelas/reps/cob/cob-cli/lib/task_lists/common_releaseManager.js",
24
- "/Users/jnelas/reps/cob/cob-cli/lib/task_lists/common_helpers.js"
25
- ],
26
- "sources": {},
27
- "root": "0db03a1d-f054-4ba8-9873-7efb81723721",
28
- "externalID": "test/test_common_environmentHandler.js",
29
- "code": 0,
30
- "signal": null,
31
- "runtime": 1840.771843
32
- }
@@ -1,38 +0,0 @@
1
- {
2
- "date": "2023-10-19T08:52:33.000Z",
3
- "argv": [
4
- "/Users/jnelas/.nvm/versions/node/v16.18.0/bin/node",
5
- "/Users/jnelas/reps/cob/cob-cli/lib/commands/test.js"
6
- ],
7
- "execArgv": [
8
- "--loader=file:///Users/jnelas/reps/cob/cob-cli/node_modules/@isaacs/ts-node-temp-fork-for-pr-2009/esm.mjs",
9
- "--loader=file:///Users/jnelas/reps/cob/cob-cli/node_modules/@tapjs/mock/dist/esm/legacy-loader.mjs",
10
- "--no-warnings",
11
- "--enable-source-maps",
12
- "--loader=file:///Users/jnelas/reps/cob/cob-cli/node_modules/@tapjs/processinfo/dist/esm/loader-legacy.mjs"
13
- ],
14
- "NODE_OPTIONS": "\"--loader=file:///Users/jnelas/reps/cob/cob-cli/node_modules/@tapjs/processinfo/dist/esm/loader-legacy.mjs\" \"--no-warnings\"",
15
- "cwd": "/Users/jnelas/reps/cob/cob-cli",
16
- "pid": 12081,
17
- "ppid": 12080,
18
- "parent": null,
19
- "uuid": "9d97e24f-ae90-4c49-af20-075bbcc46260",
20
- "files": [
21
- "/Users/jnelas/reps/cob/cob-cli/lib/commands/test.js",
22
- "/Users/jnelas/reps/cob/cob-cli/lib/task_lists/test_validate.js",
23
- "/Users/jnelas/reps/cob/cob-cli/lib/task_lists/common_helpers.js",
24
- "/Users/jnelas/reps/cob/cob-cli/lib/task_lists/common_releaseManager.js",
25
- "/Users/jnelas/reps/cob/cob-cli/lib/task_lists/common_syncFiles.js",
26
- "/Users/jnelas/reps/cob/cob-cli/lib/task_lists/test_otherFilesContiousReload.js",
27
- "/Users/jnelas/reps/cob/cob-cli/lib/task_lists/test_syncFile.js",
28
- "/Users/jnelas/reps/cob/cob-cli/lib/task_lists/test_customUIsContinuosReload.js",
29
- "/Users/jnelas/reps/cob/cob-cli/lib/task_lists/common_enviromentHandler.js",
30
- "/Users/jnelas/reps/cob/cob-cli/lib/commands/upgradeRepo.js"
31
- ],
32
- "sources": {},
33
- "root": "9d97e24f-ae90-4c49-af20-075bbcc46260",
34
- "externalID": "lib/commands/test.js",
35
- "code": 0,
36
- "signal": null,
37
- "runtime": 290.537245
38
- }
package/.tap/repl_history DELETED
@@ -1,2 +0,0 @@
1
- f
2
- w
File without changes
@@ -1 +0,0 @@
1
- [CoB] Starting live-reload
@@ -1,40 +0,0 @@
1
- TAP version 14
2
- # Subtest: smoke
3
- ok 1 - should match pattern
4
- 1..1
5
- ok 1 - smoke # time=33.202ms
6
-
7
- # Subtest: there's an ENV file, but no default
8
- ok 1 - should match pattern
9
- ok 2 - should be equal
10
- ok 3 - should match pattern
11
- ok 4 - should match pattern
12
- ok 5 - should be equal
13
- 1..5
14
- ok 2 - there's an ENV file, but no default # time=266.343ms
15
-
16
- # Subtest: there's an ENV and a default
17
- ok 1 - should match pattern
18
- ok 2 - should match pattern
19
- ok 3 - should match pattern
20
- ok 4 - should be equal
21
- 1..4
22
- ok 3 - there's an ENV and a default # time=411.658ms
23
-
24
- # Subtest: there's multiple ENVs but no default
25
- ok 1 - should match pattern
26
- ok 2 - should match pattern
27
- ok 3 - should match pattern
28
- ok 4 - should be equal
29
- 1..4
30
- ok 4 - there's multiple ENVs but no default # time=274.577ms
31
-
32
- # Subtest: there's multiple ENVs and a default
33
- ok 1 - should match pattern
34
- ok 2 - should match pattern
35
- ok 3 - should match pattern
36
- ok 4 - should be equal
37
- 1..4
38
- ok 5 - there's multiple ENVs and a default # time=403.779ms
39
-
40
- 1..5