dceky 1.1.0 → 1.1.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.
- package/lib/setup/genE2ELaunchFile.js +1 -1
- package/lib/setup/genE2ELaunchFile.js.map +1 -1
- package/lib/setup/genTsConfigFile.d.ts +6 -0
- package/lib/setup/genTsConfigFile.js +51 -0
- package/lib/setup/genTsConfigFile.js.map +1 -0
- package/lib/setup/index.js +2 -0
- package/lib/setup/index.js.map +1 -1
- package/lib/src/commands/getCredentialValue.d.ts +1 -3
- package/lib/src/commands/getCredentialValue.js.map +1 -1
- package/lib/src/commands/getProfileValue.d.ts +2 -1
- package/lib/src/commands/getProfileValue.js.map +1 -1
- package/package.json +2 -3
- package/setup/genE2ELaunchFile.ts +1 -1
- package/setup/genTsConfigFile.ts +55 -0
- package/setup/index.ts +2 -0
- package/src/commands/getCredentialValue.ts +1 -3
- package/src/commands/getProfileValue.ts +2 -1
|
@@ -24,7 +24,7 @@ var genE2ELaunchFile = function () {
|
|
|
24
24
|
'// Auto-generated by dceky - do not edit manually',
|
|
25
25
|
'',
|
|
26
26
|
'import commands from \'dceky\';',
|
|
27
|
-
'import \'./kyCommandDeclarations
|
|
27
|
+
'import \'./kyCommandDeclarations\';',
|
|
28
28
|
'import \'../commands\';',
|
|
29
29
|
'',
|
|
30
30
|
'// Make Cypress globally available as "ky"',
|
|
@@ -1 +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,sCAAsC;IACtC,IAAM,SAAS,GAAG,cAAI,CAAC,IAAI,CAAC,IAAI,EAAE,yBAAyB,CAAC,CAAC;IAC7D,IAAI,YAAE,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@ -0,0 +1,51 @@
|
|
|
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
|
+
// Import libs
|
|
7
|
+
var fs_1 = __importDefault(require("fs"));
|
|
8
|
+
var path_1 = __importDefault(require("path"));
|
|
9
|
+
// Import shared helpers
|
|
10
|
+
var getRootPath_1 = __importDefault(require("./helpers/getRootPath"));
|
|
11
|
+
/**
|
|
12
|
+
* Generate the ts.config.json file for Cypress TypeScript support
|
|
13
|
+
* @author Yuen Ler Chow
|
|
14
|
+
*/
|
|
15
|
+
var genTsConfigFile = function () {
|
|
16
|
+
var root = (0, getRootPath_1.default)();
|
|
17
|
+
var outputFile = path_1.default.join(root, 'tsconfig.json');
|
|
18
|
+
if (fs_1.default.existsSync(outputFile)) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
var tsConfig = {
|
|
22
|
+
compilerOptions: {
|
|
23
|
+
module: 'commonjs',
|
|
24
|
+
esModuleInterop: true,
|
|
25
|
+
noImplicitAny: true,
|
|
26
|
+
noEmitOnError: true,
|
|
27
|
+
removeComments: false,
|
|
28
|
+
declaration: true,
|
|
29
|
+
sourceMap: true,
|
|
30
|
+
target: 'es6',
|
|
31
|
+
lib: [
|
|
32
|
+
'DOM',
|
|
33
|
+
'ES5',
|
|
34
|
+
],
|
|
35
|
+
types: [
|
|
36
|
+
'node',
|
|
37
|
+
],
|
|
38
|
+
rootDir: './cypress',
|
|
39
|
+
},
|
|
40
|
+
include: [
|
|
41
|
+
'./cypress',
|
|
42
|
+
],
|
|
43
|
+
'ts-node': {
|
|
44
|
+
files: true,
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
fs_1.default.writeFileSync(outputFile, "".concat(JSON.stringify(tsConfig, null, 2), "\n"));
|
|
48
|
+
return outputFile;
|
|
49
|
+
};
|
|
50
|
+
exports.default = genTsConfigFile;
|
|
51
|
+
//# sourceMappingURL=genTsConfigFile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"genTsConfigFile.js","sourceRoot":"","sources":["../../setup/genTsConfigFile.ts"],"names":[],"mappings":";;;;;AAAA,cAAc;AACd,0CAAoB;AACpB,8CAAwB;AAExB,wBAAwB;AACxB,sEAAgD;AAEhD;;;GAGG;AACH,IAAM,eAAe,GAAG;IACtB,IAAM,IAAI,GAAG,IAAA,qBAAW,GAAE,CAAC;IAC3B,IAAM,UAAU,GAAG,cAAI,CAAC,IAAI,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;IAEpD,IAAI,YAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QAC9B,OAAO;IACT,CAAC;IAED,IAAM,QAAQ,GAAG;QACf,eAAe,EAAE;YACf,MAAM,EAAE,UAAU;YAClB,eAAe,EAAE,IAAI;YACrB,aAAa,EAAE,IAAI;YACnB,aAAa,EAAE,IAAI;YACnB,cAAc,EAAE,KAAK;YACrB,WAAW,EAAE,IAAI;YACjB,SAAS,EAAE,IAAI;YACf,MAAM,EAAE,KAAK;YACb,GAAG,EAAE;gBACH,KAAK;gBACL,KAAK;aACN;YACD,KAAK,EAAE;gBACL,MAAM;aACP;YACD,OAAO,EAAE,WAAW;SACrB;QACD,OAAO,EAAE;YACP,WAAW;SACZ;QACD,SAAS,EAAE;YACT,KAAK,EAAE,IAAI;SACZ;KACF,CAAC;IAEF,YAAE,CAAC,aAAa,CACd,UAAU,EACV,UAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,OAAI,CACzC,CAAC;IAEF,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC;AAEF,kBAAe,eAAe,CAAC"}
|
package/lib/setup/index.js
CHANGED
|
@@ -10,6 +10,7 @@ var setupCypressDependencies_1 = __importDefault(require("./setupCypressDependen
|
|
|
10
10
|
var checkRequiredFiles_1 = __importDefault(require("./checkRequiredFiles"));
|
|
11
11
|
var genE2ELaunchFile_1 = __importDefault(require("./genE2ELaunchFile"));
|
|
12
12
|
var genKyCommandDeclarations_1 = __importDefault(require("./genKyCommandDeclarations"));
|
|
13
|
+
var genTsConfigFile_1 = __importDefault(require("./genTsConfigFile"));
|
|
13
14
|
(0, setupCypressDependencies_1.default)();
|
|
14
15
|
(0, checkRequiredFiles_1.default)();
|
|
15
16
|
(0, genCommandImportFile_1.default)();
|
|
@@ -17,4 +18,5 @@ var genKyCommandDeclarations_1 = __importDefault(require("./genKyCommandDeclarat
|
|
|
17
18
|
(0, addToGitIgnore_1.default)();
|
|
18
19
|
(0, genE2ELaunchFile_1.default)();
|
|
19
20
|
(0, genKyCommandDeclarations_1.default)();
|
|
21
|
+
(0, genTsConfigFile_1.default)();
|
|
20
22
|
//# sourceMappingURL=index.js.map
|
package/lib/setup/index.js.map
CHANGED
|
@@ -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;AACtD,wEAAkD;AAClD,wFAAkE;
|
|
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;AAClD,wFAAkE;AAClE,sEAAgD;AAEhD,IAAA,kCAAwB,GAAE,CAAC;AAC3B,IAAA,4BAAkB,GAAE,CAAC;AACrB,IAAA,8BAAoB,GAAE,CAAC;AACvB,IAAA,8BAAoB,GAAE,CAAC;AACvB,IAAA,wBAAc,GAAE,CAAC;AACjB,IAAA,0BAAgB,GAAE,CAAC;AACnB,IAAA,kCAAwB,GAAE,CAAC;AAC3B,IAAA,yBAAe,GAAE,CAAC"}
|
|
@@ -2,9 +2,7 @@ declare global {
|
|
|
2
2
|
namespace Cypress {
|
|
3
3
|
interface Chainable {
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
* Obtains a credential value from the Cypress env depending on
|
|
7
|
-
* the provided key.
|
|
5
|
+
* Get a credential from GlobalCredentials
|
|
8
6
|
* @author Allison Zhang
|
|
9
7
|
* @param key the key of the environment variable to retrieve
|
|
10
8
|
* @return The value of the specified environment variable
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getCredentialValue.js","sourceRoot":"","sources":["../../../src/commands/getCredentialValue.ts"],"names":[],"mappings":";AAAA,iCAAiC;;
|
|
1
|
+
{"version":3,"file":"getCredentialValue.js","sourceRoot":"","sources":["../../../src/commands/getCredentialValue.ts"],"names":[],"mappings":";AAAA,iCAAiC;;AAuBjC,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,IAAM,kBAAkB,GAAG;IACzB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAClB,oBAAoB,EACpB,UAAC,GAAG;QACF,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,UAAC,EAAgB;gBAAd,KAAC,GAAI,EAAE,KAAK,SAAA;YACvC,OAAO,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACxB,CAAC,CAAC,CAAC;IACL,CAAC,CACF,CAAC;AACJ,CAAC,CAAC;AAEF,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,kBAAe,kBAAkB,CAAC"}
|
|
@@ -2,7 +2,8 @@ declare global {
|
|
|
2
2
|
namespace Cypress {
|
|
3
3
|
interface Chainable {
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Get a (non-credential) value from the current profile,
|
|
6
|
+
* GlobalValues, or GlobalResources
|
|
6
7
|
* @author Allison Zhang
|
|
7
8
|
* @param key the key of the environment variable to retrieve
|
|
8
9
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getProfileValue.js","sourceRoot":"","sources":["../../../src/commands/getProfileValue.ts"],"names":[],"mappings":";AAAA,iCAAiC;;
|
|
1
|
+
{"version":3,"file":"getProfileValue.js","sourceRoot":"","sources":["../../../src/commands/getProfileValue.ts"],"names":[],"mappings":";AAAA,iCAAiC;;AAsBjC,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,IAAM,eAAe,GAAG;IACtB,EAAE,CAAC,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC;AACtC,CAAC,CAAC;AAEF,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,kBAAe,eAAe,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dceky",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Cypress toolkit for Harvard DCE",
|
|
5
5
|
"main": "./lib/src/index.js",
|
|
6
6
|
"types": "./lib/src/index.d.ts",
|
|
@@ -30,7 +30,6 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@types/clear": "^0.1.4",
|
|
32
32
|
"@types/ejs": "^3.1.5",
|
|
33
|
-
"@types/node": "^22.7.0",
|
|
34
33
|
"@types/prompt-sync": "^4.2.3",
|
|
35
34
|
"child_process": "^1.0.2",
|
|
36
35
|
"clear": "^0.1.0",
|
|
@@ -41,7 +40,7 @@
|
|
|
41
40
|
},
|
|
42
41
|
"devDependencies": {
|
|
43
42
|
"@types/deepmerge": "2.1.0",
|
|
44
|
-
"@types/node": "^24.
|
|
43
|
+
"@types/node": "^24.12.2",
|
|
45
44
|
"cross-env": "^10.1.0",
|
|
46
45
|
"eslint": "^8.42.0",
|
|
47
46
|
"eslint-config-airbnb": "^19.0.4",
|
|
@@ -23,7 +23,7 @@ const genE2ELaunchFile = (): string => {
|
|
|
23
23
|
'// Auto-generated by dceky - do not edit manually',
|
|
24
24
|
'',
|
|
25
25
|
'import commands from \'dceky\';',
|
|
26
|
-
'import \'./kyCommandDeclarations
|
|
26
|
+
'import \'./kyCommandDeclarations\';',
|
|
27
27
|
'import \'../commands\';',
|
|
28
28
|
'',
|
|
29
29
|
'// Make Cypress globally available as "ky"',
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// Import libs
|
|
2
|
+
import fs from 'fs';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
|
|
5
|
+
// Import shared helpers
|
|
6
|
+
import getRootPath from './helpers/getRootPath';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Generate the ts.config.json file for Cypress TypeScript support
|
|
10
|
+
* @author Yuen Ler Chow
|
|
11
|
+
*/
|
|
12
|
+
const genTsConfigFile = () => {
|
|
13
|
+
const root = getRootPath();
|
|
14
|
+
const outputFile = path.join(root, 'tsconfig.json');
|
|
15
|
+
|
|
16
|
+
if (fs.existsSync(outputFile)) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const tsConfig = {
|
|
21
|
+
compilerOptions: {
|
|
22
|
+
module: 'commonjs',
|
|
23
|
+
esModuleInterop: true,
|
|
24
|
+
noImplicitAny: true,
|
|
25
|
+
noEmitOnError: true,
|
|
26
|
+
removeComments: false,
|
|
27
|
+
declaration: true,
|
|
28
|
+
sourceMap: true,
|
|
29
|
+
target: 'es6',
|
|
30
|
+
lib: [
|
|
31
|
+
'DOM',
|
|
32
|
+
'ES5',
|
|
33
|
+
],
|
|
34
|
+
types: [
|
|
35
|
+
'node',
|
|
36
|
+
],
|
|
37
|
+
rootDir: './cypress',
|
|
38
|
+
},
|
|
39
|
+
include: [
|
|
40
|
+
'./cypress',
|
|
41
|
+
],
|
|
42
|
+
'ts-node': {
|
|
43
|
+
files: true,
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
fs.writeFileSync(
|
|
48
|
+
outputFile,
|
|
49
|
+
`${JSON.stringify(tsConfig, null, 2)}\n`,
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
return outputFile;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export default genTsConfigFile;
|
package/setup/index.ts
CHANGED
|
@@ -5,6 +5,7 @@ import setupCypressDependencies from './setupCypressDependencies';
|
|
|
5
5
|
import checkRequiredFiles from './checkRequiredFiles';
|
|
6
6
|
import genE2ELaunchFile from './genE2ELaunchFile';
|
|
7
7
|
import genKyCommandDeclarations from './genKyCommandDeclarations';
|
|
8
|
+
import genTsConfigFile from './genTsConfigFile';
|
|
8
9
|
|
|
9
10
|
setupCypressDependencies();
|
|
10
11
|
checkRequiredFiles();
|
|
@@ -13,3 +14,4 @@ genDynamicConfigFile();
|
|
|
13
14
|
addToGitIgnore();
|
|
14
15
|
genE2ELaunchFile();
|
|
15
16
|
genKyCommandDeclarations();
|
|
17
|
+
genTsConfigFile();
|
|
@@ -8,9 +8,7 @@ declare global {
|
|
|
8
8
|
namespace Cypress {
|
|
9
9
|
interface Chainable {
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
* Obtains a credential value from the Cypress env depending on
|
|
13
|
-
* the provided key.
|
|
11
|
+
* Get a credential from GlobalCredentials
|
|
14
12
|
* @author Allison Zhang
|
|
15
13
|
* @param key the key of the environment variable to retrieve
|
|
16
14
|
* @return The value of the specified environment variable
|
|
@@ -8,7 +8,8 @@ declare global {
|
|
|
8
8
|
namespace Cypress {
|
|
9
9
|
interface Chainable {
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* Get a (non-credential) value from the current profile,
|
|
12
|
+
* GlobalValues, or GlobalResources
|
|
12
13
|
* @author Allison Zhang
|
|
13
14
|
* @param key the key of the environment variable to retrieve
|
|
14
15
|
*/
|