@suffolklitlab/alkiln 5.4.1-feat-github-server-16 → 5.4.1-feat-github-server-18

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.
@@ -79,7 +79,7 @@ jobs:
79
79
  DOCASSEMBLE_DEVELOPER_API_KEY: "${{ steps.github_server.outputs.DOCASSEMBLE_DEVELOPER_API_KEY }}"
80
80
  INSTALL_METHOD: "server"
81
81
  # TODO: See what happens if this is an empty string
82
- ALKILN_VERSION: "5.4.1-feat-github-server-16"
82
+ ALKILN_VERSION: "server"
83
83
  ALKILN_TAG_EXPRESSION: "@al1"
84
84
  - run: echo "Finished running ALKiln tests"
85
85
 
@@ -2,8 +2,6 @@
2
2
 
3
3
  const session_vars = require('../utils/session_vars');
4
4
  const log = require('../utils/log');
5
- // const path = require('path');
6
- // const fs = require('fs');
7
5
  const fg = require('fast-glob');
8
6
 
9
7
  const server_install = async () => {
@@ -18,23 +16,25 @@ const server_install = async () => {
18
16
  onlyDirectories: true
19
17
  }
20
18
  );
21
- console.log(`\n===========\n${dirs}\n===========\n`);
22
19
 
23
- let chosen_dir = dirs[0];
24
- if ( dirs.length === 0 ) {
20
+ let folders = dirs.map(function (dir) { return dir.split('/').pop(); })
21
+
22
+ let chosen_folder = folders[0];
23
+ if ( folders.length === 0 ) {
25
24
  let msg = `There are 0 folders at ${path}. Tests won't run.`;
26
25
  log.error({ type: `setup`, data: msg })
27
26
  throw new ReferenceError( msg );
28
27
  }
29
28
 
30
- if ( dirs.length > 1 ) {
29
+ if ( folders.length > 1 ) {
31
30
  log.warn({
32
31
  type: `setup`,
33
- data: `There are ${dirs.length} folders at ${path}: "${dirs.join('", ')}". ALKiln chose to use the folder "${chosen_dir}".`
32
+ data: `There are ${folders.length} folders at ${path}: "${folders.join('", "')}". ALKiln chose to use the folder "${chosen_folder}".`
34
33
  })
35
34
  }
36
35
 
37
- session_vars.save_repo_folder_name( chosen_dir );
36
+ console.log(`\n===========\nchosen_folder: ${chosen_folder}\n===========\n`);
37
+ session_vars.save_repo_folder_name( chosen_folder );
38
38
  }; // Ends server_install();
39
39
 
40
40
  server_install();
@@ -253,7 +253,7 @@ session_vars.save_repo_folder_name = function (repo_folder_name) {
253
253
 
254
254
  // Get the json, changing it, and re-write the file from scratch
255
255
  let json = JSON.parse( fs.readFileSync( runtime_config_path ) );
256
- json[ da_repo_folder_name ] = repo_folder_name;
256
+ json[ repo_folder_key ] = repo_folder_name;
257
257
  let file = fs.writeFileSync( runtime_config_path, JSON.stringify( json, null, 2 ) );
258
258
 
259
259
  return file;
@@ -263,7 +263,7 @@ session_vars.get_repo_folder_name = function () {
263
263
  /** Get the name of the main folder in the repository. */
264
264
  try {
265
265
  let json = JSON.parse( fs.readFileSync( runtime_config_path ));
266
- let name = json[ da_repo_folder_name ];
266
+ let name = json[ repo_folder_key ];
267
267
 
268
268
  return name;
269
269
  } catch ( error ) {
@@ -303,7 +303,7 @@ session_vars.set_sources_paths = function ( paths ) {
303
303
  // Warn about missing paths
304
304
  if ( missing_paths.length > 0 ) {
305
305
  console.warn(
306
- `ALKiln WARNING: ALKiln can't find folders at "${ paths.join(", ") }".`
306
+ `ALKiln WARNING: ALKiln can't find folders at "${ paths.join('", "') }".`
307
307
  );
308
308
  }
309
309
 
@@ -313,6 +313,10 @@ session_vars.set_sources_paths = function ( paths ) {
313
313
  return false;
314
314
  }
315
315
 
316
+ console.info(
317
+ `ALKiln info: Did find "sources" folder(s) at "${ existing_paths.join('", "') }".`
318
+ )
319
+
316
320
  // Otherwise, store valid paths
317
321
  session_vars._sources_paths = existing_paths;
318
322
  return true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@suffolklitlab/alkiln",
3
- "version": "5.4.1-feat-github-server-16",
3
+ "version": "5.4.1-feat-github-server-18",
4
4
  "description": "Integrated automated end-to-end testing with docassemble, puppeteer, and cucumber.",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {