diff --git a/.pnp.js b/.pnp.js index 395200f..2943f86 100755 --- a/.pnp.js +++ b/.pnp.js @@ -51,7 +51,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ], [ "@richnav/rich-code-nav-indexer-core", - "npm:0.1.346-alpha" + "npm:0.1.347-alpha" ], [ "@types/mocha", @@ -98,7 +98,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@actions/github", "npm:5.1.1"], ["@actions/io", "npm:1.1.1"], ["@actions/tool-cache", "npm:1.7.1"], - ["@richnav/rich-code-nav-indexer-core", "npm:0.1.346-alpha"], + ["@richnav/rich-code-nav-indexer-core", "npm:0.1.347-alpha"], ["@types/mocha", "npm:8.0.1"], ["@types/node", "npm:14.0.27"], ["applicationinsights", "npm:1.8.10"], @@ -807,10 +807,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { }] ]], ["@richnav/rich-code-nav-indexer-core", [ - ["npm:0.1.346-alpha", { - "packageLocation": "./.yarn/cache/@richnav-rich-code-nav-indexer-core-npm-0.1.346-alpha-c170e310e7-9d8b9e8a17.zip/node_modules/@richnav/rich-code-nav-indexer-core/", + ["npm:0.1.347-alpha", { + "packageLocation": "./.yarn/cache/@richnav-rich-code-nav-indexer-core-npm-0.1.347-alpha-169df13d9d-acaaad5c84.zip/node_modules/@richnav/rich-code-nav-indexer-core/", "packageDependencies": [ - ["@richnav/rich-code-nav-indexer-core", "npm:0.1.346-alpha"], + ["@richnav/rich-code-nav-indexer-core", "npm:0.1.347-alpha"], ["adm-zip", "npm:0.5.9"], ["applicationinsights", "npm:1.8.10"], ["axios", "npm:0.26.1"], @@ -3273,7 +3273,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@actions/github", "npm:5.1.1"], ["@actions/io", "npm:1.1.1"], ["@actions/tool-cache", "npm:1.7.1"], - ["@richnav/rich-code-nav-indexer-core", "npm:0.1.346-alpha"], + ["@richnav/rich-code-nav-indexer-core", "npm:0.1.347-alpha"], ["@types/mocha", "npm:8.0.1"], ["@types/node", "npm:14.0.27"], ["applicationinsights", "npm:1.8.10"], diff --git a/.yarn/cache/@richnav-rich-code-nav-indexer-core-npm-0.1.346-alpha-c170e310e7-9d8b9e8a17.zip b/.yarn/cache/@richnav-rich-code-nav-indexer-core-npm-0.1.347-alpha-169df13d9d-acaaad5c84.zip similarity index 77% rename from .yarn/cache/@richnav-rich-code-nav-indexer-core-npm-0.1.346-alpha-c170e310e7-9d8b9e8a17.zip rename to .yarn/cache/@richnav-rich-code-nav-indexer-core-npm-0.1.347-alpha-169df13d9d-acaaad5c84.zip index 4dc38da..14f13f9 100644 Binary files a/.yarn/cache/@richnav-rich-code-nav-indexer-core-npm-0.1.346-alpha-c170e310e7-9d8b9e8a17.zip and b/.yarn/cache/@richnav-rich-code-nav-indexer-core-npm-0.1.347-alpha-169df13d9d-acaaad5c84.zip differ diff --git a/lib/main.js b/lib/main.js index 139290a..296a150 100644 --- a/lib/main.js +++ b/lib/main.js @@ -1,41 +1,8 @@ "use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var _a; -Object.defineProperty(exports, "__esModule", { value: true }); -const rich_code_nav_indexer_core_1 = require("@richnav/rich-code-nav-indexer-core"); -const cloudbuild_task_github_actions_1 = require("cloudbuild-task-github-actions"); -const github = __importStar(require("@actions/github")); -class GitHubCachingTask extends rich_code_nav_indexer_core_1.CachingTask { - constructor(cloudTask, apiTokens) { - super(cloudTask, { pipelineHost: "GitHub Actions", buildId: github.context.runId.toString(), buildDefinitionId: github.context.workflow }, false, apiTokens); - } - getSourceControlInformationProvider(languageInput) { - var _a; - const repoToken = (_a = cloudbuild_task_github_actions_1.factory.inputs.getInput('repo-token')) !== null && _a !== void 0 ? _a : process.env.REPO_TOKEN; - return new rich_code_nav_indexer_core_1.GitHubRepoInfo(cloudbuild_task_github_actions_1.factory, repoToken, languageInput); +class DeprecatedTask { + async run() { + console.log(`As of January 2024, the RichCodeNavIndexer task is being deprecated. Please remove this task from your CI.`); } } -const serviceConnection = (_a = cloudbuild_task_github_actions_1.factory.inputs.getInput('service-token')) !== null && _a !== void 0 ? _a : process.env.SERVICE_TOKEN; -new GitHubCachingTask(cloudbuild_task_github_actions_1.factory, { - serviceConnection: serviceConnection, - systemVSSConnection: process.env.CODEINDEX_FEED_TOKEN, -}).run(); +new DeprecatedTask().run(); //# sourceMappingURL=main.js.map \ No newline at end of file diff --git a/lib/main.js.map b/lib/main.js.map index 090e659..90fccfa 100644 --- a/lib/main.js.map +++ b/lib/main.js.map @@ -1 +1 @@ -{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AACA,oFAAkF;AAClF,mFAAyD;AACzD,wDAA0C;AAE1C,MAAM,iBAAkB,SAAQ,wCAAW;IAC1C,YAAY,SAAS,EAAE,SAAS;QAC/B,KAAK,CAAC,SAAS,EACd,EAAE,YAAY,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,EAAE,iBAAiB,EAAE,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAC,EACtH,KAAK,EACL,SAAS,CAAC,CAAC;IACd,CAAC;IAES,mCAAmC,CAAC,aAAkC;;QAC/E,MAAM,SAAS,SAAG,wCAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,mCAAI,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC;QAClF,OAAO,IAAI,2CAAc,CAAC,wCAAO,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;IAC9D,CAAC;CACD;AAED,MAAM,iBAAiB,SAAG,wCAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC,mCAAI,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC;AAChG,IAAI,iBAAiB,CACpB,wCAAO,EACP;IACC,iBAAiB,EAAE,iBAAiB;IAGpC,mBAAmB,EAAE,OAAO,CAAC,GAAG,CAAC,oBAAoB;CACrD,CAAC,CAAC,GAAG,EAAE,CAAC"} \ No newline at end of file +{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";AAAA,MAAM,cAAc;IACZ,KAAK,CAAC,GAAG;QAEf,OAAO,CAAC,GAAG,CAAC,4GAA4G,CAAC,CAAC;IAC3H,CAAC;CACD;AAED,IAAI,cAAc,EAAE,CAAC,GAAG,EAAE,CAAC"} \ No newline at end of file diff --git a/package.json b/package.json index 244f7ee..64cdbb7 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "@actions/github": "^5.1.1", "@actions/io": "^1.1.0", "@actions/tool-cache": "^1.6.1", - "@richnav/rich-code-nav-indexer-core": "^0.1.346-alpha", + "@richnav/rich-code-nav-indexer-core": "^0.1.347-alpha", "applicationinsights": "^1.8.10", "cloudbuild-task-github-actions": "^0.1.105-beta" }, diff --git a/src/main.ts b/src/main.ts index a8db4aa..a87f6b3 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,28 +1,8 @@ -import * as indexCore from '@richnav/rich-code-nav-indexer-core'; -import { CachingTask, GitHubRepoInfo } from '@richnav/rich-code-nav-indexer-core'; -import { factory } from 'cloudbuild-task-github-actions'; -import * as github from '@actions/github'; - -class GitHubCachingTask extends CachingTask { - constructor(cloudTask, apiTokens) { - super(cloudTask, - { pipelineHost: "GitHub Actions", buildId: github.context.runId.toString(), buildDefinitionId: github.context.workflow}, - false, /* isExternal */ - apiTokens); - } - - protected getSourceControlInformationProvider(languageInput?: string | undefined): indexCore.BaseRepoInfo { - const repoToken = factory.inputs.getInput('repo-token') ?? process.env.REPO_TOKEN; - return new GitHubRepoInfo(factory, repoToken, languageInput); +class DeprecatedTask { + public async run() { + // Code Index deprecated, returning error on build. + console.log(`As of January 2024, the RichCodeNavIndexer task is being deprecated. Please remove this task from your CI.`); } } -const serviceConnection = factory.inputs.getInput('service-token') ?? process.env.SERVICE_TOKEN; -new GitHubCachingTask( - factory, - { - serviceConnection: serviceConnection, - - // Used to access private NuGet feeds. Does nothing if isPrivate input is not `true`. - systemVSSConnection: process.env.CODEINDEX_FEED_TOKEN, - }).run(); +new DeprecatedTask().run(); diff --git a/yarn.lock b/yarn.lock index 81b8fee..382ebc7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -643,9 +643,9 @@ __metadata: languageName: node linkType: hard -"@richnav/rich-code-nav-indexer-core@npm:^0.1.346-alpha": - version: 0.1.346-alpha - resolution: "@richnav/rich-code-nav-indexer-core@npm:0.1.346-alpha" +"@richnav/rich-code-nav-indexer-core@npm:^0.1.347-alpha": + version: 0.1.347-alpha + resolution: "@richnav/rich-code-nav-indexer-core@npm:0.1.347-alpha" dependencies: adm-zip: ^0.5.9 applicationinsights: ^1.2.0 @@ -661,7 +661,7 @@ __metadata: stream-buffers: ^3.0.2 uuid: ^8.3.1 which: ^2.0.2 - checksum: 9d8b9e8a17030e898e1017561f9863a8e4ff0a3a7541f3f4b2bab5a2f3c2f19f362ebe1c6f73c33f7b6e066f7b79c615f648fe8a1debbacdad0bd5d6eae505b2 + checksum: acaaad5c84a6f0843fd40ab19248fc70b2a7eaf66b9b79eb86f1a11d1e9430600e1384138a628b62d155630edccdf266cc1990496fde372e56b13b6fe8ddd31e languageName: node linkType: hard @@ -2833,7 +2833,7 @@ resolve@^1.3.2: "@actions/github": ^5.1.1 "@actions/io": ^1.1.0 "@actions/tool-cache": ^1.6.1 - "@richnav/rich-code-nav-indexer-core": ^0.1.346-alpha + "@richnav/rich-code-nav-indexer-core": ^0.1.347-alpha "@types/mocha": ^8.0.1 "@types/node": ^14.0.27 applicationinsights: ^1.8.10