dceky 1.0.4-beta.new-divided-export.3 → 1.0.4-beta.new-divided-export.4

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,7 @@
1
+ /**
2
+ * Generate the launch file for end to end tests
3
+ * @author Gabe Abrams
4
+ * @author Yuen Ler Chow
5
+ */
6
+ declare const genE2ELaunchFile: () => string;
7
+ export default genE2ELaunchFile;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ var fs_1 = __importDefault(require("fs"));
7
+ var path_1 = __importDefault(require("path"));
8
+ var getRootPath_1 = __importDefault(require("./helpers/getRootPath"));
9
+ /**
10
+ * Generate the launch file for end to end tests
11
+ * @author Gabe Abrams
12
+ * @author Yuen Ler Chow
13
+ */
14
+ var genE2ELaunchFile = function () {
15
+ var root = (0, getRootPath_1.default)();
16
+ var outputFile = path_1.default.join(root, '/cypress/support/e2e.ts');
17
+ // Create the dynamic configuration file
18
+ var launchFile = [
19
+ '// Auto-generated by dceky - do not edit manually',
20
+ '',
21
+ 'import \'dceky\';',
22
+ 'import \'../commands\';',
23
+ ].join('\n');
24
+ // Write the configuration file directly
25
+ fs_1.default.writeFileSync(outputFile, launchFile, 'utf8');
26
+ return outputFile;
27
+ };
28
+ exports.default = genE2ELaunchFile;
29
+ //# sourceMappingURL=genE2ELaunchFile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"genE2ELaunchFile.js","sourceRoot":"","sources":["../../setup/genE2ELaunchFile.ts"],"names":[],"mappings":";;;;;AAAA,0CAAoB;AACpB,8CAAwB;AACxB,sEAAgD;AAEhD;;;;GAIG;AACH,IAAM,gBAAgB,GAAG;IACvB,IAAM,IAAI,GAAG,IAAA,qBAAW,GAAE,CAAC;IAE3B,IAAM,UAAU,GAAG,cAAI,CAAC,IAAI,CAAC,IAAI,EAAE,yBAAyB,CAAC,CAAC;IAE9D,wCAAwC;IACxC,IAAM,UAAU,GAAG;QACjB,mDAAmD;QACnD,EAAE;QACF,mBAAmB;QACnB,yBAAyB;KAC1B,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEb,wCAAwC;IACxC,YAAE,CAAC,aAAa,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;IAEjD,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC;AAEF,kBAAe,gBAAgB,CAAC"}
@@ -8,9 +8,11 @@ var genDynamicConfigFile_1 = __importDefault(require("./genDynamicConfigFile"));
8
8
  var addToGitIgnore_1 = __importDefault(require("./addToGitIgnore"));
9
9
  var setupCypressDependencies_1 = __importDefault(require("./setupCypressDependencies"));
10
10
  var checkRequiredFiles_1 = __importDefault(require("./checkRequiredFiles"));
11
+ var genE2ELaunchFile_1 = __importDefault(require("./genE2ELaunchFile"));
11
12
  (0, checkRequiredFiles_1.default)();
12
13
  (0, genCommandImportFile_1.default)();
13
14
  (0, genDynamicConfigFile_1.default)();
14
15
  (0, addToGitIgnore_1.default)();
15
16
  (0, setupCypressDependencies_1.default)();
17
+ (0, genE2ELaunchFile_1.default)();
16
18
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../setup/index.ts"],"names":[],"mappings":";;;;;AAAA,gFAA0D;AAC1D,gFAA0D;AAC1D,oEAA8C;AAC9C,wFAAkE;AAClE,4EAAsD;AAEtD,IAAA,4BAAkB,GAAE,CAAC;AACrB,IAAA,8BAAoB,GAAE,CAAC;AACvB,IAAA,8BAAoB,GAAE,CAAC;AACvB,IAAA,wBAAc,GAAE,CAAC;AACjB,IAAA,kCAAwB,GAAE,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../setup/index.ts"],"names":[],"mappings":";;;;;AAAA,gFAA0D;AAC1D,gFAA0D;AAC1D,oEAA8C;AAC9C,wFAAkE;AAClE,4EAAsD;AACtD,wEAAkD;AAElD,IAAA,4BAAkB,GAAE,CAAC;AACrB,IAAA,8BAAoB,GAAE,CAAC;AACvB,IAAA,8BAAoB,GAAE,CAAC;AACvB,IAAA,wBAAc,GAAE,CAAC;AACjB,IAAA,kCAAwB,GAAE,CAAC;AAC3B,IAAA,0BAAgB,GAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dceky",
3
- "version": "1.0.4-beta.new-divided-export.3",
3
+ "version": "1.0.4-beta.new-divided-export.4",
4
4
  "description": "Cypress toolkit for Harvard DCE",
5
5
  "main": "./lib/src/index.js",
6
6
  "types": "./lib/src/index.d.ts",
@@ -0,0 +1,29 @@
1
+ import fs from 'fs';
2
+ import path from 'path';
3
+ import getRootPath from './helpers/getRootPath';
4
+
5
+ /**
6
+ * Generate the launch file for end to end tests
7
+ * @author Gabe Abrams
8
+ * @author Yuen Ler Chow
9
+ */
10
+ const genE2ELaunchFile = (): string => {
11
+ const root = getRootPath();
12
+
13
+ const outputFile = path.join(root, '/cypress/support/e2e.ts');
14
+
15
+ // Create the dynamic configuration file
16
+ const launchFile = [
17
+ '// Auto-generated by dceky - do not edit manually',
18
+ '',
19
+ 'import \'dceky\';',
20
+ 'import \'../commands\';',
21
+ ].join('\n');
22
+
23
+ // Write the configuration file directly
24
+ fs.writeFileSync(outputFile, launchFile, 'utf8');
25
+
26
+ return outputFile;
27
+ };
28
+
29
+ export default genE2ELaunchFile;
package/setup/index.ts CHANGED
@@ -3,9 +3,11 @@ import genDynamicConfigFile from './genDynamicConfigFile';
3
3
  import addToGitIgnore from './addToGitIgnore';
4
4
  import setupCypressDependencies from './setupCypressDependencies';
5
5
  import checkRequiredFiles from './checkRequiredFiles';
6
+ import genE2ELaunchFile from './genE2ELaunchFile';
6
7
 
7
8
  checkRequiredFiles();
8
9
  genCommandImportFile();
9
10
  genDynamicConfigFile();
10
11
  addToGitIgnore();
11
12
  setupCypressDependencies();
13
+ genE2ELaunchFile();