Fix release mode
This commit is contained in:
@@ -1,4 +1,13 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||||
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||||
|
return new (P || (P = Promise))(function (resolve, reject) {
|
||||||
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||||
|
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||||
|
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||||
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||||
|
});
|
||||||
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.Action = void 0;
|
exports.Action = void 0;
|
||||||
const ErrorMessage_1 = require("./ErrorMessage");
|
const ErrorMessage_1 = require("./ErrorMessage");
|
||||||
@@ -8,24 +17,27 @@ class Action {
|
|||||||
this.releases = releases;
|
this.releases = releases;
|
||||||
this.uploader = uploader;
|
this.uploader = uploader;
|
||||||
}
|
}
|
||||||
async perform() {
|
perform() {
|
||||||
const releaseResponse = await this.createOrUpdateRelease();
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
const releaseResponse = yield this.createOrUpdateRelease();
|
||||||
const releaseId = releaseResponse.data.id;
|
const releaseId = releaseResponse.data.id;
|
||||||
const uploadUrl = releaseResponse.data.upload_url;
|
const uploadUrl = releaseResponse.data.upload_url;
|
||||||
const artifacts = this.inputs.artifacts;
|
const artifacts = this.inputs.artifacts;
|
||||||
if (artifacts.length > 0) {
|
if (artifacts.length > 0) {
|
||||||
await this.uploader.uploadArtifacts(artifacts, releaseId, uploadUrl);
|
yield this.uploader.uploadArtifacts(artifacts, releaseId, uploadUrl);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
async createOrUpdateRelease() {
|
createOrUpdateRelease() {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
if (this.inputs.allowUpdates) {
|
if (this.inputs.allowUpdates) {
|
||||||
try {
|
try {
|
||||||
const getResponse = await this.releases.getByTag(this.inputs.tag);
|
const getResponse = yield this.releases.getByTag(this.inputs.tag);
|
||||||
return await this.updateRelease(getResponse.data.id);
|
return yield this.updateRelease(getResponse.data.id);
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
if (Action.noPublishedRelease(error)) {
|
if (Action.noPublishedRelease(error)) {
|
||||||
return await this.updateDraftOrCreateRelease();
|
return yield this.updateDraftOrCreateRelease();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
throw error;
|
throw error;
|
||||||
@@ -33,35 +45,44 @@ class Action {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return await this.createRelease();
|
return yield this.createRelease();
|
||||||
}
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
async updateRelease(id) {
|
updateRelease(id) {
|
||||||
return await this.releases.update(id, this.inputs.tag, this.inputs.updatedReleaseBody, this.inputs.commit, this.inputs.draft, this.inputs.updatedReleaseName, this.inputs.prerelease);
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
return yield this.releases.update(id, this.inputs.tag, this.inputs.updatedReleaseBody, this.inputs.commit, this.inputs.draft, this.inputs.updatedReleaseName, this.inputs.prerelease);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
static noPublishedRelease(error) {
|
static noPublishedRelease(error) {
|
||||||
const errorMessage = new ErrorMessage_1.ErrorMessage(error);
|
const errorMessage = new ErrorMessage_1.ErrorMessage(error);
|
||||||
return errorMessage.status == 404;
|
return errorMessage.status == 404;
|
||||||
}
|
}
|
||||||
async updateDraftOrCreateRelease() {
|
updateDraftOrCreateRelease() {
|
||||||
const draftReleaseId = await this.findMatchingDraftReleaseId();
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
const draftReleaseId = yield this.findMatchingDraftReleaseId();
|
||||||
if (draftReleaseId) {
|
if (draftReleaseId) {
|
||||||
return await this.updateRelease(draftReleaseId);
|
return yield this.updateRelease(draftReleaseId);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return await this.createRelease();
|
return yield this.createRelease();
|
||||||
}
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
async findMatchingDraftReleaseId() {
|
findMatchingDraftReleaseId() {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const tag = this.inputs.tag;
|
const tag = this.inputs.tag;
|
||||||
const response = await this.releases.listReleases();
|
const response = yield this.releases.listReleases();
|
||||||
const releases = response.data;
|
const releases = response.data;
|
||||||
const draftRelease = releases.find(release => release.draft && release.tag_name == tag);
|
const draftRelease = releases.find(release => release.draft && release.tag_name == tag);
|
||||||
return draftRelease === null || draftRelease === void 0 ? void 0 : draftRelease.id;
|
return draftRelease === null || draftRelease === void 0 ? void 0 : draftRelease.id;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
async createRelease() {
|
createRelease() {
|
||||||
const response = await this.releases.create(this.inputs.tag, this.inputs.createdReleaseBody, this.inputs.commit, this.inputs.draft, this.inputs.createdReleaseName, this.inputs.prerelease);
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
const response = yield this.releases.create(this.inputs.tag, this.inputs.createdReleaseBody, this.inputs.commit, this.inputs.draft, this.inputs.createdReleaseName, this.inputs.prerelease);
|
||||||
return response;
|
return response;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
exports.Action = Action;
|
exports.Action = Action;
|
||||||
|
|||||||
@@ -18,6 +18,15 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|||||||
__setModuleDefault(result, mod);
|
__setModuleDefault(result, mod);
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||||
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||||
|
return new (P || (P = Promise))(function (resolve, reject) {
|
||||||
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||||
|
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||||
|
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||||
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||||
|
});
|
||||||
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.GithubArtifactUploader = void 0;
|
exports.GithubArtifactUploader = void 0;
|
||||||
const core = __importStar(require("@actions/core"));
|
const core = __importStar(require("@actions/core"));
|
||||||
@@ -26,31 +35,36 @@ class GithubArtifactUploader {
|
|||||||
this.releases = releases;
|
this.releases = releases;
|
||||||
this.replacesExistingArtifacts = replacesExistingArtifacts;
|
this.replacesExistingArtifacts = replacesExistingArtifacts;
|
||||||
}
|
}
|
||||||
async uploadArtifacts(artifacts, releaseId, uploadUrl) {
|
uploadArtifacts(artifacts, releaseId, uploadUrl) {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
if (this.replacesExistingArtifacts) {
|
if (this.replacesExistingArtifacts) {
|
||||||
await this.deleteUpdatedArtifacts(artifacts, releaseId);
|
yield this.deleteUpdatedArtifacts(artifacts, releaseId);
|
||||||
}
|
}
|
||||||
for (const artifact of artifacts) {
|
for (const artifact of artifacts) {
|
||||||
await this.uploadArtifact(artifact, releaseId, uploadUrl);
|
yield this.uploadArtifact(artifact, releaseId, uploadUrl);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
async uploadArtifact(artifact, releaseId, uploadUrl, retry = 3) {
|
uploadArtifact(artifact, releaseId, uploadUrl, retry = 3) {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
try {
|
try {
|
||||||
core.debug(`Uploading artifact ${artifact.name}...`);
|
core.debug(`Uploading artifact ${artifact.name}...`);
|
||||||
await this.releases.uploadArtifact(uploadUrl, artifact.contentLength, artifact.contentType, artifact.readFile(), artifact.name, releaseId);
|
yield this.releases.uploadArtifact(uploadUrl, artifact.contentLength, artifact.contentType, artifact.readFile(), artifact.name, releaseId);
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
if (error.status >= 500 && retry > 0) {
|
if (error.status >= 500 && retry > 0) {
|
||||||
core.warning(`Failed to upload artifact ${artifact.name}. ${error.message}. Retrying...`);
|
core.warning(`Failed to upload artifact ${artifact.name}. ${error.message}. Retrying...`);
|
||||||
await this.uploadArtifact(artifact, releaseId, uploadUrl, retry - 1);
|
yield this.uploadArtifact(artifact, releaseId, uploadUrl, retry - 1);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
core.warning(`Failed to upload artifact ${artifact.name}. ${error.message}.`);
|
core.warning(`Failed to upload artifact ${artifact.name}. ${error.message}.`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
async deleteUpdatedArtifacts(artifacts, releaseId) {
|
deleteUpdatedArtifacts(artifacts, releaseId) {
|
||||||
const response = await this.releases.listArtifactsForRelease(releaseId);
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
const response = yield this.releases.listArtifactsForRelease(releaseId);
|
||||||
const releaseAssets = response.data;
|
const releaseAssets = response.data;
|
||||||
const assetByName = {};
|
const assetByName = {};
|
||||||
releaseAssets.forEach(asset => {
|
releaseAssets.forEach(asset => {
|
||||||
@@ -60,9 +74,10 @@ class GithubArtifactUploader {
|
|||||||
const asset = assetByName[artifact.name];
|
const asset = assetByName[artifact.name];
|
||||||
if (asset) {
|
if (asset) {
|
||||||
core.debug(`Deleting existing artifact ${artifact.name}...`);
|
core.debug(`Deleting existing artifact ${artifact.name}...`);
|
||||||
await this.releases.deleteArtifact(asset.id);
|
yield this.releases.deleteArtifact(asset.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
exports.GithubArtifactUploader = GithubArtifactUploader;
|
exports.GithubArtifactUploader = GithubArtifactUploader;
|
||||||
|
|||||||
15
lib/Main.js
15
lib/Main.js
@@ -18,6 +18,15 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|||||||
__setModuleDefault(result, mod);
|
__setModuleDefault(result, mod);
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||||
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||||
|
return new (P || (P = Promise))(function (resolve, reject) {
|
||||||
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||||
|
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||||
|
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||||
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||||
|
});
|
||||||
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
const github = __importStar(require("@actions/github"));
|
const github = __importStar(require("@actions/github"));
|
||||||
const core = __importStar(require("@actions/core"));
|
const core = __importStar(require("@actions/core"));
|
||||||
@@ -27,15 +36,17 @@ const Action_1 = require("./Action");
|
|||||||
const ArtifactUploader_1 = require("./ArtifactUploader");
|
const ArtifactUploader_1 = require("./ArtifactUploader");
|
||||||
const ArtifactGlobber_1 = require("./ArtifactGlobber");
|
const ArtifactGlobber_1 = require("./ArtifactGlobber");
|
||||||
const ErrorMessage_1 = require("./ErrorMessage");
|
const ErrorMessage_1 = require("./ErrorMessage");
|
||||||
async function run() {
|
function run() {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
try {
|
try {
|
||||||
const action = createAction();
|
const action = createAction();
|
||||||
await action.perform();
|
yield action.perform();
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
const errorMessage = new ErrorMessage_1.ErrorMessage(error);
|
const errorMessage = new ErrorMessage_1.ErrorMessage(error);
|
||||||
core.setFailed(errorMessage.toString());
|
core.setFailed(errorMessage.toString());
|
||||||
}
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
function createAction() {
|
function createAction() {
|
||||||
const token = core.getInput('token');
|
const token = core.getInput('token');
|
||||||
|
|||||||
@@ -1,4 +1,13 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||||
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||||
|
return new (P || (P = Promise))(function (resolve, reject) {
|
||||||
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||||
|
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||||
|
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||||
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||||
|
});
|
||||||
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.GithubReleases = void 0;
|
exports.GithubReleases = void 0;
|
||||||
class GithubReleases {
|
class GithubReleases {
|
||||||
@@ -6,7 +15,8 @@ class GithubReleases {
|
|||||||
this.inputs = inputs;
|
this.inputs = inputs;
|
||||||
this.git = git;
|
this.git = git;
|
||||||
}
|
}
|
||||||
async create(tag, body, commitHash, draft, name, prerelease) {
|
create(tag, body, commitHash, draft, name, prerelease) {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
// noinspection TypeScriptValidateJSTypes
|
// noinspection TypeScriptValidateJSTypes
|
||||||
return this.git.repos.createRelease({
|
return this.git.repos.createRelease({
|
||||||
body: body,
|
body: body,
|
||||||
@@ -18,35 +28,45 @@ class GithubReleases {
|
|||||||
target_commitish: commitHash,
|
target_commitish: commitHash,
|
||||||
tag_name: tag
|
tag_name: tag
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
async deleteArtifact(assetId) {
|
deleteArtifact(assetId) {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
return this.git.repos.deleteReleaseAsset({
|
return this.git.repos.deleteReleaseAsset({
|
||||||
asset_id: assetId,
|
asset_id: assetId,
|
||||||
owner: this.inputs.owner,
|
owner: this.inputs.owner,
|
||||||
repo: this.inputs.repo
|
repo: this.inputs.repo
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
async getByTag(tag) {
|
getByTag(tag) {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
return this.git.repos.getReleaseByTag({
|
return this.git.repos.getReleaseByTag({
|
||||||
owner: this.inputs.owner,
|
owner: this.inputs.owner,
|
||||||
repo: this.inputs.repo,
|
repo: this.inputs.repo,
|
||||||
tag: tag
|
tag: tag
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
async listArtifactsForRelease(releaseId) {
|
listArtifactsForRelease(releaseId) {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
return this.git.repos.listReleaseAssets({
|
return this.git.repos.listReleaseAssets({
|
||||||
owner: this.inputs.owner,
|
owner: this.inputs.owner,
|
||||||
release_id: releaseId,
|
release_id: releaseId,
|
||||||
repo: this.inputs.repo
|
repo: this.inputs.repo
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
async listReleases() {
|
listReleases() {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
return this.git.repos.listReleases({
|
return this.git.repos.listReleases({
|
||||||
owner: this.inputs.owner,
|
owner: this.inputs.owner,
|
||||||
repo: this.inputs.repo
|
repo: this.inputs.repo
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
async update(id, tag, body, commitHash, draft, name, prerelease) {
|
update(id, tag, body, commitHash, draft, name, prerelease) {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
// noinspection TypeScriptValidateJSTypes
|
// noinspection TypeScriptValidateJSTypes
|
||||||
return this.git.repos.updateRelease({
|
return this.git.repos.updateRelease({
|
||||||
release_id: id,
|
release_id: id,
|
||||||
@@ -59,8 +79,10 @@ class GithubReleases {
|
|||||||
target_commitish: commitHash,
|
target_commitish: commitHash,
|
||||||
tag_name: tag
|
tag_name: tag
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
async uploadArtifact(assetUrl, contentLength, contentType, file, name, releaseId) {
|
uploadArtifact(assetUrl, contentLength, contentType, file, name, releaseId) {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
return this.git.repos.uploadReleaseAsset({
|
return this.git.repos.uploadReleaseAsset({
|
||||||
url: assetUrl,
|
url: assetUrl,
|
||||||
headers: {
|
headers: {
|
||||||
@@ -73,6 +95,7 @@ class GithubReleases {
|
|||||||
release_id: releaseId,
|
release_id: releaseId,
|
||||||
repo: this.inputs.repo
|
repo: this.inputs.repo
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
exports.GithubReleases = GithubReleases;
|
exports.GithubReleases = GithubReleases;
|
||||||
|
|||||||
@@ -25,12 +25,12 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.2.6",
|
"@actions/core": "^1.2.6",
|
||||||
"@actions/github": "^4.0.0",
|
"@actions/github": "^4.0.0",
|
||||||
|
"@types/glob": "^7.1.3",
|
||||||
"add": "^2.0.6",
|
"add": "^2.0.6",
|
||||||
"glob": "^7.1.4",
|
"glob": "^7.1.4",
|
||||||
"global": "^4.4.0"
|
"global": "^4.4.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/glob": "^7.1.1",
|
|
||||||
"@types/jest": "^26.0.20",
|
"@types/jest": "^26.0.20",
|
||||||
"@types/node": "^14.14.25",
|
"@types/node": "^14.14.25",
|
||||||
"jest": "^26.1.0",
|
"jest": "^26.1.0",
|
||||||
|
|||||||
@@ -1,63 +1,12 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
/* Basic Options */
|
"target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
|
||||||
// "incremental": true, /* Enable incremental compilation */
|
|
||||||
"target": "es2019", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
|
|
||||||
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
|
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
|
||||||
// "allowJs": true, /* Allow javascript files to be compiled. */
|
|
||||||
// "checkJs": true, /* Report errors in .js files. */
|
|
||||||
// "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. */
|
|
||||||
// "outFile": "./", /* Concatenate and emit output to single file. */
|
|
||||||
"outDir": "./lib", /* Redirect output structure to the directory. */
|
"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. */
|
"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. */
|
|
||||||
// "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'. */
|
|
||||||
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
|
|
||||||
|
|
||||||
/* Strict Type-Checking Options */
|
|
||||||
"strict": true, /* Enable all strict type-checking options. */
|
"strict": true, /* Enable all strict type-checking options. */
|
||||||
"noImplicitAny": false, /* Raise error on expressions and declarations with an implied 'any' type. */
|
"noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
|
||||||
// "strictNullChecks": true, /* Enable strict null checks. */
|
|
||||||
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
|
|
||||||
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
|
|
||||||
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
|
|
||||||
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
|
|
||||||
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
|
|
||||||
|
|
||||||
/* Additional Checks */
|
|
||||||
// "noUnusedLocals": true, /* Report errors on unused locals. */
|
|
||||||
// "noUnusedParameters": true, /* Report errors on unused parameters. */
|
|
||||||
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
|
||||||
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
|
||||||
|
|
||||||
/* Module Resolution Options */
|
|
||||||
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
|
|
||||||
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
|
|
||||||
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
|
|
||||||
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
|
|
||||||
// "typeRoots": [], /* List of folders to include type definitions from. */
|
|
||||||
// "types": [], /* Type declaration files to be included in compilation. */
|
|
||||||
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
|
|
||||||
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
|
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
|
||||||
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
|
|
||||||
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
|
||||||
|
|
||||||
/* Source Map Options */
|
|
||||||
// "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
|
|
||||||
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
|
|
||||||
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
|
|
||||||
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
|
|
||||||
|
|
||||||
/* Experimental Options */
|
|
||||||
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
|
|
||||||
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
|
|
||||||
},
|
},
|
||||||
"exclude": ["node_modules", "**/*.test.ts"]
|
"exclude": ["node_modules", "**/*.test.ts"]
|
||||||
}
|
}
|
||||||
@@ -622,7 +622,7 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
"@babel/types" "^7.3.0"
|
"@babel/types" "^7.3.0"
|
||||||
|
|
||||||
"@types/glob@^7.1.1":
|
"@types/glob@^7.1.3":
|
||||||
version "7.1.3"
|
version "7.1.3"
|
||||||
resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.3.tgz#e6ba80f36b7daad2c685acd9266382e68985c183"
|
resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.3.tgz#e6ba80f36b7daad2c685acd9266382e68985c183"
|
||||||
integrity sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w==
|
integrity sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w==
|
||||||
|
|||||||
Reference in New Issue
Block a user