From cfb69c2e975303fe3acf5654ad603fdc7afb83bd Mon Sep 17 00:00:00 2001 From: "Michael D. Stemle, Jr" Date: Fri, 16 Jun 2023 23:12:15 +0000 Subject: [PATCH] Checkin - Started work on versioning. - Trying to get the Codespaces workflow going --- action.yml | 53 ++++++----- dist/index.js | 27 ++++-- lib/fieldMappings.js | 61 ++++++++++++ lib/input-expander.js | 53 ++++++++++- lib/input-to-registry-document.js | 30 ++---- lib/schema-versions.js | 5 + package-lock.json | 150 ++++++++++++++++++------------ package.json | 6 +- 8 files changed, 272 insertions(+), 113 deletions(-) create mode 100644 lib/fieldMappings.js diff --git a/action.yml b/action.yml index e10a028..98f5b2d 100644 --- a/action.yml +++ b/action.yml @@ -9,14 +9,15 @@ runs: using: node16 main: dist/index.js inputs: - - + # Stuff we need for this action github-token: description: 'The GitHub token to use for the action; default is `secrets.GITHUB_TOKEN`' required: false org-rules-file: description: 'The path to the org rules file; default is repository `ORG-NAME-HERE/.github` and the `service-catalog-rules.yml` file is expected in the root of that repository.' required: false + + # Stuff we need for the Datadog API datadog-hostname: description: 'The Datadog API hostname (this varies by Datadog customer!)' required: true @@ -27,6 +28,8 @@ inputs: datadog-app-key: description: 'The Datadog Application key' required: true + + # Fields which are common to all schema versions schema-version: description: 'The version of the Datadog Service Catalog Schema. The default is v2. Valid values are `v2` and `v2.1`.' required: false @@ -36,7 +39,29 @@ inputs: required: true team: description: 'The team responsible for the service' - required: true + required: false + contacts: + description: 'The contacts for the service' + required: false + tags: + description: 'The tags to apply to the service' + required: false + links: + description: 'The links to related to the service' + required: false + integrations: + description: 'The integrations for the service' + required: false + + # Fields which are unique to v2 + docs: + description: 'The documentation for the service' + required: false + repos: + description: 'The repositories for the service' + required: false + + # Fields which are unique to v2.1 application: description: '(v2.1 only) The name of the application that the service belongs to.' required: false @@ -49,6 +74,8 @@ inputs: lifecycle: description: '(v2.1 only) The current life cycle phase of the service. For example: sandbox, staging, production, deprecated' required: false + + # These are convenience inputs which are unique to this action. email: description: 'The email address of the team responsible for the service' required: true @@ -57,22 +84,4 @@ inputs: required: false repo: description: 'The repository URL for the service. This is a convenience input for when you only have one repository for the service.' - required: false - contacts: - description: 'The contacts for the service' - required: false - repos: - description: 'The repositories for the service' - required: true - tags: - description: 'The tags to apply to the service' - required: false - links: - description: 'The links to related to the service' - required: false - docs: - description: 'The documentation for the service' - required: false - integrations: - description: 'The integrations for the service' - required: false + required: false \ No newline at end of file diff --git a/dist/index.js b/dist/index.js index 0e6c595..18cef38 100644 --- a/dist/index.js +++ b/dist/index.js @@ -4,6 +4,15 @@ /***/ 8454: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/** + * input-expander.js + * DDSCMP + * @desc This module contains all of the functions which expand scalar + * input from GitHub Actions into hydrated structures for the DD API. + * + * @author Michael D. Stemle, Jr + */ + const core = __nccwpck_require__(2186) const YAML = __nccwpck_require__(4083) @@ -204,7 +213,7 @@ module.exports = { inputsToRegistryDocument } */ const validateDatadogHostname = (ddHost) => { // Verify the host. - if (!ddHost || !ddHost.match(/^[a-z0-9.-]+\.datadoghq\.(com|eu|us)$/)) { + if (!ddHost || !ddHost.match(/^[a-z0-9.-]+\.(datadoghq\.(com|eu|us)|ddog-gov\.com)$/)) { throw new Error( `Invalid DataDog host: ${ddHost}. See here for more details: https://docs.datadoghq.com/getting_started/site/`, ) @@ -32499,7 +32508,7 @@ const prettifyError = (src, lc) => (error) => { let count = 1; const end = error.linePos[1]; if (end && end.line === line && end.col > col) { - count = Math.min(end.col - col, 80 - ci); + count = Math.max(1, Math.min(end.col - col, 80 - ci)); } const pointer = ' '.repeat(ci) + '^'.repeat(count); error.message += `:\n\n${lineStr}\n${pointer}\n`; @@ -37408,7 +37417,7 @@ function stringifyFlowCollection({ comment, items }, ctx, { flowChars, itemInden } } if (comment) { - str += stringifyComment.lineComment(str, commentString(comment), indent); + str += stringifyComment.lineComment(str, indent, commentString(comment)); if (onComment) onComment(); } @@ -37758,8 +37767,8 @@ exports.stringifyPair = stringifyPair; var Scalar = __nccwpck_require__(9338); var foldFlowLines = __nccwpck_require__(2889); -const getFoldOptions = (ctx) => ({ - indentAtStart: ctx.indentAtStart, +const getFoldOptions = (ctx, isBlock) => ({ + indentAtStart: isBlock ? ctx.indent.length : ctx.indentAtStart, lineWidth: ctx.options.lineWidth, minContentWidth: ctx.options.minContentWidth }); @@ -37872,7 +37881,7 @@ function doubleQuotedString(value, ctx) { str = start ? str + json.slice(start) : json; return implicitKey ? str - : foldFlowLines.foldFlowLines(str, indent, foldFlowLines.FOLD_QUOTED, getFoldOptions(ctx)); + : foldFlowLines.foldFlowLines(str, indent, foldFlowLines.FOLD_QUOTED, getFoldOptions(ctx, false)); } function singleQuotedString(value, ctx) { if (ctx.options.singleQuote === false || @@ -37884,7 +37893,7 @@ function singleQuotedString(value, ctx) { const res = "'" + value.replace(/'/g, "''").replace(/\n+/g, `$&\n${indent}`) + "'"; return ctx.implicitKey ? res - : foldFlowLines.foldFlowLines(res, indent, foldFlowLines.FOLD_FLOW, getFoldOptions(ctx)); + : foldFlowLines.foldFlowLines(res, indent, foldFlowLines.FOLD_FLOW, getFoldOptions(ctx, false)); } function quotedString(value, ctx) { const { singleQuote } = ctx.options; @@ -37982,7 +37991,7 @@ function blockString({ comment, type, value }, ctx, onComment, onChompKeep) { .replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, '$1$2') // more-indented lines aren't folded // ^ more-ind. ^ empty ^ capture next empty lines only at end of indent .replace(/\n+/g, `$&${indent}`); - const body = foldFlowLines.foldFlowLines(`${start}${value}${end}`, indent, foldFlowLines.FOLD_BLOCK, getFoldOptions(ctx)); + const body = foldFlowLines.foldFlowLines(`${start}${value}${end}`, indent, foldFlowLines.FOLD_BLOCK, getFoldOptions(ctx, true)); return `${header}\n${indent}${body}`; } function plainString(item, ctx, onComment, onChompKeep) { @@ -38032,7 +38041,7 @@ function plainString(item, ctx, onComment, onChompKeep) { } return implicitKey ? str - : foldFlowLines.foldFlowLines(str, indent, foldFlowLines.FOLD_FLOW, getFoldOptions(ctx)); + : foldFlowLines.foldFlowLines(str, indent, foldFlowLines.FOLD_FLOW, getFoldOptions(ctx, false)); } function stringifyString(item, ctx, onComment, onChompKeep) { const { implicitKey, inFlow } = ctx; diff --git a/lib/fieldMappings.js b/lib/fieldMappings.js new file mode 100644 index 0000000..492471b --- /dev/null +++ b/lib/fieldMappings.js @@ -0,0 +1,61 @@ +const { expandObjectInputs, forceArray, forceObject } = require('./input-expander') + +const useSharedMappings = (versions, mapper) => Object.assign(...versions.map((x) => ({ [x]: mapper }))) + +const passThru = (value) => value + + +/** + * This is the list of mappings which tracks which fields map to different versions in different ways. + * - Keyed by the GitHub Actions input name (action.yml) + * - Values are objects keyed with version tags + * - Values of those objects are the function which maps the input value to the registry document value. + **/ +const mappings = { + + 'github-token': { + 'v2 + }, + + 'org-rules-file': {}, + + 'datadog-hostname': {}, + + 'datadog-key': {}, + + 'datadog-app-key': {}, + + 'schema-version': {}, + + 'service-name': {}, + + 'team': {}, + + 'contacts': {}, + + 'tags': {}, + + 'links': {}, + + 'integrations': {}, + + 'docs': {}, + + 'repo': {}, + + 'application': {}, + + 'description': {}, + + 'tier': {}, + + 'lifecycle': {}, + + 'email': {}, + + 'slack-support-channel': {}, + + 'repo': {}, +} + +module.exports = { mappings } \ No newline at end of file diff --git a/lib/input-expander.js b/lib/input-expander.js index 7b36c6c..32ed904 100644 --- a/lib/input-expander.js +++ b/lib/input-expander.js @@ -10,9 +10,12 @@ const core = require('@actions/core') const YAML = require('yaml') -/* +/** * As part of our recursive implementation, we need * to engage in a little bit of type inference. + * @private + * @param {string} x - The input value. + * @returns {Object|Symbol} The parsed YAML object, or a Symbol. */ const parseSafely = (x) => { try { @@ -21,11 +24,38 @@ const parseSafely = (x) => { return Symbol('This will never match.') } } + +/** + * As part of our recursive implementation, we need to be able to break down different types. This tells us if it's an Array. + * @returns {boolean} Whether or not the input is an array. + * @private + **/ const isArray = Array.isArray + +/** + * As part of our recursive implementation, we need to be able to break down different types. This tells us if it's an Object. + * @param {Object} x - The input value. + * @returns {boolean} Whether or not the input is an object. + * @private + **/ const isObject = (x) => x?.constructor === Object // this is because `YAML.parse(1)` returns `null`. + +/** + * As part of our recursive implementation, we need to be able to break down different types. This tells us if it's a scalar or scalar equivalent. + * @param {any} x - The input value. + * @returns {boolean} Whether or not the input is a scalar or scalar equivalent. + * @private + **/ const isYamlScalarEquivalent = (x) => !x || ['string', 'number', 'boolean'].includes(typeof x) + +/** + * As part of our recursive implementation, we need to be able to break down different types. This tells us if it's a scalar. + * @param {any} x - The input value. + * @returns {boolean} Whether or not the input is a scalar. + * @private + **/ const isJustAScalar = (x) => !x || x[0] === '@' || x === parseSafely(`${x}`) /** @@ -70,6 +100,27 @@ const expandObjectInputs = (str) => { } } +/** + * This function takes an input and forces it to be an array. + * @param {any} input - The input to force into an array. + * @returns {array} - The input as an array. + * @public + * @function + */ +const forceArray = (input) => + Array.isArray(input) ? input : input && input.length > 0 ? [input] : [] + +/** + * This function takes an input and forces it to be an object. + * @param {any} input - The input to force into an object. + * @returns {object} - The input as an object. + * @public + * @function + */ +const forceObject = (input) => (typeof input === 'object' ? input : {}) + module.exports = { expandObjectInputs, + forceArray, + forceObject, } diff --git a/lib/input-to-registry-document.js b/lib/input-to-registry-document.js index d51bc93..3f6d44e 100644 --- a/lib/input-to-registry-document.js +++ b/lib/input-to-registry-document.js @@ -1,27 +1,17 @@ +/** + * This module contains the logic for converting the Action inputs into a registry document for Datadog. + * @module lib/input-to-registry-document + * @requires fs + * @requires path + * @requires @actions/core + * @requires lodash + **/ + const fs = require('fs') const path = require('path') const core = require('@actions/core') const _ = require('lodash') -const { expandObjectInputs } = require('./input-expander') - -/** - * This function takes an input and forces it to be an array. - * @param {any} input - The input to force into an array. - * @returns {array} - The input as an array. - * @private - * @function - */ -const forceArray = (input) => - Array.isArray(input) ? input : input && input.length > 0 ? [input] : [] - -/** - * This function takes an input and forces it to be an object. - * @param {any} input - The input to force into an object. - * @returns {object} - The input as an object. - * @private - * @function - */ -const forceObject = (input) => (typeof input === 'object' ? input : {}) +const { expandObjectInputs, forceArray, forceObject } = require('./input-expander') /** * This function takes the inputs from the Action and converts them into a registry document for Datadog. diff --git a/lib/schema-versions.js b/lib/schema-versions.js index fd56864..c3ed59c 100644 --- a/lib/schema-versions.js +++ b/lib/schema-versions.js @@ -1,3 +1,8 @@ +/** + * @fileoverview This file contains the schema versions, their differences, and mappings between them. + * @module lib/schema-versions + **/ + const VersionDifferences = { v2: { uniqueFields: ['docs', 'repos'], diff --git a/package-lock.json b/package-lock.json index 8fab966..8128831 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,12 +12,12 @@ "@actions/core": "^1.10.0", "@actions/github": "^5.1.1", "@actions/http-client": "^2.1.0", - "@octokit/rest": "^19.0.7", + "@octokit/rest": "^19.0.12", "lodash": "^4.17.21", - "yaml": "^2.2.2" + "yaml": "^2.3.1" }, "devDependencies": { - "@types/jest": "^29.5.1", + "@types/jest": "^29.5.2", "@vercel/ncc": "^0.36.1", "ajv": "^8.12.0", "jest": "^29.5.0", @@ -1090,40 +1090,37 @@ } }, "node_modules/@octokit/rest": { - "version": "19.0.7", - "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-19.0.7.tgz", - "integrity": "sha512-HRtSfjrWmWVNp2uAkEpQnuGMJsu/+dBr47dRc5QVgsCbnIc1+GFEaoKBWkYG+zjrsHpSqcAElMio+n10c0b5JA==", + "version": "19.0.12", + "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-19.0.12.tgz", + "integrity": "sha512-oOeaUb9mmtLej6r0hjyT0KGN0NaT3BOMKLaloRrETWGeiLBWQaxaf8Z5dh7bduxxntxZoXSW5Sb5oyl0JKKAxg==", "dependencies": { - "@octokit/core": "^4.1.0", - "@octokit/plugin-paginate-rest": "^6.0.0", + "@octokit/core": "^4.2.1", + "@octokit/plugin-paginate-rest": "^7.0.0", "@octokit/plugin-request-log": "^1.0.4", - "@octokit/plugin-rest-endpoint-methods": "^7.0.0" + "@octokit/plugin-rest-endpoint-methods": "^7.1.2" }, "engines": { "node": ">= 14" } }, "node_modules/@octokit/rest/node_modules/@octokit/auth-token": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-3.0.3.tgz", - "integrity": "sha512-/aFM2M4HVDBT/jjDBa84sJniv1t9Gm/rLkalaz9htOm+L+8JMj1k9w0CkUdcxNyNxZPlTxKPVko+m1VlM58ZVA==", - "dependencies": { - "@octokit/types": "^9.0.0" - }, + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-3.0.4.tgz", + "integrity": "sha512-TWFX7cZF2LXoCvdmJWY7XVPi74aSY0+FfBZNSXEXFkMpjcqsQwDSYVv5FhRFaI0V1ECnwbz4j59T/G+rXNWaIQ==", "engines": { "node": ">= 14" } }, "node_modules/@octokit/rest/node_modules/@octokit/core": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-4.2.0.tgz", - "integrity": "sha512-AgvDRUg3COpR82P7PBdGZF/NNqGmtMq2NiPqeSsDIeCfYFOZ9gddqWNQHnFdEUf+YwOj4aZYmJnlPp7OXmDIDg==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-4.2.3.tgz", + "integrity": "sha512-pFfOAfEvijIMK0rL92cU55z8z2VYznW4a5/fzI4EStWVTASaum/MpWvk5eG9zJZAf+EI7U+sBPbIvk5uswDcZg==", "dependencies": { "@octokit/auth-token": "^3.0.0", "@octokit/graphql": "^5.0.0", "@octokit/request": "^6.0.0", - "@octokit/request-error": "^3.0.0", - "@octokit/types": "^9.0.0", + "@octokit/request-error": "^4.0.0", + "@octokit/types": "^10.0.0", "before-after-hook": "^2.2.0", "universal-user-agent": "^6.0.0" }, @@ -1132,9 +1129,9 @@ } }, "node_modules/@octokit/rest/node_modules/@octokit/endpoint": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-7.0.5.tgz", - "integrity": "sha512-LG4o4HMY1Xoaec87IqQ41TQ+glvIeTKqfjkCEmt5AIwDZJwQeVZFIEYXrYY6yLwK+pAScb9Gj4q+Nz2qSw1roA==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-7.0.6.tgz", + "integrity": "sha512-5L4fseVRUsDFGR00tMWD/Trdeeihn999rTMGRMC1G/Ldi1uWlWJzI98H4Iak5DB/RVvQuyMYKqSK/R6mbSOQyg==", "dependencies": { "@octokit/types": "^9.0.0", "is-plain-object": "^5.0.0", @@ -1144,10 +1141,18 @@ "node": ">= 14" } }, + "node_modules/@octokit/rest/node_modules/@octokit/endpoint/node_modules/@octokit/types": { + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-9.3.2.tgz", + "integrity": "sha512-D4iHGTdAnEEVsB8fl95m1hiz7D5YiRdQ9b/OEb3BYRVwbLsGHcRVPz+u+BgRLNk0Q0/4iZCBqDN96j2XNxfXrA==", + "dependencies": { + "@octokit/openapi-types": "^18.0.0" + } + }, "node_modules/@octokit/rest/node_modules/@octokit/graphql": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-5.0.5.tgz", - "integrity": "sha512-Qwfvh3xdqKtIznjX9lz2D458r7dJPP8l6r4GQkIdWQouZwHQK0mVT88uwiU2bdTU2OtT1uOlKpRciUWldpG0yQ==", + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-5.0.6.tgz", + "integrity": "sha512-Fxyxdy/JH0MnIB5h+UQ3yCoh1FG4kWXfFKkpWqjZHw/p+Kc8Y44Hu/kCgNBT6nU1shNumEchmW/sUO1JuQnPcw==", "dependencies": { "@octokit/request": "^6.0.0", "@octokit/types": "^9.0.0", @@ -1157,32 +1162,48 @@ "node": ">= 14" } }, + "node_modules/@octokit/rest/node_modules/@octokit/graphql/node_modules/@octokit/types": { + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-9.3.2.tgz", + "integrity": "sha512-D4iHGTdAnEEVsB8fl95m1hiz7D5YiRdQ9b/OEb3BYRVwbLsGHcRVPz+u+BgRLNk0Q0/4iZCBqDN96j2XNxfXrA==", + "dependencies": { + "@octokit/openapi-types": "^18.0.0" + } + }, "node_modules/@octokit/rest/node_modules/@octokit/openapi-types": { - "version": "16.0.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-16.0.0.tgz", - "integrity": "sha512-JbFWOqTJVLHZSUUoF4FzAZKYtqdxWu9Z5m2QQnOyEa04fOFljvyh7D3GYKbfuaSWisqehImiVIMG4eyJeP5VEA==" + "version": "18.0.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-18.0.0.tgz", + "integrity": "sha512-V8GImKs3TeQRxRtXFpG2wl19V7444NIOTDF24AWuIbmNaNYOQMWRbjcGDXV5B+0n887fgDcuMNOmlul+k+oJtw==" }, "node_modules/@octokit/rest/node_modules/@octokit/plugin-paginate-rest": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-6.0.0.tgz", - "integrity": "sha512-Sq5VU1PfT6/JyuXPyt04KZNVsFOSBaYOAq2QRZUwzVlI10KFvcbUo8lR258AAQL1Et60b0WuVik+zOWKLuDZxw==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-7.1.2.tgz", + "integrity": "sha512-Jx8KuKqEAVRsK6fMzZKv3h6UH9/NRDHsDRtUAROqqmZlCptM///Uef7A1ViZ/cbDplekz7VbDWdFLAZ/mpuDww==", "dependencies": { - "@octokit/types": "^9.0.0" + "@octokit/tsconfig": "^2.0.0", + "@octokit/types": "^9.3.2" }, "engines": { - "node": ">= 14" + "node": ">= 18" }, "peerDependencies": { "@octokit/core": ">=4" } }, + "node_modules/@octokit/rest/node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/types": { + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-9.3.2.tgz", + "integrity": "sha512-D4iHGTdAnEEVsB8fl95m1hiz7D5YiRdQ9b/OEb3BYRVwbLsGHcRVPz+u+BgRLNk0Q0/4iZCBqDN96j2XNxfXrA==", + "dependencies": { + "@octokit/openapi-types": "^18.0.0" + } + }, "node_modules/@octokit/rest/node_modules/@octokit/plugin-rest-endpoint-methods": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-7.0.1.tgz", - "integrity": "sha512-pnCaLwZBudK5xCdrR823xHGNgqOzRnJ/mpC/76YPpNP7DybdsJtP7mdOwh+wYZxK5jqeQuhu59ogMI4NRlBUvA==", + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-7.2.3.tgz", + "integrity": "sha512-I5Gml6kTAkzVlN7KCtjOM+Ruwe/rQppp0QU372K1GP7kNOYEKe8Xn5BW4sE62JAHdwpq95OQK/qGNyKQMUzVgA==", "dependencies": { - "@octokit/types": "^9.0.0", - "deprecation": "^2.3.1" + "@octokit/types": "^10.0.0" }, "engines": { "node": ">= 14" @@ -1192,12 +1213,12 @@ } }, "node_modules/@octokit/rest/node_modules/@octokit/request": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-6.2.3.tgz", - "integrity": "sha512-TNAodj5yNzrrZ/VxP+H5HiYaZep0H3GU0O7PaF+fhDrt8FPrnkei9Aal/txsN/1P7V3CPiThG0tIvpPDYUsyAA==", + "version": "6.2.7", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-6.2.7.tgz", + "integrity": "sha512-OKTq4unIM7iXn9MzRnI66rcXmh0VF7389Acx33uMjcoZ34o6NzbglcncPdy/P+sCKIvrf73aZRZ9w08GnMluQg==", "dependencies": { "@octokit/endpoint": "^7.0.0", - "@octokit/request-error": "^3.0.0", + "@octokit/request-error": "^4.0.0", "@octokit/types": "^9.0.0", "is-plain-object": "^5.0.0", "node-fetch": "^2.6.7", @@ -1208,26 +1229,39 @@ } }, "node_modules/@octokit/rest/node_modules/@octokit/request-error": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-3.0.3.tgz", - "integrity": "sha512-crqw3V5Iy2uOU5Np+8M/YexTlT8zxCfI+qu+LxUB7SZpje4Qmx3mub5DfEKSO8Ylyk0aogi6TYdf6kxzh2BguQ==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-4.0.2.tgz", + "integrity": "sha512-uqwUEmZw3x4I9DGYq9fODVAAvcLsPQv97NRycP6syEFu5916M189VnNBW2zANNwqg3OiligNcAey7P0SET843w==", "dependencies": { - "@octokit/types": "^9.0.0", + "@octokit/types": "^10.0.0", "deprecation": "^2.0.0", "once": "^1.4.0" }, "engines": { - "node": ">= 14" + "node": ">= 18" + } + }, + "node_modules/@octokit/rest/node_modules/@octokit/request/node_modules/@octokit/types": { + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-9.3.2.tgz", + "integrity": "sha512-D4iHGTdAnEEVsB8fl95m1hiz7D5YiRdQ9b/OEb3BYRVwbLsGHcRVPz+u+BgRLNk0Q0/4iZCBqDN96j2XNxfXrA==", + "dependencies": { + "@octokit/openapi-types": "^18.0.0" } }, "node_modules/@octokit/rest/node_modules/@octokit/types": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-9.0.0.tgz", - "integrity": "sha512-LUewfj94xCMH2rbD5YJ+6AQ4AVjFYTgpp6rboWM5T7N3IsIF65SBEOVcYMGAEzO/kKNiNaW4LoWtoThOhH06gw==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-10.0.0.tgz", + "integrity": "sha512-Vm8IddVmhCgU1fxC1eyinpwqzXPEYu0NrYzD3YZjlGjyftdLBTeqNblRC0jmJmgxbJIsQlyogVeGnrNaaMVzIg==", "dependencies": { - "@octokit/openapi-types": "^16.0.0" + "@octokit/openapi-types": "^18.0.0" } }, + "node_modules/@octokit/tsconfig": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@octokit/tsconfig/-/tsconfig-2.0.0.tgz", + "integrity": "sha512-tWnrai3quGt8+gRN2edzo9fmraWekeryXPeXDomMw2oFSpu/lH3VSWGn/q4V+rwjTRMeeXk/ci623/01Zet4VQ==" + }, "node_modules/@octokit/types": { "version": "6.41.0", "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz", @@ -1335,9 +1369,9 @@ } }, "node_modules/@types/jest": { - "version": "29.5.1", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.1.tgz", - "integrity": "sha512-tEuVcHrpaixS36w7hpsfLBLpjtMRJUE09/MHXn923LOVojDwyC14cWcfc0rDs0VEfUyYmt/+iX1kxxp+gZMcaQ==", + "version": "29.5.2", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.2.tgz", + "integrity": "sha512-mSoZVJF5YzGVCk+FsDxzDuH7s+SCkzrgKZzf0Z0T2WudhBUPoF6ktoTPC4R0ZoCPCV5xUvuU6ias5NvxcBcMMg==", "dev": true, "dependencies": { "expect": "^29.0.0", @@ -3865,9 +3899,9 @@ "dev": true }, "node_modules/yaml": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.2.2.tgz", - "integrity": "sha512-CBKFWExMn46Foo4cldiChEzn7S7SRV+wqiluAb6xmueD/fGyRHIhX8m14vVGgeFWjN540nKCNVj6P21eQjgTuA==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.1.tgz", + "integrity": "sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==", "engines": { "node": ">= 14" } diff --git a/package.json b/package.json index bd2c5ac..7cbe999 100644 --- a/package.json +++ b/package.json @@ -27,12 +27,12 @@ "@actions/core": "^1.10.0", "@actions/github": "^5.1.1", "@actions/http-client": "^2.1.0", - "@octokit/rest": "^19.0.7", + "@octokit/rest": "^19.0.12", "lodash": "^4.17.21", - "yaml": "^2.2.2" + "yaml": "^2.3.1" }, "devDependencies": { - "@types/jest": "^29.5.1", + "@types/jest": "^29.5.2", "@vercel/ncc": "^0.36.1", "ajv": "^8.12.0", "jest": "^29.5.0",