electron-forge
Version:
A complete tool for building modern Electron applications
1,527 lines (1,526 loc) • 390 kB
JSON
{
"type": "File",
"start": 0,
"end": 2201,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 74,
"column": 0
}
},
"program": {
"type": "Program",
"start": 0,
"end": 2201,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 74,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 16
}
},
"specifiers": [],
"source": {
"type": "StringLiteral",
"start": 7,
"end": 15,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 15
}
},
"extra": {
"rawValue": "colors",
"raw": "'colors'"
},
"value": "colors"
}
},
{
"type": "ImportDeclaration",
"start": 17,
"end": 43,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 26
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 24,
"end": 29,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 12
}
},
"local": {
"type": "Identifier",
"start": 24,
"end": 29,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 12
},
"identifierName": "debug"
},
"name": "debug"
}
}
],
"source": {
"type": "StringLiteral",
"start": 35,
"end": 42,
"loc": {
"start": {
"line": 2,
"column": 18
},
"end": {
"line": 2,
"column": 25
}
},
"extra": {
"rawValue": "debug",
"raw": "'debug'"
},
"value": "debug"
}
},
{
"type": "ImportDeclaration",
"start": 44,
"end": 98,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 54
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 53,
"end": 76,
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 32
}
},
"imported": {
"type": "Identifier",
"start": 53,
"end": 58,
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 14
},
"identifierName": "spawn"
},
"name": "spawn"
},
"local": {
"type": "Identifier",
"start": 62,
"end": 76,
"loc": {
"start": {
"line": 3,
"column": 18
},
"end": {
"line": 3,
"column": 32
},
"identifierName": "yarnOrNPMSpawn"
},
"name": "yarnOrNPMSpawn"
}
}
],
"source": {
"type": "StringLiteral",
"start": 84,
"end": 97,
"loc": {
"start": {
"line": 3,
"column": 40
},
"end": {
"line": 3,
"column": 53
}
},
"extra": {
"rawValue": "yarn-or-npm",
"raw": "'yarn-or-npm'"
},
"value": "yarn-or-npm"
}
},
{
"type": "ImportDeclaration",
"start": 100,
"end": 143,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 43
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 107,
"end": 115,
"loc": {
"start": {
"line": 5,
"column": 7
},
"end": {
"line": 5,
"column": 15
}
},
"local": {
"type": "Identifier",
"start": 107,
"end": 115,
"loc": {
"start": {
"line": 5,
"column": 7
},
"end": {
"line": 5,
"column": 15
},
"identifierName": "asyncOra"
},
"name": "asyncOra"
}
}
],
"source": {
"type": "StringLiteral",
"start": 121,
"end": 142,
"loc": {
"start": {
"line": 5,
"column": 21
},
"end": {
"line": 5,
"column": 42
}
},
"extra": {
"rawValue": "../util/ora-handler",
"raw": "'../util/ora-handler'"
},
"value": "../util/ora-handler"
}
},
{
"type": "ImportDeclaration",
"start": 144,
"end": 189,
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 45
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 151,
"end": 161,
"loc": {
"start": {
"line": 6,
"column": 7
},
"end": {
"line": 6,
"column": 17
}
},
"local": {
"type": "Identifier",
"start": 151,
"end": 161,
"loc": {
"start": {
"line": 6,
"column": 7
},
"end": {
"line": 6,
"column": 17
},
"identifierName": "resolveDir"
},
"name": "resolveDir"
}
}
],
"source": {
"type": "StringLiteral",
"start": 167,
"end": 188,
"loc": {
"start": {
"line": 6,
"column": 23
},
"end": {
"line": 6,
"column": 44
}
},
"extra": {
"rawValue": "../util/resolve-dir",
"raw": "'../util/resolve-dir'"
},
"value": "../util/resolve-dir"
}
},
{
"type": "VariableDeclaration",
"start": 191,
"end": 230,
"loc": {
"start": {
"line": 8,
"column": 0
},
"end": {
"line": 8,
"column": 39
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 197,
"end": 229,
"loc": {
"start": {
"line": 8,
"column": 6
},
"end": {
"line": 8,
"column": 38
}
},
"id": {
"type": "Identifier",
"start": 197,
"end": 198,
"loc": {
"start": {
"line": 8,
"column": 6
},
"end": {
"line": 8,
"column": 7
},
"identifierName": "d"
},
"name": "d"
},
"init": {
"type": "CallExpression",
"start": 201,
"end": 229,
"loc": {
"start": {
"line": 8,
"column": 10
},
"end": {
"line": 8,
"column": 38
}
},
"callee": {
"type": "Identifier",
"start": 201,
"end": 206,
"loc": {
"start": {
"line": 8,
"column": 10
},
"end": {
"line": 8,
"column": 15
},
"identifierName": "debug"
},
"name": "debug"
},
"arguments": [
{
"type": "StringLiteral",
"start": 207,
"end": 228,
"loc": {
"start": {
"line": 8,
"column": 16
},
"end": {
"line": 8,
"column": 37
}
},
"extra": {
"rawValue": "electron-forge:lint",
"raw": "'electron-forge:lint'"
},
"value": "electron-forge:lint"
}
]
}
}
],
"kind": "const",
"trailingComments": [
{
"type": "CommentBlock",
"value": "*\n * @typedef {Object} LintOptions\n * @property {string} [dir=process.cwd()] The path to the module to import\n * @property {boolean} [interactive=false] Whether to use sensible defaults or prompt the user visually\n ",
"start": 232,
"end": 451,
"loc": {
"start": {
"line": 10,
"column": 0
},
"end": {
"line": 14,
"column": 3
}
}
},
{
"type": "CommentBlock",
"value": "*\n * Lint a local Electron application.\n *\n * The promise will be rejected with the stdout+stderr of the linting process if linting fails or\n * will be resolved if it succeeds.\n *\n * @param {LintOptions} providedOptions - Options for the Lint method\n * @return {Promise<null, string>} Will resolve when the lint process is complete\n ",
"start": 453,
"end": 790,
"loc": {
"start": {
"line": 16,
"column": 0
},
"end": {
"line": 24,
"column": 3
}
}
}
]
},
{
"type": "ExportDefaultDeclaration",
"start": 791,
"end": 2200,
"loc": {
"start": {
"line": 25,
"column": 0
},
"end": {
"line": 73,
"column": 2
}
},
"declaration": {
"type": "ArrowFunctionExpression",
"start": 806,
"end": 2199,
"loc": {
"start": {
"line": 25,
"column": 15
},
"end": {
"line": 73,
"column": 1
}
},
"id": null,
"generator": false,
"expression": false,
"async": true,
"params": [
{
"type": "AssignmentPattern",
"start": 813,
"end": 833,
"loc": {
"start": {
"line": 25,
"column": 22
},
"end": {
"line": 25,
"column": 42
}
},
"left": {
"type": "Identifier",
"start": 813,
"end": 828,
"loc": {
"start": {
"line": 25,
"column": 22
},
"end": {
"line": 25,
"column": 37
},
"identifierName": "providedOptions"
},
"name": "providedOptions"
},
"right": {
"type": "ObjectExpression",
"start": 831,
"end": 833,
"loc": {
"start": {
"line": 25,
"column": 40
},
"end": {
"line": 25,
"column": 42
}
},
"properties": []
}
}
],
"body": {
"type": "BlockStatement",
"start": 838,
"end": 2199,
"loc": {
"start": {
"line": 25,
"column": 47
},
"end": {
"line": 73,
"column": 1
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 901,
"end": 1014,
"loc": {
"start": {
"line": 27,
"column": 2
},
"end": {
"line": 30,
"column": 22
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 905,
"end": 1013,
"loc": {
"start": {
"line": 27,
"column": 6
},
"end": {
"line": 30,
"column": 21
}
},
"id": {
"type": "ObjectPattern",
"start": 905,
"end": 925,
"loc": {
"start": {
"line": 27,
"column": 6
},
"end": {
"line": 27,
"column": 26
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 907,
"end": 910,
"loc": {
"start": {
"line": 27,
"column": 8
},
"end": {
"line": 27,
"column": 11
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 907,
"end": 910,
"loc": {
"start": {
"line": 27,
"column": 8
},
"end": {
"line": 27,
"column": 11
},
"identifierName": "dir"
},
"name": "dir",
"leadingComments": null
},
"value": {
"type": "Identifier",
"start": 907,
"end": 910,
"loc": {
"start": {
"line": 27,
"column": 8
},
"end": {
"line": 27,
"column": 11
},
"identifierName": "dir"
},
"name": "dir"
},
"leadingComments": null,
"extra": {
"shorthand": true
}
},
{
"type": "ObjectProperty",
"start": 912,
"end": 923,
"loc": {
"start": {
"line": 27,
"column": 13
},
"end": {
"line": 27,
"column": 24
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 912,
"end": 923,
"loc": {
"start": {
"line": 27,
"column": 13
},
"end": {
"line": 27,
"column": 24
},
"identifierName": "interactive"
},
"name": "interactive"
},
"value": {
"type": "Identifier",
"start": 912,
"end": 923,
"loc": {
"start": {
"line": 27,
"column": 13
},
"end": {
"line": 27,
"column": 24
},
"identifierName": "interactive"
},
"name": "interactive"
},
"extra": {
"shorthand": true
}
}
],
"leadingComments": null
},
"init": {
"type": "CallExpression",
"start": 928,
"end": 1013,
"loc": {
"start": {
"line": 27,
"column": 29
},
"end": {
"line": 30,
"column": 21
}
},
"callee": {
"type": "MemberExpression",
"start": 928,
"end": 941,
"loc": {
"start": {
"line": 27,
"column": 29
},
"end": {
"line": 27,
"column": 42
}
},
"object": {
"type": "Identifier",
"start": 928,
"end": 934,
"loc": {
"start": {
"line": 27,
"column": 29
},
"end": {
"line": 27,
"column": 35
},
"identifierName": "Object"
},
"name": "Object"
},
"property": {
"type": "Identifier",
"start": 935,
"end": 941,
"loc": {
"start": {
"line": 27,
"column": 36
},
"end": {
"line": 27,
"column": 42
},
"identifierName": "assign"
},
"name": "assign"
},
"computed": false
},
"arguments": [
{
"type": "ObjectExpression",
"start": 942,
"end": 995,
"loc": {
"start": {
"line": 27,
"column": 43
},
"end": {
"line": 30,
"column": 3
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 948,
"end": 966,
"loc": {
"start": {
"line": 28,
"column": 4
},
"end": {
"line": 28,
"column": 22
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 948,
"end": 951,
"loc": {
"start": {
"line": 28,
"column": 4
},
"end": {
"line": 28,
"column": 7
},
"identifierName": "dir"
},
"name": "dir"
},
"value": {
"type": "CallExpression",
"start": 953,
"end": 966,
"loc": {
"start": {
"line": 28,
"column": 9
},
"end": {
"line": 28,
"column": 22
}
},
"callee": {
"type": "MemberExpression",
"start": 953,
"end": 964,
"loc": {
"start": {
"line": 28,
"column": 9
},
"end": {
"line": 28,
"column": 20
}
},
"object": {
"type": "Identifier",
"start": 953,
"end": 960,
"loc": {
"start": {
"line": 28,
"column": 9
},
"end": {
"line": 28,
"column": 16
},
"identifierName": "process"
},
"name": "process"
},
"property": {
"type": "Identifier",
"start": 961,
"end": 964,
"loc": {
"start": {
"line": 28,
"column": 17
},
"end": {
"line": 28,
"column": 20
},
"identifierName": "cwd"
},
"name": "cwd"
},
"computed": false
},
"arguments": []
}
},
{
"type": "ObjectProperty",
"start": 972,
"end": 990,
"loc": {
"start": {
"line": 29,
"column": 4
},
"end": {
"line": 29,
"column": 22
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 972,
"end": 983,
"loc": {
"start": {
"line": 29,
"column": 4
},
"end": {
"line": 29,
"column": 15
},
"identifierName": "interactive"
},
"name": "interactive"
},
"value": {
"type": "BooleanLiteral",
"start": 985,
"end": 990,
"loc": {
"start": {
"line": 29,
"column": 17
},
"end": {
"line": 29,
"column": 22
}
},
"value": false
}
}
]
},
{
"type": "Identifier",
"start": 997,
"end": 1012,
"loc": {
"start": {
"line": 30,
"column": 5
},
"end": {
"line": 30,
"column": 20
},
"identifierName": "providedOptions"
},
"name": "providedOptions"
}
]
},
"leadingComments": null
}
],
"kind": "let",
"leadingComments": [
{
"type": "CommentLine",
"value": " eslint-disable-next-line prefer-const, no-unused-vars",
"start": 842,
"end": 898,
"loc": {
"start": {
"line": 26,
"column": 2
},
"end": {
"line": 26,
"column": 58
}
}
}
]
},
{
"type": "ExpressionStatement",
"start": 1017,
"end": 1052,
"loc": {
"start": {
"line": 31,
"column": 2
},
"end": {
"line": 31,
"column": 37
}
},
"expression": {
"type": "AssignmentExpression",
"start": 1017,
"end": 1051,
"loc": {
"start": {
"line": 31,
"column": 2
},
"end": {
"line": 31,
"column": 36
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 1017,
"end": 1037,
"loc": {
"start": {
"line": 31,
"column": 2
},
"end": {
"line": 31,
"column": 22
}
},
"object": {
"type": "Identifier",
"start": 1017,
"end": 1025,
"loc": {
"start": {
"line": 31,
"column": 2
},
"end": {
"line": 31,
"column": 10
},
"identifierName": "asyncOra"
},
"name": "asyncOra"
},
"property": {
"type": "Identifier",
"start": 1026,
"end": 1037,
"loc": {
"start": {
"line": 31,
"column": 11
},
"end": {
"line": 31,
"column": 22
},
"identifierName": "interactive"
},
"name": "interactive"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 1040,
"end": 1051,
"loc": {
"start": {
"line": 31,
"column": 25
},
"end": {
"line": 31,
"column": 36
},
"identifierName": "interactive"
},
"name": "interactive"
}
}
},
{
"type": "VariableDeclaration",
"start": 1056,
"end": 1075,
"loc": {
"start": {
"line": 33,
"column": 2
},
"end": {
"line": 33,
"column": 21
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 1060,
"end": 1074,
"loc": {
"start": {
"line": 33,
"column": 6
},
"end": {
"line": 33,
"column": 20
}
},
"id": {
"type": "Identifier",
"start": 1060,
"end": 1067,
"loc": {
"start": {
"line": 33,
"column": 6
},
"end": {
"line": 33,
"column": 13
},
"identifierName": "success"
},
"name": "success"
},
"init": {
"type": "BooleanLiteral",
"start": 1070,
"end": 1074,
"loc": {
"start": {
"line": 33,
"column": 16
},
"end": {
"line": 33,
"column": 20
}
},
"value": true
}
}
],
"kind": "let"
},
{
"type": "VariableDeclaration",
"start": 1078,
"end": 1096,
"loc": {
"start": {
"line": 34,
"column": 2
},
"end": {
"line": 34,
"column": 20
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 1082,
"end": 1095,
"loc": {
"start": {
"line": 34,
"column": 6
},
"end": {
"line": 34,
"column": 19
}
},
"id": {
"type": "Identifier",
"start": 1082,
"end": 1088,
"loc": {
"start": {
"line": 34,
"column": 6
},
"end": {
"line": 34,
"column": 12
},
"identifierName": "result"
},
"name": "result"
},
"init": {
"type": "NullLiteral",
"start": 1091,
"end": 1095,
"loc": {
"start": {
"line": 34,
"column": 15
},
"end": {
"line": 34,
"column": 19
}
}
}
}
],
"kind": "let"
},
{
"type": "ExpressionStatement",
"start": 1100,
"end": 2156,
"loc": {
"start": {
"line": 36,
"column": 2
},
"end": {
"line": 68,
"column": 5
}
},
"expression": {
"type": "AwaitExpression",
"start": 1100,
"end": 2155,
"loc": {
"start": {
"line": 36,
"column": 2
},
"end": {
"line": 68,
"column": 4
}
},
"argument": {
"type": "CallExpression",
"start": 1106,
"end": 2155,
"loc": {
"start": {
"line": 36,
"column": 8
},
"end": {
"line": 68,
"column": 4
}
},
"callee": {
"type": "Identifier",
"start": 1106,
"end": 1114,
"loc": {
"start": {
"line": 36,
"column": 8
},
"end": {
"line": 36,
"column": 16
},
"identifierName": "asyncOra"
},
"name": "asyncOra"
},
"arguments": [
{
"type": "StringLiteral",
"start": 1115,
"end": 1136,
"loc": {
"start": {
"line": 36,
"column": 17
},
"end": {
"line": 36,
"column": 38
}
},
"extra": {
"rawValue": "Linting Application",
"raw": "'Linting Application'"
},
"value": "Linting Application"
},
{
"type": "ArrowFunctionExpression",
"start": 1138,
"end": 2154,
"loc": {
"start": {
"line": 36,
"column": 40
},
"end": {
"line": 68,
"column": 3
}
},
"id": null,
"generator": false,
"expression": false,
"async": true,
"params": [
{
"type": "Identifier",
"start": 1145,
"end": 1156,
"loc": {
"start": {
"line": 36,
"column": 47
},
"end": {
"line": 36,
"column": 58
},
"identifierName": "lintSpinner"
},
"name": "lintSpinner"
}
],
"body": {
"type": "BlockStatement",
"start": 1161,
"end": 2154,
"loc": {
"start": {
"line": 36,
"column": 63
},
"end": {
"line": 68,
"column": 3
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 1167,
"end": 1195,
"loc": {
"start": {
"line": 37,
"column": 4
},
"end": {
"line": 37,
"column": 32
}
},
"expression": {
"type": "AssignmentExpression",
"start": 1167,
"end": 1194,
"loc": {
"start": {
"line": 37,
"column": 4
},
"end": {
"line": 37,
"column": 31
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 1167,
"end": 1170,
"loc": {
"start": {
"line": 37,
"column": 4
},
"end": {
"line": 37,
"column": 7
},
"identifierName": "dir"
},
"name": "dir"
},
"right": {
"type": "AwaitExpression",
"start": 1173,
"end": 1194,
"loc": {
"start": {
"line": 37,
"column": 10
},
"end": {
"line": 37,
"column": 31
}
},
"argument": {
"type": "CallExpression",
"start": 1179,
"end": 1194,
"loc": {
"start": {
"line": 37,
"column": 16
},
"end": {
"line": 37,
"column": 31
}
},
"callee": {
"type": "Identifier",
"start": 1179,
"end": 1189,
"loc": {
"start": {
"line": 37,
"column": 16
},
"end": {
"line": 37,
"column": 26
},
"identifierName": "resolveDir"
},
"name": "resolveDir"
},
"arguments": [
{
"type": "Identifier",
"start": 1190,
"end": 1193,
"loc": {
"start": {
"line": 37,
"column": 27
},
"end": {
"line": 37,
"column": 30
},
"identifierName": "dir"
},
"name": "dir"
}
]
}
}
}
},
{
"type": "IfStatement",
"start": 1200,
"end": 1330,
"loc": {
"start": {
"line": 38,
"column": 4
},
"end": {
"line": 41,
"column": 5
}
},
"test": {
"type": "UnaryExpression",
"start": 1204,
"end": 1208,
"loc": {
"start": {
"line": 38,
"column": 8