@atlassian/wrm-troubleshooting 0.6.6 → 0.6.7
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/dist/analytics/analytics.js +74 -0
- package/dist/analytics/analytics.js.map +1 -0
- package/dist/analytics/events.js +27 -0
- package/dist/analytics/events.js.map +1 -0
- package/dist/applicationUrls.js +39 -0
- package/dist/applicationUrls.js.map +1 -0
- package/dist/atlassianPluginXml.js +69 -0
- package/dist/atlassianPluginXml.js.map +1 -0
- package/dist/checkForUpdate.js +58 -0
- package/dist/checkForUpdate.js.map +1 -0
- package/dist/cli.js +76 -0
- package/dist/cli.js.map +1 -0
- package/dist/cliUtils.js +21 -0
- package/dist/cliUtils.js.map +1 -0
- package/dist/globWithOptions.js +18 -0
- package/dist/globWithOptions.js.map +1 -0
- package/dist/maven/MavenError.js +14 -0
- package/dist/maven/MavenError.js.map +1 -0
- package/dist/paths.js +12 -0
- package/dist/paths.js.map +1 -0
- package/dist/pom.js +147 -0
- package/dist/pom.js.map +1 -0
- package/dist/steps/getEffectivePomConfig.js +94 -0
- package/dist/steps/getEffectivePomConfig.js.map +1 -0
- package/dist/steps/getEffectiveWebpackConfig.js +35 -0
- package/dist/steps/getEffectiveWebpackConfig.js.map +1 -0
- package/dist/steps/getWrmWebpackPlugin.js +22 -0
- package/dist/steps/getWrmWebpackPlugin.js.map +1 -0
- package/dist/steps/index.js +27 -0
- package/dist/steps/index.js.map +1 -0
- package/dist/steps/locatePomFile.js +30 -0
- package/dist/steps/locatePomFile.js.map +1 -0
- package/dist/steps/locateWebpackConfigFile.js +32 -0
- package/dist/steps/locateWebpackConfigFile.js.map +1 -0
- package/dist/steps/types.js +48 -0
- package/dist/steps/types.js.map +1 -0
- package/dist/steps/validateOptions.js +21 -0
- package/dist/steps/validateOptions.js.map +1 -0
- package/dist/steps/verifyPomConfigIsValid.js +22 -0
- package/dist/steps/verifyPomConfigIsValid.js.map +1 -0
- package/dist/steps/verifyWebpackBundle.js +26 -0
- package/dist/steps/verifyWebpackBundle.js.map +1 -0
- package/dist/steps/verifyWrmPluginHasValidConfig.js +28 -0
- package/dist/steps/verifyWrmPluginHasValidConfig.js.map +1 -0
- package/dist/steps/verifyWrmPluginScanFolders.js +15 -0
- package/dist/steps/verifyWrmPluginScanFolders.js.map +1 -0
- package/dist/steps/verifyWrmRuntime.js +139 -0
- package/dist/steps/verifyWrmRuntime.js.map +1 -0
- package/dist/troubleshooting.js +219 -0
- package/dist/troubleshooting.js.map +1 -0
- package/dist/troubleshootingOptions.js +12 -0
- package/dist/troubleshootingOptions.js.map +1 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/dist/webpack/webpack.js +149 -0
- package/dist/webpack/webpack.js.map +1 -0
- package/dist/webpack/webpackCli.js +167 -0
- package/dist/webpack/webpackCli.js.map +1 -0
- package/dist/webpack/webpackCliV3.js +33 -0
- package/dist/webpack/webpackCliV3.js.map +1 -0
- package/dist/webpack/webpackCliV4.js +33 -0
- package/dist/webpack/webpackCliV4.js.map +1 -0
- package/dist/webpack/webpackError.js +14 -0
- package/dist/webpack/webpackError.js.map +1 -0
- package/dist/webpackPlugin/WebpackRetrieveConfigPlugin.js +61 -0
- package/dist/webpackPlugin/WebpackRetrieveConfigPlugin.js.map +1 -0
- package/dist/webpackPlugin/webpack.config.js +10 -0
- package/dist/webpackPlugin/webpack.config.js.map +1 -0
- package/dist/webpackWrmPlugin.js +62 -0
- package/dist/webpackWrmPlugin.js.map +1 -0
- package/dist/wrm/fetchWithTimeout.js +23 -0
- package/dist/wrm/fetchWithTimeout.js.map +1 -0
- package/dist/wrm/wrmRestApi.js +93 -0
- package/dist/wrm/wrmRestApi.js.map +1 -0
- package/dist/wrm/wrmTypes.js +3 -0
- package/dist/wrm/wrmTypes.js.map +1 -0
- package/dist/xmlParser.js +42 -0
- package/dist/xmlParser.js.map +1 -0
- package/dist/yargsHelper.js +22 -0
- package/dist/yargsHelper.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
22
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.getEffectivePomConfig = void 0;
|
|
26
|
+
const execa_1 = __importDefault(require("execa"));
|
|
27
|
+
const fs_1 = __importStar(require("fs"));
|
|
28
|
+
const lookpath_1 = require("lookpath");
|
|
29
|
+
const path = __importStar(require("path"));
|
|
30
|
+
const MavenError_1 = require("../maven/MavenError");
|
|
31
|
+
const types_1 = require("./types");
|
|
32
|
+
const getEffectivePomConfig = async (options, payload) => {
|
|
33
|
+
const { pomFile } = payload;
|
|
34
|
+
console.log('👀 We will retrieve pom configuration now. This might take some time...');
|
|
35
|
+
const pomFileWd = path.dirname(pomFile);
|
|
36
|
+
const xmlConfigOutput = path.resolve(pomFileWd, '.temp-pom-config.xml');
|
|
37
|
+
// We need to check if at least one of the following commands is available
|
|
38
|
+
const mvnCommands = ['atlas-mvn', 'mvn'];
|
|
39
|
+
let mvnCommand;
|
|
40
|
+
for (const mvnCmd of mvnCommands) {
|
|
41
|
+
mvnCommand = await (0, lookpath_1.lookpath)(mvnCmd);
|
|
42
|
+
if (mvnCommand) {
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
// When we run integration tests locally with Jest we need to use a different maven command than `mvn`.
|
|
47
|
+
// For some reason, using `mvn` command will cause this error:
|
|
48
|
+
//
|
|
49
|
+
// Command failed with exit code 1: mvn help:effective-pom -Doutput=<<file-path>> --quiet
|
|
50
|
+
// mkdir: /.mvnvm: Read-only file system
|
|
51
|
+
//
|
|
52
|
+
// So for the integration tests we are running locally we need to use "atlas-mvn" from the Atlassian SDK.
|
|
53
|
+
if (process.env.NODE_ENV === 'test' && !process.env.CI) {
|
|
54
|
+
mvnCommand = 'atlas-mvn';
|
|
55
|
+
}
|
|
56
|
+
if (!mvnCommand) {
|
|
57
|
+
return (0, types_1.getFailedResult)(new MavenError_1.MavenError(`We can't run the "atlas-mvn" or "mvn" commands. Please ensure you have installed Atlassian SDK and one of those command can be executed.
|
|
58
|
+
Refer to the SDK Installation Guide: https://developer.atlassian.com/server/framework/atlassian-sdk/install-the-atlassian-sdk-on-a-linux-or-mac-system/`, ''));
|
|
59
|
+
}
|
|
60
|
+
try {
|
|
61
|
+
await (0, execa_1.default)(mvnCommand, ['help:effective-pom', `-Doutput=${xmlConfigOutput}`, '--quiet'], {
|
|
62
|
+
cwd: pomFileWd,
|
|
63
|
+
timeout: options.timeout,
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
catch (err) {
|
|
67
|
+
const error = err;
|
|
68
|
+
if (error.timedOut) {
|
|
69
|
+
return (0, types_1.getCommandTimeoutResult)('mvn', options.timeout);
|
|
70
|
+
}
|
|
71
|
+
const errorMessage = error.stdout || error.message || error.shortMessage;
|
|
72
|
+
return (0, types_1.getFailedResult)(new MavenError_1.MavenError('Maven "help:effective-pom" command failed.', errorMessage));
|
|
73
|
+
}
|
|
74
|
+
// Verify if the effective pom file was created
|
|
75
|
+
try {
|
|
76
|
+
await fs_1.promises.access(xmlConfigOutput);
|
|
77
|
+
}
|
|
78
|
+
catch (err) {
|
|
79
|
+
const error = err;
|
|
80
|
+
const errorMessage = error.message;
|
|
81
|
+
const xmlFilename = path.basename(xmlConfigOutput);
|
|
82
|
+
return (0, types_1.getFailedResult)(new MavenError_1.MavenError(`Maven "help:effective-pom" command failed. We couldn't create the "${xmlFilename}" file with effective pom configuration.`, errorMessage));
|
|
83
|
+
}
|
|
84
|
+
const pomConfig = fs_1.default.readFileSync(xmlConfigOutput, {
|
|
85
|
+
encoding: 'utf-8',
|
|
86
|
+
});
|
|
87
|
+
// Remove the temporary file that we don't need anymore
|
|
88
|
+
fs_1.default.unlinkSync(xmlConfigOutput);
|
|
89
|
+
return (0, types_1.getPassedResult)({
|
|
90
|
+
pomConfig,
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
exports.getEffectivePomConfig = getEffectivePomConfig;
|
|
94
|
+
//# sourceMappingURL=getEffectivePomConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getEffectivePomConfig.js","sourceRoot":"","sources":["../../src/steps/getEffectivePomConfig.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,kDAA0B;AAC1B,yCAA6C;AAC7C,uCAAoC;AACpC,2CAA6B;AAE7B,oDAAiD;AAEjD,mCAAoF;AAU7E,MAAM,qBAAqB,GAI9B,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE;IAC7B,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IAE5B,OAAO,CAAC,GAAG,CAAC,yEAAyE,CAAC,CAAC;IAEvF,MAAM,S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AA,uBAAe,EAAC,IAAI,uBAAU,CAAC,4CAA4C,EAAE,YAAY,CAAC,CAAC,CAAC;KACpG;IAED,+CAA+C;IAC/C,IAAI;QACF,MAAM,aAAO,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;KACvC;IAAC,OAAO,GAAG,EAAE;QACZ,MAAM,KAAK,GAAG,GAAY,CAAC;QAC3B,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC;QAEnC,MAAM,WAAW,GAAG,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;QAEnD,OAAO,IAAA,uBAAe,EACpB,IAAI,uBAAU,CACZ,sEAAsE,WAAW,0CAA0C,EAC3H,YAAY,CACb,CACF,CAAC;KACH;IAED,MAAM,SAAS,GAAG,YAAE,CAAC,YAAY,CAAC,eAAe,EAAE;QACjD,QAAQ,EAAE,OAAO;KAClB,CAAC,CAAC;IAEH,uDAAuD;IACvD,YAAE,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;IAE/B,OAAO,IAAA,uBAAe,EAA4B;QAChD,SAAS;KACV,CAAC,CAAC;AACL,CAAC,CAAC;AAzFW,QAAA,qBAAqB,yBAyFhC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
exports.getEffectiveWebpackConfig = void 0;
|
|
7
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
+
const inquirer_1 = __importDefault(require("inquirer"));
|
|
9
|
+
const webpack_1 = require("../webpack/webpack");
|
|
10
|
+
const types_1 = require("./types");
|
|
11
|
+
const getEffectiveWebpackConfig = async (options, payload) => {
|
|
12
|
+
const { webpackConfigFile } = payload;
|
|
13
|
+
if (!options.yes) {
|
|
14
|
+
const answer = await inquirer_1.default.prompt({
|
|
15
|
+
type: 'confirm',
|
|
16
|
+
name: 'confirmRunningWebpack',
|
|
17
|
+
message: `We need to run ${chalk_1.default.bold('webpack CLI')} to retrieve the configuration file. Is that fine?`,
|
|
18
|
+
});
|
|
19
|
+
// Silly boy!
|
|
20
|
+
if (!answer.confirmRunningWebpack) {
|
|
21
|
+
const error = new Error(`We can't proceed without running the ${chalk_1.default.bold('webpack')}. Please run the troubleshooting command again when you are ready to run webpack.`);
|
|
22
|
+
return (0, types_1.getFailedResult)(error);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
const webpackConfigResult = await (0, webpack_1.retrieveEffectiveWebpackConfig)(webpackConfigFile, options.timeout);
|
|
26
|
+
if (webpackConfigResult instanceof Error) {
|
|
27
|
+
return (0, types_1.getFailedResult)(webpackConfigResult);
|
|
28
|
+
}
|
|
29
|
+
return (0, types_1.getPassedResult)({
|
|
30
|
+
webpackCliInfo: webpackConfigResult.cliInfo,
|
|
31
|
+
webpackEffectiveConfig: webpackConfigResult.effectiveConfig,
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
exports.getEffectiveWebpackConfig = getEffectiveWebpackConfig;
|
|
35
|
+
//# sourceMappingURL=getEffectiveWebpackConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getEffectiveWebpackConfig.js","sourceRoot":"","sources":["../../src/steps/getEffectiveWebpackConfig.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,wDAAgC;AAGhC,gDAAoE;AAIpE,mCAA2D;AAWpD,MAAM,yBAAyB,GAIlC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE;IAC7B,MAAM,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC;IAEtC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;QAKhB,MAAM,MAAM,GAAW,MAAM,kBAAQ,CAAC,MAAM,CAAC;YAC3C,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,uBAAuB;YAC7B,OAAO,EAAE,kBAAkB,eAAK,CAAC,IAAI,CAAC,aAAa,CAAC,oDAAoD;SACzG,CAAC,CAAC;QAEH,aAAa;QACb,IAAI,CAAC,MAAM,CAAC,qBAAqB,EAAE;YACjC,MAAM,KAAK,GAAG,IAAI,KAAK,CACrB,wCAAwC,eAAK,CAAC,IAAI,CAChD,SAAS,CACV,mFAAmF,CACrF,CAAC;YAEF,OAAO,IAAA,uBAAe,EAAC,KAAK,CAAC,CAAC;SAC/B;KACF;IAED,MAAM,mBAAmB,GAAG,MAAM,IAAA,wCAA8B,EAAC,iBAAiB,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IAErG,IAAI,mBAAmB,YAAY,KAAK,EAAE;QACxC,OAAO,IAAA,uBAAe,EAAC,mBAAmB,CAAC,CAAC;KAC7C;IAED,OAAO,IAAA,uBAAe,EAAyC;QAC7D,cAAc,EAAE,mBAAmB,CAAC,OAAO;QAC3C,sBAAsB,EAAE,mBAAmB,CAAC,eAAe;KAC5D,CAAC,CAAC;AACL,CAAC,CAAC;AAxCW,QAAA,yBAAyB,6BAwCpC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getWrmWebpackPlugin = void 0;
|
|
4
|
+
const webpackWrmPlugin_1 = require("../webpackWrmPlugin");
|
|
5
|
+
const types_1 = require("./types");
|
|
6
|
+
const missingPluginError = new Error(`Provided webpack configuration is not using "${webpackWrmPlugin_1.NPM_PACKAGE_NAME}" webpack plugin.`);
|
|
7
|
+
const getWrmWebpackPlugin = async (options, payload) => {
|
|
8
|
+
const { webpackEffectiveConfig } = payload;
|
|
9
|
+
const { plugins } = webpackEffectiveConfig;
|
|
10
|
+
if (!Array.isArray(plugins)) {
|
|
11
|
+
return (0, types_1.getFailedResult)(missingPluginError);
|
|
12
|
+
}
|
|
13
|
+
const wrmWebpackPlugin = plugins.find((plugin) => plugin.pluginName === webpackWrmPlugin_1.WRM_PLUGIN_NAME);
|
|
14
|
+
if (!wrmWebpackPlugin) {
|
|
15
|
+
return (0, types_1.getFailedResult)(missingPluginError);
|
|
16
|
+
}
|
|
17
|
+
return (0, types_1.getPassedResult)({
|
|
18
|
+
wrmWebpackPlugin: wrmWebpackPlugin,
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
exports.getWrmWebpackPlugin = getWrmWebpackPlugin;
|
|
22
|
+
//# sourceMappingURL=getWrmWebpackPlugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getWrmWebpackPlugin.js","sourceRoot":"","sources":["../../src/steps/getWrmWebpackPlugin.ts"],"names":[],"mappings":";;;AAEA,0DAAwE;AAExE,mCAA2D;AAU3D,MAAM,kBAAkB,GAAG,IAAI,KAAK,CAClC,gDAAgD,mCAAgB,mBAAmB,CACpF,CAAC;AAEK,MAAM,mBAAmB,GAG5B,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE;IAC7B,MAAM,EAAE,sBAAsB,EAAE,GAAG,OAAO,CAAC;IAE3C,MAAM,EAAE,OAAO,EAAE,GAAG,sBAAsB,CAAC;IAE3C,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;QAC3B,OAAO,IAAA,uBAAe,EAAC,kBAAkB,CAAC,CAAC;KAC5C;IAED,MAAM,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,MAA8B,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,KAAK,kCAAe,CAAC,CAAC;IAEjH,IAAI,CAAC,gBAAgB,EAAE;QACrB,OAAO,IAAA,uBAAe,EAAC,kBAAkB,CAAC,CAAC;KAC5C;IAED,OAAO,IAAA,uBAAe,EAAgC;QACpD,gBAAgB,EAAE,gBAAgE;KACnF,CAAC,CAAC;AACL,CAAC,CAAC;AArBW,QAAA,mBAAmB,uBAqB9B"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.verifyWrmPluginScanFolders = exports.verifyWrmPluginHasValidConfig = exports.verifyWebpackBundle = exports.verifyPomConfigIsValid = exports.validateOptions = exports.didPass = exports.didFail = exports.locateWebpackConfigFile = exports.locatePomFile = exports.getWrmWebpackPlugin = exports.getEffectiveWebpackConfig = exports.getEffectivePomConfig = void 0;
|
|
4
|
+
var getEffectivePomConfig_1 = require("./getEffectivePomConfig");
|
|
5
|
+
Object.defineProperty(exports, "getEffectivePomConfig", { enumerable: true, get: function () { return getEffectivePomConfig_1.getEffectivePomConfig; } });
|
|
6
|
+
var getEffectiveWebpackConfig_1 = require("./getEffectiveWebpackConfig");
|
|
7
|
+
Object.defineProperty(exports, "getEffectiveWebpackConfig", { enumerable: true, get: function () { return getEffectiveWebpackConfig_1.getEffectiveWebpackConfig; } });
|
|
8
|
+
var getWrmWebpackPlugin_1 = require("./getWrmWebpackPlugin");
|
|
9
|
+
Object.defineProperty(exports, "getWrmWebpackPlugin", { enumerable: true, get: function () { return getWrmWebpackPlugin_1.getWrmWebpackPlugin; } });
|
|
10
|
+
var locatePomFile_1 = require("./locatePomFile");
|
|
11
|
+
Object.defineProperty(exports, "locatePomFile", { enumerable: true, get: function () { return locatePomFile_1.locatePomFile; } });
|
|
12
|
+
var locateWebpackConfigFile_1 = require("./locateWebpackConfigFile");
|
|
13
|
+
Object.defineProperty(exports, "locateWebpackConfigFile", { enumerable: true, get: function () { return locateWebpackConfigFile_1.locateWebpackConfigFile; } });
|
|
14
|
+
var types_1 = require("./types");
|
|
15
|
+
Object.defineProperty(exports, "didFail", { enumerable: true, get: function () { return types_1.didFail; } });
|
|
16
|
+
Object.defineProperty(exports, "didPass", { enumerable: true, get: function () { return types_1.didPass; } });
|
|
17
|
+
var validateOptions_1 = require("./validateOptions");
|
|
18
|
+
Object.defineProperty(exports, "validateOptions", { enumerable: true, get: function () { return validateOptions_1.validateOptions; } });
|
|
19
|
+
var verifyPomConfigIsValid_1 = require("./verifyPomConfigIsValid");
|
|
20
|
+
Object.defineProperty(exports, "verifyPomConfigIsValid", { enumerable: true, get: function () { return verifyPomConfigIsValid_1.verifyPomConfigIsValid; } });
|
|
21
|
+
var verifyWebpackBundle_1 = require("./verifyWebpackBundle");
|
|
22
|
+
Object.defineProperty(exports, "verifyWebpackBundle", { enumerable: true, get: function () { return verifyWebpackBundle_1.verifyWebpackBundle; } });
|
|
23
|
+
var verifyWrmPluginHasValidConfig_1 = require("./verifyWrmPluginHasValidConfig");
|
|
24
|
+
Object.defineProperty(exports, "verifyWrmPluginHasValidConfig", { enumerable: true, get: function () { return verifyWrmPluginHasValidConfig_1.verifyWrmPluginHasValidConfig; } });
|
|
25
|
+
var verifyWrmPluginScanFolders_1 = require("./verifyWrmPluginScanFolders");
|
|
26
|
+
Object.defineProperty(exports, "verifyWrmPluginScanFolders", { enumerable: true, get: function () { return verifyWrmPluginScanFolders_1.verifyWrmPluginScanFolders; } });
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/steps/index.ts"],"names":[],"mappings":";;;AAAA,iEAAgE;AAAvD,8HAAA,qBAAqB,OAAA;AAC9B,yEAAwE;AAA/D,sIAAA,yBAAyB,OAAA;AAClC,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA;AAC5B,iDAAgD;AAAvC,8GAAA,aAAa,OAAA;AACtB,qEAAoE;AAA3D,kIAAA,uBAAuB,OAAA;AAChC,iCAA2C;AAAlC,gGAAA,OAAO,OAAA;AAAE,gGAAA,OAAO,OAAA;AACzB,qDAAoD;AAA3C,kHAAA,eAAe,OAAA;AACxB,mEAAkE;AAAzD,gIAAA,sBAAsB,OAAA;AAC/B,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA;AAC5B,iFAAgF;AAAvE,8IAAA,6BAA6B,OAAA;AACtC,2EAA0E;AAAjE,wIAAA,0BAA0B,OAAA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
exports.locatePomFile = void 0;
|
|
7
|
+
const path_1 = __importDefault(require("path"));
|
|
8
|
+
const pom_1 = require("../pom");
|
|
9
|
+
const types_1 = require("./types");
|
|
10
|
+
const locatePomFile = async (options) => {
|
|
11
|
+
let pomFile = options.pom ? path_1.default.resolve(options.pom) : await (0, pom_1.findRootPomXmlFile)();
|
|
12
|
+
const rootPomFileFound = options.pom ? false : Boolean(pomFile);
|
|
13
|
+
// Skip asking for pom file if we have a root file
|
|
14
|
+
if (!options.yes || !pomFile) {
|
|
15
|
+
if (pomFile) {
|
|
16
|
+
pomFile = await (0, pom_1.confirmRootPomFile)(pomFile, rootPomFileFound);
|
|
17
|
+
}
|
|
18
|
+
if (!pomFile) {
|
|
19
|
+
pomFile = await (0, pom_1.askForPomXmlFile)(rootPomFileFound);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
if (pomFile instanceof Error) {
|
|
23
|
+
return (0, types_1.getFailedResult)(pomFile);
|
|
24
|
+
}
|
|
25
|
+
return (0, types_1.getPassedResult)({
|
|
26
|
+
pomFile,
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
exports.locatePomFile = locatePomFile;
|
|
30
|
+
//# sourceMappingURL=locatePomFile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locatePomFile.js","sourceRoot":"","sources":["../../src/steps/locatePomFile.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAExB,gCAAkF;AAElF,mCAA2D;AAMpD,MAAM,aAAa,GAA6C,KAAK,EAAE,OAAO,EAAE,EAAE;IACvF,IAAI,OAAO,GAA+B,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,cAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,IAAA,wBAAkB,GAAE,CAAC;IAC/G,MAAM,gBAAgB,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAEhE,kDAAkD;IAClD,IAAI,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE;QAC5B,IAAI,OAAO,EAAE;YACX,OAAO,GAAG,MAAM,IAAA,wBAAkB,EAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;SAC/D;QAED,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,GAAG,MAAM,IAAA,sBAAgB,EAAC,gBAAgB,CAAC,CAAC;SACpD;KACF;IAED,IAAI,OAAO,YAAY,KAAK,EAAE;QAC5B,OAAO,IAAA,uBAAe,EAAC,OAAO,CAAC,CAAC;KACjC;IAED,OAAO,IAAA,uBAAe,EAAyB;QAC7C,OAAO;KACR,CAAC,CAAC;AACL,CAAC,CAAC;AAtBW,QAAA,aAAa,iBAsBxB"}
|
|
@@ -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
|
+
exports.locateWebpackConfigFile = void 0;
|
|
7
|
+
const path_1 = __importDefault(require("path"));
|
|
8
|
+
const webpack_1 = require("../webpack/webpack");
|
|
9
|
+
const types_1 = require("./types");
|
|
10
|
+
const locateWebpackConfigFile = async (options) => {
|
|
11
|
+
let webpackConfigFile = options.webpack
|
|
12
|
+
? path_1.default.resolve(options.webpack)
|
|
13
|
+
: await (0, webpack_1.findRootWebpackConfigFile)();
|
|
14
|
+
const rootWebpackConfigFileFound = options.webpack ? false : Boolean(webpackConfigFile);
|
|
15
|
+
// Skip asking for webpack config file if we have a root file
|
|
16
|
+
if (!options.yes || !webpackConfigFile) {
|
|
17
|
+
if (webpackConfigFile) {
|
|
18
|
+
webpackConfigFile = await (0, webpack_1.confirmRootWebpackConfig)(webpackConfigFile, rootWebpackConfigFileFound);
|
|
19
|
+
}
|
|
20
|
+
if (!webpackConfigFile) {
|
|
21
|
+
webpackConfigFile = await (0, webpack_1.askForWebpackConfig)(rootWebpackConfigFileFound);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
if (webpackConfigFile instanceof Error) {
|
|
25
|
+
return (0, types_1.getFailedResult)(webpackConfigFile);
|
|
26
|
+
}
|
|
27
|
+
return (0, types_1.getPassedResult)({
|
|
28
|
+
webpackConfigFile,
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
exports.locateWebpackConfigFile = locateWebpackConfigFile;
|
|
32
|
+
//# sourceMappingURL=locateWebpackConfigFile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locateWebpackConfigFile.js","sourceRoot":"","sources":["../../src/steps/locateWebpackConfigFile.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAExB,gDAA8G;AAE9G,mCAA2D;AAMpD,MAAM,uBAAuB,GAAuD,KAAK,EAAE,OAAO,EAAE,EAAE;IAC3G,IAAI,iBAAiB,GAA+B,OAAO,CAAC,OAAO;QACjE,CAAC,CAAC,cAAI,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC;QAC/B,CAAC,CAAC,MAAM,IAAA,mCAAyB,GAAE,CAAC;IAEtC,MAAM,0BAA0B,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAExF,6DAA6D;IAC7D,IAAI,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,iBAAiB,EAAE;QACtC,IAAI,iBAAiB,EAAE;YACrB,iBAAiB,GAAG,MAAM,IAAA,kCAAwB,EAAC,iBAAiB,EAAE,0BAA0B,CAAC,CAAC;SACnG;QAED,IAAI,CAAC,iBAAiB,EAAE;YACtB,iBAAiB,GAAG,MAAM,IAAA,6BAAmB,EAAC,0BAA0B,CAAC,CAAC;SAC3E;KACF;IAED,IAAI,iBAAiB,YAAY,KAAK,EAAE;QACtC,OAAO,IAAA,uBAAe,EAAC,iBAAiB,CAAC,CAAC;KAC3C;IAED,OAAO,IAAA,uBAAe,EAAmC;QACvD,iBAAiB;KAClB,CAAC,CAAC;AACL,CAAC,CAAC;AAzBW,QAAA,uBAAuB,2BAyBlC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getResultPayload = exports.didFail = exports.didPass = exports.getPassedResult = exports.getRestTimeoutResult = exports.getCommandTimeoutResult = exports.getTimeoutError = exports.getFailedResult = exports.VerificationStatus = void 0;
|
|
4
|
+
var VerificationStatus;
|
|
5
|
+
(function (VerificationStatus) {
|
|
6
|
+
VerificationStatus[VerificationStatus["FAILED"] = 0] = "FAILED";
|
|
7
|
+
VerificationStatus[VerificationStatus["PASSED"] = 1] = "PASSED";
|
|
8
|
+
})(VerificationStatus = exports.VerificationStatus || (exports.VerificationStatus = {}));
|
|
9
|
+
function getFailedResult(error) {
|
|
10
|
+
return {
|
|
11
|
+
status: VerificationStatus.FAILED,
|
|
12
|
+
error,
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
exports.getFailedResult = getFailedResult;
|
|
16
|
+
function getTimeoutError(subject, timeout) {
|
|
17
|
+
const timeoutSeconds = Math.floor(timeout / 1000).toFixed(0);
|
|
18
|
+
return new Error(`The ${subject} timed out after ${timeoutSeconds} seconds. Try setting the --timeout option (in seconds) to override this.`);
|
|
19
|
+
}
|
|
20
|
+
exports.getTimeoutError = getTimeoutError;
|
|
21
|
+
function getCommandTimeoutResult(command, timeout) {
|
|
22
|
+
return getFailedResult(getTimeoutError(`${command} command`, timeout));
|
|
23
|
+
}
|
|
24
|
+
exports.getCommandTimeoutResult = getCommandTimeoutResult;
|
|
25
|
+
function getRestTimeoutResult(restResource, timeout) {
|
|
26
|
+
return getFailedResult(getTimeoutError(`${restResource} REST call`, timeout));
|
|
27
|
+
}
|
|
28
|
+
exports.getRestTimeoutResult = getRestTimeoutResult;
|
|
29
|
+
function getPassedResult(payload) {
|
|
30
|
+
return {
|
|
31
|
+
status: VerificationStatus.PASSED,
|
|
32
|
+
payload,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
exports.getPassedResult = getPassedResult;
|
|
36
|
+
function didPass(stepResult) {
|
|
37
|
+
return stepResult.status === VerificationStatus.PASSED;
|
|
38
|
+
}
|
|
39
|
+
exports.didPass = didPass;
|
|
40
|
+
function didFail(stepResult) {
|
|
41
|
+
return stepResult.status === VerificationStatus.FAILED;
|
|
42
|
+
}
|
|
43
|
+
exports.didFail = didFail;
|
|
44
|
+
function getResultPayload(stepResult) {
|
|
45
|
+
return stepResult.payload;
|
|
46
|
+
}
|
|
47
|
+
exports.getResultPayload = getResultPayload;
|
|
48
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/steps/types.ts"],"names":[],"mappings":";;;AAEA,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,+DAAM,CAAA;IACN,+DAAM,CAAA;AACR,CAAC,EAHW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAG7B;AAqCD,SAAgB,eAAe,CAA+B,KAAa;IACzE,OAAO;QACL,MAAM,EAAE,kBAAkB,CAAC,MAAM;QACjC,KAAK;KACN,CAAC;AACJ,CAAC;AALD,0CAKC;AAED,SAAgB,eAAe,CAAC,OAAe,EAAE,OAAe;IAC9D,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAE7D,OAAO,IAAI,KAAK,CACd,OAAO,OAAO,oBAAoB,cAAc,2EAA2E,CAC5H,CAAC;AACJ,CAAC;AAND,0CAMC;AAED,SAAgB,uBAAuB,CAAC,OAAe,EAAE,OAAe;IACtE,OAAO,eAAe,CAAC,eAAe,CAAC,GAAG,OAAO,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC;AACzE,CAAC;AAFD,0DAEC;AAED,SAAgB,oBAAoB,CAAC,YAAoB,EAAE,OAAe;IACxE,OAAO,eAAe,CAAC,eAAe,CAAC,GAAG,YAAY,YAAY,EAAE,OAAO,CAAC,CAAC,CAAC;AAChF,CAAC;AAFD,oDAEC;AAED,SAAgB,eAAe,CAC7B,OAAwB;IAExB,OAAO;QACL,MAAM,EAAE,kBAAkB,CAAC,MAAM;QACjC,OAAO;KACR,CAAC;AACJ,CAAC;AAPD,0CAOC;AAED,SAAgB,OAAO,CACrB,UAAiD;IAEjD,OAAO,UAAU,CAAC,MAAM,KAAK,kBAAkB,CAAC,MAAM,CAAC;AACzD,CAAC;AAJD,0BAIC;AAED,SAAgB,OAAO,CACrB,UAAgE;IAEhE,OAAO,UAAU,CAAC,MAAM,KAAK,kBAAkB,CAAC,MAAM,CAAC;AACzD,CAAC;AAJD,0BAIC;AAED,SAAgB,gBAAgB,CAC9B,UAAuD;IAEvD,OAAO,UAAU,CAAC,OAAwB,CAAC;AAC7C,CAAC;AAJD,4CAIC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
exports.validateOptions = void 0;
|
|
7
|
+
const valid_url_1 = __importDefault(require("valid-url"));
|
|
8
|
+
const types_1 = require("./types");
|
|
9
|
+
const validateOptions = async (options) => {
|
|
10
|
+
const { applicationUrl } = options;
|
|
11
|
+
if (applicationUrl) {
|
|
12
|
+
const isValid = Boolean(valid_url_1.default.isWebUri(applicationUrl));
|
|
13
|
+
if (!isValid) {
|
|
14
|
+
const error = new Error('Provided application URL is not valid.');
|
|
15
|
+
return (0, types_1.getFailedResult)(error);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return (0, types_1.getPassedResult)();
|
|
19
|
+
};
|
|
20
|
+
exports.validateOptions = validateOptions;
|
|
21
|
+
//# sourceMappingURL=validateOptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validateOptions.js","sourceRoot":"","sources":["../../src/steps/validateOptions.ts"],"names":[],"mappings":";;;;;;AAAA,0DAAiC;AAIjC,mCAA2D;AAIpD,MAAM,eAAe,GAAmD,KAAK,EAClF,OAAgD,EAChD,EAAE;IACF,MAAM,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC;IAEnC,IAAI,cAAc,EAAE;QAClB,MAAM,OAAO,GAAG,OAAO,CAAC,mBAAQ,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC;QAE3D,IAAI,CAAC,OAAO,EAAE;YACZ,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;YAElE,OAAO,IAAA,uBAAe,EAAC,KAAK,CAAC,CAAC;SAC/B;KACF;IAED,OAAO,IAAA,uBAAe,GAAE,CAAC;AAC3B,CAAC,CAAC;AAhBW,QAAA,eAAe,mBAgB1B"}
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
exports.verifyPomConfigIsValid = void 0;
|
|
7
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
+
const paths_1 = require("../paths");
|
|
9
|
+
const pom_1 = require("../pom");
|
|
10
|
+
const types_1 = require("./types");
|
|
11
|
+
const verifyPomConfigIsValid = async (options, payload) => {
|
|
12
|
+
const { pomFile, pomXml } = payload;
|
|
13
|
+
const scanFolders = (0, pom_1.getScanFoldersConfig)(pomXml);
|
|
14
|
+
if (!scanFolders) {
|
|
15
|
+
const error = new Error(`The ${chalk_1.default.green((0, paths_1.getRelativePath)(pomFile))} file is missing the "${chalk_1.default.bold(pom_1.SCAN_FOLDERS_KEY)}" configuration.
|
|
16
|
+
📖 Check the guide on how to configure it:\nhttps://www.npmjs.com/package/atlassian-webresource-webpack-plugin#consuming-the-output-in-your-p2-plugin`);
|
|
17
|
+
return (0, types_1.getFailedResult)(error);
|
|
18
|
+
}
|
|
19
|
+
return (0, types_1.getPassedResult)();
|
|
20
|
+
};
|
|
21
|
+
exports.verifyPomConfigIsValid = verifyPomConfigIsValid;
|
|
22
|
+
//# sourceMappingURL=verifyPomConfigIsValid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifyPomConfigIsValid.js","sourceRoot":"","sources":["../../src/steps/verifyPomConfigIsValid.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,oCAA2C;AAC3C,gCAAgE;AAGhE,mCAA2D;AASpD,MAAM,sBAAsB,GAG/B,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE;IAC7B,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAEpC,MAAM,WAAW,GAAG,IAAA,0BAAoB,EAAC,MAAM,CAAC,CAAC;IAEjD,IAAI,CAAC,WAAW,EAAE;QAChB,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,OAAO,eAAK,CAAC,KAAK,CAAC,IAAA,uBAAe,EAAC,OAAO,CAAC,CAAC,yBAAyB,eAAK,CAAC,IAAI,CACrG,sBAAgB,CACjB;sJACiJ,CAAC,CAAC;QAEpJ,OAAO,IAAA,uBAAe,EAAC,KAAK,CAAC,CAAC;KAC/B;IAED,OAAO,IAAA,uBAAe,GAAE,CAAC;AAC3B,CAAC,CAAC;AAlBW,QAAA,sBAAsB,0BAkBjC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.verifyWebpackBundle = void 0;
|
|
4
|
+
const atlassianPluginXml_1 = require("../atlassianPluginXml");
|
|
5
|
+
const webpack_1 = require("../webpack/webpack");
|
|
6
|
+
const webpackWrmPlugin_1 = require("../webpackWrmPlugin");
|
|
7
|
+
const types_1 = require("./types");
|
|
8
|
+
const verifyWebpackBundle = async (options, payload) => {
|
|
9
|
+
const { webpackConfigFile, webpackCliInfo, pomXml, pomFile } = payload;
|
|
10
|
+
// Ensure we don't have any old generated module descriptors
|
|
11
|
+
await (0, atlassianPluginXml_1.removeOldModuleDescriptors)(pomFile, pomXml);
|
|
12
|
+
const preBundleTimestamp = Date.now();
|
|
13
|
+
console.log('👀 We will run webpack bundle now. This might take some time...');
|
|
14
|
+
const bundleResult = await (0, webpack_1.bundleWebpack)(webpackCliInfo, webpackConfigFile, options.timeout);
|
|
15
|
+
if (bundleResult instanceof Error) {
|
|
16
|
+
return (0, types_1.getFailedResult)(bundleResult);
|
|
17
|
+
}
|
|
18
|
+
// Verify if the XML files were created in the scanFolders dir
|
|
19
|
+
const xmlResult = await (0, webpackWrmPlugin_1.verifyGeneratedWebResources)(pomFile, pomXml, preBundleTimestamp);
|
|
20
|
+
if (xmlResult instanceof Error) {
|
|
21
|
+
return (0, types_1.getFailedResult)(xmlResult);
|
|
22
|
+
}
|
|
23
|
+
return (0, types_1.getPassedResult)();
|
|
24
|
+
};
|
|
25
|
+
exports.verifyWebpackBundle = verifyWebpackBundle;
|
|
26
|
+
//# sourceMappingURL=verifyWebpackBundle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifyWebpackBundle.js","sourceRoot":"","sources":["../../src/steps/verifyWebpackBundle.ts"],"names":[],"mappings":";;;AAAA,8DAAmE;AAEnE,gDAAmD;AAGnD,0DAAkE;AAElE,mCAA2D;AAepD,MAAM,mBAAmB,GAI5B,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE;IAC7B,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IAEvE,4DAA4D;IAC5D,MAAM,IAAA,+CAA0B,EAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAElD,MAAM,kBAAkB,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAEtC,OAAO,CAAC,GAAG,CAAC,iEAAiE,CAAC,CAAC;IAC/E,MAAM,YAAY,GAAG,MAAM,IAAA,uBAAa,EAAC,cAAc,EAAE,iBAAiB,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IAE7F,IAAI,YAAY,YAAY,KAAK,EAAE;QACjC,OAAO,IAAA,uBAAe,EAAC,YAAY,CAAC,CAAC;KACtC;IAED,8DAA8D;IAC9D,MAAM,SAAS,GAAG,MAAM,IAAA,8CAA2B,EAAC,OAAO,EAAE,MAAM,EAAE,kBAAkB,CAAC,CAAC;IAEzF,IAAI,SAAS,YAAY,KAAK,EAAE;QAC9B,OAAO,IAAA,uBAAe,EAAC,SAAS,CAAC,CAAC;KACnC;IAED,OAAO,IAAA,uBAAe,GAAE,CAAC;AAC3B,CAAC,CAAC;AA3BW,QAAA,mBAAmB,uBA2B9B"}
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
exports.verifyWrmPluginHasValidConfig = void 0;
|
|
7
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
+
const paths_1 = require("../paths");
|
|
9
|
+
const pom_1 = require("../pom");
|
|
10
|
+
const webpackWrmPlugin_1 = require("../webpackWrmPlugin");
|
|
11
|
+
const types_1 = require("./types");
|
|
12
|
+
const verifyWrmPluginHasValidConfig = async (options, payload) => {
|
|
13
|
+
const { pomConfig, pomFile, wrmWebpackPlugin } = payload;
|
|
14
|
+
const pomXml = (0, pom_1.getPomXml)(pomConfig);
|
|
15
|
+
if (pomXml instanceof Error) {
|
|
16
|
+
const error = new Error(`😔 We can't parse the XML from "${chalk_1.default.green((0, paths_1.getRelativePath)(pomFile))}" pom file. Bummer`);
|
|
17
|
+
return (0, types_1.getFailedResult)(error);
|
|
18
|
+
}
|
|
19
|
+
const result = await (0, webpackWrmPlugin_1.checkWrmPluginHasValidConfig)(pomXml, wrmWebpackPlugin);
|
|
20
|
+
if (result instanceof Error) {
|
|
21
|
+
return (0, types_1.getFailedResult)(result);
|
|
22
|
+
}
|
|
23
|
+
return (0, types_1.getPassedResult)({
|
|
24
|
+
pomXml,
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
exports.verifyWrmPluginHasValidConfig = verifyWrmPluginHasValidConfig;
|
|
28
|
+
//# sourceMappingURL=verifyWrmPluginHasValidConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifyWrmPluginHasValidConfig.js","sourceRoot":"","sources":["../../src/steps/verifyWrmPluginHasValidConfig.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,oCAA2C;AAC3C,gCAAmC;AAGnC,0DAAmE;AAEnE,mCAA2D;AAapD,MAAM,6BAA6B,GAGtC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE;IAC7B,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC;IAEzD,MAAM,MAAM,GAAG,IAAA,eAAS,EAAC,SAAS,CAAC,CAAC;IAEpC,IAAI,MAAM,YAAY,KAAK,EAAE;QAC3B,MAAM,KAAK,GAAG,IAAI,KAAK,CACrB,mCAAmC,eAAK,CAAC,KAAK,CAAC,IAAA,uBAAe,EAAC,OAAO,CAAC,CAAC,oBAAoB,CAC7F,CAAC;QAEF,OAAO,IAAA,uBAAe,EAAC,KAAK,CAAC,CAAC;KAC/B;IAED,MAAM,MAAM,GAAG,MAAM,IAAA,+CAA4B,EAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAE5E,IAAI,MAAM,YAAY,KAAK,EAAE;QAC3B,OAAO,IAAA,uBAAe,EAAC,MAAM,CAAC,CAAC;KAChC;IAED,OAAO,IAAA,uBAAe,EAAC;QACrB,MAAM;KACP,CAAC,CAAC;AACL,CAAC,CAAC;AAzBW,QAAA,6BAA6B,iCAyBxC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.verifyWrmPluginScanFolders = void 0;
|
|
4
|
+
const webpackWrmPlugin_1 = require("../webpackWrmPlugin");
|
|
5
|
+
const types_1 = require("./types");
|
|
6
|
+
const verifyWrmPluginScanFolders = async (options, payload) => {
|
|
7
|
+
const { pomFile, pomXml, wrmWebpackPlugin } = payload;
|
|
8
|
+
const result = await (0, webpackWrmPlugin_1.checkWrmScanFoldersIsValid)(pomXml, pomFile, wrmWebpackPlugin);
|
|
9
|
+
if (result instanceof Error) {
|
|
10
|
+
return (0, types_1.getFailedResult)(result);
|
|
11
|
+
}
|
|
12
|
+
return (0, types_1.getPassedResult)();
|
|
13
|
+
};
|
|
14
|
+
exports.verifyWrmPluginScanFolders = verifyWrmPluginScanFolders;
|
|
15
|
+
//# sourceMappingURL=verifyWrmPluginScanFolders.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifyWrmPluginScanFolders.js","sourceRoot":"","sources":["../../src/steps/verifyWrmPluginScanFolders.ts"],"names":[],"mappings":";;;AAEA,0DAAiE;AAEjE,mCAA2D;AAWpD,MAAM,0BAA0B,GAGnC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE;IAC7B,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC;IAEtD,MAAM,MAAM,GAAG,MAAM,IAAA,6CAA0B,EAAC,MAAM,EAAE,OAAO,EAAE,gBAAgB,CAAC,CAAC;IAEnF,IAAI,MAAM,YAAY,KAAK,EAAE;QAC3B,OAAO,IAAA,uBAAe,EAAC,MAAM,CAAC,CAAC;KAChC;IAED,OAAO,IAAA,uBAAe,GAAE,CAAC;AAC3B,CAAC,CAAC;AAbW,QAAA,0BAA0B,8BAarC"}
|
|
@@ -0,0 +1,139 @@
|
|
|
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
|
+
exports.verifyWrmRuntime = void 0;
|
|
7
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
+
const inquirer_1 = __importDefault(require("inquirer"));
|
|
9
|
+
const inquirer_autocomplete_prompt_1 = __importDefault(require("inquirer-autocomplete-prompt"));
|
|
10
|
+
const valid_url_1 = __importDefault(require("valid-url"));
|
|
11
|
+
const applicationUrls_1 = require("../applicationUrls");
|
|
12
|
+
const atlassianPluginXml_1 = require("../atlassianPluginXml");
|
|
13
|
+
const pom_1 = require("../pom");
|
|
14
|
+
const webpackWrmPlugin_1 = require("../webpackWrmPlugin");
|
|
15
|
+
const fetchWithTimeout_1 = require("../wrm/fetchWithTimeout");
|
|
16
|
+
const wrmRestApi_1 = require("../wrm/wrmRestApi");
|
|
17
|
+
const types_1 = require("./types");
|
|
18
|
+
inquirer_1.default.registerPrompt('autocomplete', inquirer_autocomplete_prompt_1.default);
|
|
19
|
+
const verifyWrmRuntime = async (options, payload) => {
|
|
20
|
+
const { pomFile, pomXml } = payload;
|
|
21
|
+
// Skip running in-app WRM check
|
|
22
|
+
if (options.noWrm) {
|
|
23
|
+
return (0, types_1.getPassedResult)();
|
|
24
|
+
}
|
|
25
|
+
if (!options.yes) {
|
|
26
|
+
console.log();
|
|
27
|
+
console.log(`So far, we haven't found any issues with the ${chalk_1.default.bold(webpackWrmPlugin_1.WRM_PLUGIN_NAME)} webpack plugin or in project configuration.`);
|
|
28
|
+
console.log(`Additionally, we can check if the generated bundles from webpack can be loaded by the ${chalk_1.default.bold('Web-Resource Manager')} (WRM) in the application runtime.`);
|
|
29
|
+
console.log(`For that, you will haven to run your project first. You can run the project using "${chalk_1.default.bold('atlas-run')}" command from ${chalk_1.default.bold('Atlassian SDK')}`);
|
|
30
|
+
console.log('You can read more about this command here: https://developer.atlassian.com/server/framework/atlassian-sdk/atlas-run/');
|
|
31
|
+
console.log();
|
|
32
|
+
}
|
|
33
|
+
// Confirm running WRM runtime check
|
|
34
|
+
if (!options.yes) {
|
|
35
|
+
const { confirmCheckingWrmRuntime } = await inquirer_1.default.prompt({
|
|
36
|
+
type: 'confirm',
|
|
37
|
+
name: 'confirmCheckingWrmRuntime',
|
|
38
|
+
message: `Should we verify the WRM runtime now?`,
|
|
39
|
+
});
|
|
40
|
+
if (!confirmCheckingWrmRuntime) {
|
|
41
|
+
// TODO: Add some message?
|
|
42
|
+
return (0, types_1.getPassedResult)();
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
console.log('👀 We will run WRM runtime check now. This might take some time...');
|
|
46
|
+
let applicationUrl = options.applicationUrl;
|
|
47
|
+
if (!applicationUrl) {
|
|
48
|
+
console.log();
|
|
49
|
+
console.log('To run WRM runime check, you need to provide a full URL of the running Atlassian Server or DC application like e.g. Jira.');
|
|
50
|
+
console.log('If you are using Atlassian SDK you can check the application default ports and paths here:');
|
|
51
|
+
console.log('https://developer.atlassian.com/server/framework/atlassian-sdk/working-with-the-sdk/#supported-atlassian-applications-and-default-ports');
|
|
52
|
+
console.log();
|
|
53
|
+
const OTHER_URL = Symbol('otherUrl');
|
|
54
|
+
({ applicationUrl } = (await inquirer_1.default.prompt({
|
|
55
|
+
type: 'list',
|
|
56
|
+
name: 'applicationUrl',
|
|
57
|
+
message: `Select the full URL to application you are running or select "other" to type a custom URL:`,
|
|
58
|
+
choices: [
|
|
59
|
+
{
|
|
60
|
+
name: 'other',
|
|
61
|
+
value: OTHER_URL,
|
|
62
|
+
},
|
|
63
|
+
new inquirer_1.default.Separator(),
|
|
64
|
+
...applicationUrls_1.applicationUrls.map(({ product, defaultUrl }) => ({
|
|
65
|
+
name: `${defaultUrl} - ${product}`,
|
|
66
|
+
value: defaultUrl,
|
|
67
|
+
})),
|
|
68
|
+
new inquirer_1.default.Separator(),
|
|
69
|
+
],
|
|
70
|
+
})));
|
|
71
|
+
// Let the user type the custom URL
|
|
72
|
+
if (applicationUrl === OTHER_URL) {
|
|
73
|
+
const defaultUrl = 'http://localhost:2990/jira';
|
|
74
|
+
({ applicationUrl } = (await inquirer_1.default.prompt({
|
|
75
|
+
type: 'input',
|
|
76
|
+
name: 'applicationUrl',
|
|
77
|
+
message: `What is the full URL to your running application? E.g ${defaultUrl}`,
|
|
78
|
+
validate(input) {
|
|
79
|
+
const isValid = Boolean(input && valid_url_1.default.isWebUri(input));
|
|
80
|
+
return isValid ? isValid : 'Provided URL is not valid. Try correcting your answer.';
|
|
81
|
+
},
|
|
82
|
+
transformer(input) {
|
|
83
|
+
// Remove "/" from the end
|
|
84
|
+
return input && input.trim().replace(/\/+$/, '');
|
|
85
|
+
},
|
|
86
|
+
default: defaultUrl,
|
|
87
|
+
})));
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
// Get list of generated web-resources
|
|
91
|
+
const webResourceDefinitions = await (0, atlassianPluginXml_1.getPluginWebResourceDefinitions)(pomFile, pomXml);
|
|
92
|
+
if (webResourceDefinitions instanceof Error) {
|
|
93
|
+
return (0, types_1.getFailedResult)(new Error("We couldn't parse the XML of some of web-resources generated by webpack."));
|
|
94
|
+
}
|
|
95
|
+
// TODO: This should be checked after we run webpack bundle
|
|
96
|
+
if (!webResourceDefinitions.length) {
|
|
97
|
+
return (0, types_1.getFailedResult)(new Error("We couldn't find any definitions of the web-resources in the XML files generated by webpack."));
|
|
98
|
+
}
|
|
99
|
+
// Call WRM API to get some resources
|
|
100
|
+
let webResourceKey = options.resourceKey;
|
|
101
|
+
// TODO: Check if provided web-resource belongs to the resource from generated resources
|
|
102
|
+
if (!webResourceKey) {
|
|
103
|
+
({ webResourceKey } = (await inquirer_1.default.prompt({
|
|
104
|
+
// @ts-expect-error We are using inquirer plugin that is causing TS error
|
|
105
|
+
type: 'autocomplete',
|
|
106
|
+
name: 'webResourceKey',
|
|
107
|
+
message: 'Select a web-resource key you want to verify:',
|
|
108
|
+
source: (answersSoFar, input) => {
|
|
109
|
+
const userInput = input || '';
|
|
110
|
+
return webResourceDefinitions
|
|
111
|
+
.filter((webResource) => webResource.key.match(new RegExp(userInput, 'i')))
|
|
112
|
+
.map((webResource) => ({
|
|
113
|
+
name: webResource.key,
|
|
114
|
+
value: webResource.key,
|
|
115
|
+
}));
|
|
116
|
+
},
|
|
117
|
+
})));
|
|
118
|
+
}
|
|
119
|
+
// Get full web-resource key
|
|
120
|
+
const pluginKey = (0, pom_1.getAtlassianPluginKeyFromPom)(pomXml);
|
|
121
|
+
const fullWebResourceKey = (0, atlassianPluginXml_1.getFullWebResourceKey)(pluginKey, webResourceKey);
|
|
122
|
+
// TODO: Check if the application is running
|
|
123
|
+
const webResources = await (0, wrmRestApi_1.fetchWebResources)(applicationUrl, fullWebResourceKey, options.timeout);
|
|
124
|
+
if (webResources instanceof fetchWithTimeout_1.FetchTimeoutError) {
|
|
125
|
+
return (0, types_1.getRestTimeoutResult)(wrmRestApi_1.fetchWebResources.name, options.timeout);
|
|
126
|
+
}
|
|
127
|
+
if (webResources instanceof Error) {
|
|
128
|
+
return (0, types_1.getFailedResult)(webResources);
|
|
129
|
+
}
|
|
130
|
+
if (webResources.length < 1) {
|
|
131
|
+
return (0, types_1.getFailedResult)(new Error(`We didn't manage to retrieve any resources for the "${webResourceKey}" web-resource with WRM runtime.`));
|
|
132
|
+
}
|
|
133
|
+
return (0, types_1.getPassedResult)({
|
|
134
|
+
webResourceKey,
|
|
135
|
+
webResources,
|
|
136
|
+
});
|
|
137
|
+
};
|
|
138
|
+
exports.verifyWrmRuntime = verifyWrmRuntime;
|
|
139
|
+
//# sourceMappingURL=verifyWrmRuntime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifyWrmRuntime.js","sourceRoot":"","sources":["../../src/steps/verifyWrmRuntime.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,wDAAgC;AAChC,gGAAsE;AACtE,0DAAiC;AAEjC,wDAAqD;AACrD,8DAA+F;AAC/F,gCAAsD;AAEtD,0DAAsD;AACtD,8DAA4D;AAE5D,kDAAsD;AAEtD,mCAAiF;AAEjF,kBAAQ,CAAC,cAAc,CAAC,cAAc,EAAE,sCAA0B,CAAC,CAAC;AAc7D,MAAM,gBAAgB,GAIzB,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE;IAC7B,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAEpC,gCAAgC;IAChC,IAAI,OAAO,CAAC,KAAK,EAAE;QACjB,OAAO,IAAA,uBAAe,GAAE,CAAC;KAC1B;IAED,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;QAChB,OAAO,CAAC,GAAG,EAAE,CAAC;QACd,OAAO,CAAC,GAAG,CACT,gDAAgD,eAAK,CAAC,IAAI,CACxD,kCAAe,CAChB,8CAA8C,CAChD,CAAC;QACF,OAAO,CAAC,GAAG,CACT,yFAAyF,eAAK,CAAC,IAAI,CACjG,sBAAsB,CACvB,oCAAoC,CACtC,CAAC;QACF,OAAO,CAAC,GAAG,CACT,sFAAsF,eAAK,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