From a6d33f08ac53676d02df3acceb1dea70b96eec4a Mon Sep 17 00:00:00 2001 From: Shohei Ueda <30958501+peaceiris@users.noreply.github.com> Date: Mon, 23 Sep 2019 10:58:19 +0900 Subject: [PATCH] config: enhance tsconfig.json (#44) * config: enhance tsconfig.json (Set sourceMap and removeComments to true) * gha: Add pull_request trigger, close #43 * config: Add waring emoji --- .github/workflows/test.yml | 1 + lib/get-latest-version.js | 1 + lib/get-latest-version.js.map | 1 + lib/get-os.js | 2 +- lib/get-os.js.map | 1 + lib/get-url.js | 3 +-- lib/get-url.js.map | 1 + lib/index.js | 3 +-- lib/index.js.map | 1 + lib/installer.js | 2 +- lib/installer.js.map | 1 + package.json | 2 +- tsconfig.json | 4 ++-- 13 files changed, 14 insertions(+), 9 deletions(-) create mode 100644 lib/get-latest-version.js.map create mode 100644 lib/get-os.js.map create mode 100644 lib/get-url.js.map create mode 100644 lib/index.js.map create mode 100644 lib/installer.js.map diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fcc7335..be96e26 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,6 +1,7 @@ name: 'Test' on: + pull_request: push: paths: - '**' diff --git a/lib/get-latest-version.js b/lib/get-latest-version.js index 9eeadfb..b882e25 100644 --- a/lib/get-latest-version.js +++ b/lib/get-latest-version.js @@ -20,3 +20,4 @@ function getLatestVersion() { }); } exports.default = getLatestVersion; +//# sourceMappingURL=get-latest-version.js.map \ No newline at end of file diff --git a/lib/get-latest-version.js.map b/lib/get-latest-version.js.map new file mode 100644 index 0000000..011fa18 --- /dev/null +++ b/lib/get-latest-version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"get-latest-version.js","sourceRoot":"","sources":["../src/get-latest-version.ts"],"names":[],"mappings":";;AAAA,MAAM,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC,cAAc,CAAC;AAEhE,SAAwB,gBAAgB;IACtC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,MAAM,GAAG,GAAG,IAAI,cAAc,EAAE,CAAC;QACjC,MAAM,GAAG,GAAW,gDAAgD,CAAC;QACrE,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QACrB,GAAG,CAAC,IAAI,EAAE,CAAC;QACX,GAAG,CAAC,kBAAkB,GAAG;YACvB,IAAI,GAAG,CAAC,UAAU,KAAK,CAAC,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,EAAE;gBAC9C,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;gBAC5C,MAAM,aAAa,GAAW,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC;gBACrD,OAAO,CAAC,aAAa,CAAC,CAAC;aACxB;iBAAM,IAAI,GAAG,CAAC,UAAU,KAAK,CAAC,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,EAAE;gBACrD,MAAM,CAAC,qBAAqB,GAAG,CAAC,MAAM,OAAO,GAAG,EAAE,CAAC,CAAC;aACrD;QACH,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAhBD,mCAgBC"} \ No newline at end of file diff --git a/lib/get-os.js b/lib/get-os.js index 014188c..ec43dd6 100644 --- a/lib/get-os.js +++ b/lib/get-os.js @@ -9,10 +9,10 @@ function getOS(platform) { } else if (platform === 'win32') { return 'Windows'; - // throw new Error("Windows is not supported"); } else { throw new Error(`${platform} is not supported`); } } exports.default = getOS; +//# sourceMappingURL=get-os.js.map \ No newline at end of file diff --git a/lib/get-os.js.map b/lib/get-os.js.map new file mode 100644 index 0000000..652b32b --- /dev/null +++ b/lib/get-os.js.map @@ -0,0 +1 @@ +{"version":3,"file":"get-os.js","sourceRoot":"","sources":["../src/get-os.ts"],"names":[],"mappings":";;AAAA,SAAwB,KAAK,CAAC,QAAgB;IAC5C,IAAI,QAAQ,KAAK,OAAO,EAAE;QACxB,OAAO,OAAO,CAAC;KAChB;SAAM,IAAI,QAAQ,KAAK,QAAQ,EAAE;QAChC,OAAO,OAAO,CAAC;KAChB;SAAM,IAAI,QAAQ,KAAK,OAAO,EAAE;QAC/B,OAAO,SAAS,CAAC;KAElB;SAAM;QACL,MAAM,IAAI,KAAK,CAAC,GAAG,QAAQ,mBAAmB,CAAC,CAAC;KACjD;AACH,CAAC;AAXD,wBAWC"} \ No newline at end of file diff --git a/lib/get-url.js b/lib/get-url.js index dc24057..6cb5c1a 100644 --- a/lib/get-url.js +++ b/lib/get-url.js @@ -7,8 +7,6 @@ function getURL(os, extended, version) { } else { return ''; - // } else { - // throw new Error(`Invalid input (extended): ${extended}`); } }; const ext = (os) => { @@ -25,3 +23,4 @@ function getURL(os, extended, version) { return url; } exports.default = getURL; +//# sourceMappingURL=get-url.js.map \ No newline at end of file diff --git a/lib/get-url.js.map b/lib/get-url.js.map new file mode 100644 index 0000000..1b4b77a --- /dev/null +++ b/lib/get-url.js.map @@ -0,0 +1 @@ +{"version":3,"file":"get-url.js","sourceRoot":"","sources":["../src/get-url.ts"],"names":[],"mappings":";;AAAA,SAAwB,MAAM,CAC5B,EAAU,EACV,QAAgB,EAChB,OAAe;IAEf,MAAM,WAAW,GAAG,CAAC,QAAgB,EAAE,EAAE;QACvC,IAAI,QAAQ,KAAK,MAAM,EAAE;YACvB,OAAO,WAAW,CAAC;SACpB;aAAM;YACL,OAAO,EAAE,CAAC;SAGX;IACH,CAAC,CAAC;IAEF,MAAM,GAAG,GAAG,CAAC,EAAU,EAAE,EAAE;QACzB,IAAI,EAAE,KAAK,SAAS,EAAE;YACpB,OAAO,KAAK,CAAC;SACd;aAAM;YACL,OAAO,QAAQ,CAAC;SACjB;IACH,CAAC,CAAC;IAEF,MAAM,QAAQ,GAAW,QAAQ,WAAW,CAC1C,QAAQ,CACT,GAAG,OAAO,IAAI,EAAE,QAAQ,CAAC;IAC1B,MAAM,OAAO,GAAW,oDAAoD,CAAC;IAC7E,MAAM,GAAG,GAAW,GAAG,OAAO,KAAK,OAAO,IAAI,QAAQ,IAAI,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC;IAEpE,OAAO,GAAG,CAAC;AACb,CAAC;AA9BD,yBA8BC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js index a00b600..86797f3 100644 --- a/lib/index.js +++ b/lib/index.js @@ -23,11 +23,9 @@ const core = __importStar(require("@actions/core")); const exec = __importStar(require("@actions/exec")); const get_latest_version_1 = __importDefault(require("./get-latest-version")); const installer_1 = __importDefault(require("./installer")); -// most @actions toolkit packages have async methods function run() { return __awaiter(this, void 0, void 0, function* () { const dump = () => __awaiter(this, void 0, void 0, function* () { - // Show version yield exec.exec('hugo version'); }); try { @@ -55,3 +53,4 @@ function run() { }); } run(); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lib/index.js.map b/lib/index.js.map new file mode 100644 index 0000000..d3c93ff --- /dev/null +++ b/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,oDAAsC;AACtC,oDAAsC;AACtC,8EAAoD;AACpD,4DAAoC;AAGpC,SAAe,GAAG;;QAChB,MAAM,IAAI,GAAG,GAAS,EAAE;YAEtB,MAAM,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAClC,CAAC,CAAA,CAAC;QAEF,IAAI;YACF,MAAM,WAAW,GAAW,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;YAE1D,IAAI,WAAW,KAAK,EAAE,IAAI,WAAW,KAAK,QAAQ,EAAE;gBAClD,4BAAgB,EAAE,CAAC,IAAI,CACrB,UAAe,aAAa;;wBAC1B,OAAO,CAAC,GAAG,CAAC,iBAAiB,aAAa,KAAK,WAAW,GAAG,CAAC,CAAC;wBAC/D,MAAM,mBAAS,CAAC,aAAa,CAAC,CAAC;wBAC/B,MAAM,IAAI,EAAE,CAAC;oBACf,CAAC;iBAAA,EACD,UAAS,KAAK;oBACZ,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;gBACxB,CAAC,CACF,CAAC;aACH;iBAAM;gBACL,OAAO,CAAC,GAAG,CAAC,iBAAiB,WAAW,EAAE,CAAC,CAAC;gBAC5C,MAAM,mBAAS,CAAC,WAAW,CAAC,CAAC;gBAC7B,MAAM,IAAI,EAAE,CAAC;aACd;SACF;QAAC,OAAO,KAAK,EAAE;YACd,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;SAC/B;IACH,CAAC;CAAA;AAED,GAAG,EAAE,CAAC"} \ No newline at end of file diff --git a/lib/installer.js b/lib/installer.js index 2fd3641..81f30da 100644 --- a/lib/installer.js +++ b/lib/installer.js @@ -36,7 +36,6 @@ function installer(version) { const hugoPath = `${process.env.HOME}/bin`; yield io.mkdirP(hugoPath); core.addPath(hugoPath); - // Download and extract Hugo binary const hugoAssets = yield tc.downloadTool(hugoURL); let hugoBin = ''; if (osName === 'Windows') { @@ -55,3 +54,4 @@ function installer(version) { }); } exports.default = installer; +//# sourceMappingURL=installer.js.map \ No newline at end of file diff --git a/lib/installer.js.map b/lib/installer.js.map new file mode 100644 index 0000000..fe5b335 --- /dev/null +++ b/lib/installer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"installer.js","sourceRoot":"","sources":["../src/installer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,oDAAsC;AACtC,wDAA0C;AAC1C,gDAAkC;AAClC,sDAA6B;AAC7B,wDAA+B;AAE/B,SAA8B,SAAS,CAAC,OAAe;;QACrD,IAAI;YACF,MAAM,QAAQ,GAAW,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;YACnD,OAAO,CAAC,GAAG,CAAC,kBAAkB,QAAQ,EAAE,CAAC,CAAC;YAE1C,MAAM,MAAM,GAAW,gBAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;YAC/C,OAAO,CAAC,GAAG,CAAC,qBAAqB,MAAM,EAAE,CAAC,CAAC;YAE3C,MAAM,OAAO,GAAW,iBAAM,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;YAC1D,IAAI,CAAC,KAAK,CAAC,YAAY,OAAO,EAAE,CAAC,CAAC;YAElC,MAAM,QAAQ,GAAW,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC;YACnD,MAAM,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAC1B,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;YAGvB,MAAM,UAAU,GAAW,MAAM,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;YAC1D,IAAI,OAAO,GAAW,EAAE,CAAC;YACzB,IAAI,MAAM,KAAK,SAAS,EAAE;gBACxB,MAAM,mBAAmB,GAAW,MAAM,EAAE,CAAC,UAAU,CACrD,UAAU,EACV,MAAM,CACP,CAAC;gBACF,OAAO,GAAG,GAAG,mBAAmB,WAAW,CAAC;aAC7C;iBAAM;gBACL,MAAM,mBAAmB,GAAW,MAAM,EAAE,CAAC,UAAU,CACrD,UAAU,EACV,MAAM,CACP,CAAC;gBACF,OAAO,GAAG,GAAG,mBAAmB,OAAO,CAAC;aACzC;YACD,MAAM,EAAE,CAAC,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;SAChC;QAAC,OAAO,KAAK,EAAE;YACd,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;SAC/B;IACH,CAAC;CAAA;AAnCD,4BAmCC"} \ No newline at end of file diff --git a/package.json b/package.json index 3901998..2696297 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "skipCI": true, "hooks": { "pre-commit": "lint-staged", - "post-commit": "npm run tsc && npm run build && echo 'Do not forget to Commit and Push ./lib and ./node_modules'" + "post-commit": "npm run tsc && npm run build && echo '⚠️ Do not forget to Commit and Push ./lib and ./node_modules'" } }, "lint-staged": { diff --git a/tsconfig.json b/tsconfig.json index 7e0f9c2..bc71c16 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,13 +9,13 @@ // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ // "declaration": true, /* Generates corresponding '.d.ts' file. */ // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ + "sourceMap": true, /* Generates corresponding '.map' file. */ // "outFile": "./", /* Concatenate and emit output to single file. */ "outDir": "./lib", /* Redirect output structure to the directory. */ "rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ // "composite": true, /* Enable project compilation */ // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ + "removeComments": true, /* Do not emit comments to output. */ // "noEmit": true, /* Do not emit outputs. */ // "importHelpers": true, /* Import emit helpers from 'tslib'. */ // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */