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

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,32 @@
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 commands from \'dceky\';',
22
+ 'import \'../commands\';',
23
+ '',
24
+ 'commands();',
25
+ '',
26
+ ].join('\n');
27
+ // Write the configuration file directly
28
+ fs_1.default.writeFileSync(outputFile, launchFile, 'utf8');
29
+ return outputFile;
30
+ };
31
+ exports.default = genE2ELaunchFile;
32
+ //# 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,iCAAiC;QACjC,yBAAyB;QACzB,EAAE;QACF,aAAa;QACb,EAAE;KACH,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"}
@@ -1,6 +1,2 @@
1
- /**
2
- * Dummy function to make sure this file doesn't get pruned
3
- * @author Gabe Abrams
4
- */
5
- declare const index: () => never;
6
- export default index;
1
+ declare const _default: void;
2
+ export default _default;
package/lib/src/index.js CHANGED
@@ -5,14 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  // Import helpers
7
7
  var commands_1 = __importDefault(require("./commands"));
8
- // Initialize commands upon import
8
+ // Initialize commands
9
9
  (0, commands_1.default)();
10
- /**
11
- * Dummy function to make sure this file doesn't get pruned
12
- * @author Gabe Abrams
13
- */
14
- var index = function () {
15
- throw new Error('You don\'t need to call dceky\'s main export. Initialization automatically occurs');
16
- };
17
- exports.default = index;
10
+ exports.default = (0, commands_1.default)();
18
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;AAAA,iBAAiB;AACjB,wDAAkC;AAElC,kCAAkC;AAClC,IAAA,kBAAQ,GAAE,CAAC;AAEX;;;GAGG;AACH,IAAM,KAAK,GAAG;IACZ,MAAM,IAAI,KAAK,CAAC,mFAAmF,CAAC,CAAC;AACvG,CAAC,CAAC;AAEF,kBAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;AAAA,iBAAiB;AACjB,wDAAkC;AAElC,sBAAsB;AACtB,IAAA,kBAAQ,GAAE,CAAC;AAEX,kBAAe,IAAA,kBAAQ,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.5",
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,32 @@
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 commands from \'dceky\';',
20
+ 'import \'../commands\';',
21
+ '',
22
+ 'commands();',
23
+ '',
24
+ ].join('\n');
25
+
26
+ // Write the configuration file directly
27
+ fs.writeFileSync(outputFile, launchFile, 'utf8');
28
+
29
+ return outputFile;
30
+ };
31
+
32
+ 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();
package/src/index.ts CHANGED
@@ -1,15 +1,7 @@
1
1
  // Import helpers
2
2
  import commands from './commands';
3
3
 
4
- // Initialize commands upon import
4
+ // Initialize commands
5
5
  commands();
6
6
 
7
- /**
8
- * Dummy function to make sure this file doesn't get pruned
9
- * @author Gabe Abrams
10
- */
11
- const index = () => {
12
- throw new Error('You don\'t need to call dceky\'s main export. Initialization automatically occurs');
13
- };
14
-
15
- export default index;
7
+ export default commands();