From 89fbd503798b65ef3904af6947aa25e1394211e9 Mon Sep 17 00:00:00 2001 From: Nick Alteen Date: Wed, 2 Apr 2025 11:58:19 -0400 Subject: [PATCH] Add support for external instructors --- .eslintrc.yml | 57 - .github/ISSUE_TEMPLATE/create-class.yml | 13 - .github/workflows/process-issue-comment.yml | 2 - __tests__/actions.test.ts | 208 --- __tests__/events.test.ts | 22 - __tests__/github/issues.test.ts | 126 +- __tests__/main.test.ts | 48 +- badges/coverage.svg | 2 +- dist/actions.d.ts | 48 - dist/enums.d.ts | 36 - dist/events.d.ts | 10 - dist/github/issues.d.ts | 39 - dist/github/repos.d.ts | 125 -- dist/github/teams.d.ts | 56 - dist/github/users.d.ts | 14 - dist/index.d.ts | 1 - dist/index.js | 224 +-- dist/main.d.ts | 1 - dist/types.d.ts | 34 - eslint.config.mjs | 89 + package-lock.json | 1821 ++++++++----------- package.json | 18 +- src/actions.ts | 172 +- src/enums.ts | 4 - src/events.ts | 6 - src/github/issues.ts | 63 +- src/github/repos.ts | 9 +- src/github/teams.ts | 14 +- src/github/users.ts | 25 +- src/main.ts | 4 - src/types.ts | 2 - tsconfig.base.json | 2 +- tsconfig.eslint.json | 2 + tsconfig.json | 1 + 34 files changed, 963 insertions(+), 2335 deletions(-) delete mode 100644 .eslintrc.yml delete mode 100644 dist/actions.d.ts delete mode 100644 dist/enums.d.ts delete mode 100644 dist/events.d.ts delete mode 100644 dist/github/issues.d.ts delete mode 100644 dist/github/repos.d.ts delete mode 100644 dist/github/teams.d.ts delete mode 100644 dist/github/users.d.ts delete mode 100644 dist/index.d.ts delete mode 100644 dist/main.d.ts delete mode 100644 dist/types.d.ts create mode 100644 eslint.config.mjs diff --git a/.eslintrc.yml b/.eslintrc.yml deleted file mode 100644 index ea6118a..0000000 --- a/.eslintrc.yml +++ /dev/null @@ -1,57 +0,0 @@ -env: - node: true - es6: true - jest: true - -globals: - Atomics: readonly - NodeRequire: readonly - SharedArrayBuffer: readonly - -ignorePatterns: - - .github - - .vscode - - coverage - - dist - - megalinter-reports - - node_modules - - reports - -parser: '@typescript-eslint/parser' - -parserOptions: - ecmaVersion: latest - project: - - tsconfig.eslint.json - sourceType: module - tsconfigRootDir: . - -settings: - import/resolver: - typescript: - alwaysTryTypes: true - project: tsconfig.eslint.json - -plugins: - - import - - jest - - '@typescript-eslint' - -extends: - - eslint:recommended - - plugin:@typescript-eslint/eslint-recommended - - plugin:@typescript-eslint/recommended - - plugin:github/recommended - - plugin:jest/recommended - -rules: - '@typescript-eslint/no-explicit-any': off - '@typescript-eslint/no-unused-vars': off - camelcase: off - eslint-comments/no-use: off - eslint-comments/no-unused-disable: off - i18n-text/no-en: off - import/no-namespace: off - no-console: off - no-shadow: off - no-unused-vars: off diff --git a/.github/ISSUE_TEMPLATE/create-class.yml b/.github/ISSUE_TEMPLATE/create-class.yml index 9610dfa..68df0cf 100644 --- a/.github/ISSUE_TEMPLATE/create-class.yml +++ b/.github/ISSUE_TEMPLATE/create-class.yml @@ -47,19 +47,6 @@ body: placeholder: '2024-01-15' validations: required: true - - type: textarea - id: administrators - attributes: - label: Administrators - description: - A list of GitHub handles and emails to add as repository administrators. - This should include anyone who will be delivering or supporting delivery - of this training. - placeholder: | - ncalteen,ncalteen@github.com - octocat,octocat@github.com - validations: - required: true - type: textarea id: attendees attributes: diff --git a/.github/workflows/process-issue-comment.yml b/.github/workflows/process-issue-comment.yml index f364e6b..5489ba3 100644 --- a/.github/workflows/process-issue-comment.yml +++ b/.github/workflows/process-issue-comment.yml @@ -18,9 +18,7 @@ jobs: if: | github.event.issue.state == 'open' && ( - startsWith(github.event.comment.body, '.add-admin') || startsWith(github.event.comment.body, '.add-user') || - startsWith(github.event.comment.body, '.remove-admin') || startsWith(github.event.comment.body, '.remove-user') ) && contains(github.event.issue.labels.*.name, 'gh-intermediate-class') && diff --git a/__tests__/actions.test.ts b/__tests__/actions.test.ts index b3451a8..6d7522a 100644 --- a/__tests__/actions.test.ts +++ b/__tests__/actions.test.ts @@ -128,12 +128,6 @@ describe('actions', () => { customerAbbr: 'NA1', startDate: new Date(2024, 10, 17), endDate: new Date(2024, 10, 20), - administrators: [ - { - handle: 'ncalteen', - email: 'ncalteen@github.com' - } - ], attendees: [ { handle: 'ncalteen-testuser', @@ -164,12 +158,6 @@ describe('actions', () => { customerAbbr: 'NA1', startDate: new Date(2024, 10, 17), endDate: new Date(2024, 10, 20), - administrators: [ - { - handle: 'ncalteen', - email: 'ncalteen@github.com' - } - ], attendees: [ { handle: 'ncalteen-testuser', @@ -204,12 +192,6 @@ describe('actions', () => { customerAbbr: 'NA1', startDate: new Date(2024, 10, 17), endDate: new Date(2024, 10, 20), - administrators: [ - { - handle: 'ncalteen', - email: 'ncalteen@github.com' - } - ], attendees: [ { handle: 'ncalteen-testuser', @@ -236,12 +218,6 @@ describe('actions', () => { customerAbbr: 'NA1', startDate: new Date(2024, 10, 17), endDate: new Date(2024, 10, 20), - administrators: [ - { - handle: 'ncalteen', - email: 'ncalteen@github.com' - } - ], attendees: [ { handle: 'ncalteen-testuser', @@ -265,12 +241,6 @@ describe('actions', () => { customerAbbr: 'NA1', startDate: new Date(2024, 10, 17), endDate: new Date(2024, 10, 20), - administrators: [ - { - handle: 'ncalteen', - email: 'ncalteen@github.com' - } - ], attendees: [ { handle: 'ncalteen-testuser', @@ -303,12 +273,6 @@ describe('actions', () => { customerAbbr: 'NA1', startDate: new Date(2023, 10, 17), endDate: new Date(2023, 10, 20), - administrators: [ - { - handle: 'ncalteen', - email: 'ncalteen@github.com' - } - ], attendees: [ { handle: 'ncalteen-testuser', @@ -325,127 +289,6 @@ describe('actions', () => { }) }) - describe('addAdmin()', () => { - it('Throws on Invalid Format', async () => { - try { - await actions.addAdmin( - { - action: AllowedIssueAction.CREATE, - customerName: 'Nick Testing Industries', - customerAbbr: 'NA1', - startDate: new Date(2024, 10, 17), - endDate: new Date(2024, 10, 20), - administrators: [ - { - handle: 'ncalteen', - email: 'ncalteen@github.com' - } - ], - attendees: [ - { - handle: 'ncalteen-testuser', - email: 'ncalteen+testing@github.com' - } - ] - }, - { - issue: { number: 1 }, - comment: { - body: '.add-admin invalid format' - } - } as any - ) - } catch (error: any) { - // eslint-disable-next-line jest/no-conditional-expect - expect(error.message).toBe( - 'Invalid Format! Try `.add-admin handle,email`' - ) - } - }) - - it('Adds an Admin', async () => { - mocktokit.graphql.mockResolvedValue({ - user: { - isEmployee: true, - email: 'noreply@github.com' - } - }) - - await actions.addAdmin( - { - action: AllowedIssueAction.CREATE, - customerName: 'Nick Testing Industries', - customerAbbr: 'NA1', - startDate: new Date(2024, 10, 17), - endDate: new Date(2024, 10, 20), - administrators: [ - { - handle: 'ncalteen', - email: 'ncalteen@github.com' - } - ], - attendees: [ - { - handle: 'ncalteen-testuser', - email: 'ncalteen+testing@github.com' - } - ] - }, - { - issue: { number: 1 }, - comment: { - body: '.add-admin ncalteen,ncalteen@github.com' - } - } as any - ) - - expect(teams_addUser).toHaveBeenCalled() - expect(issues_complete).toHaveBeenCalled() - }) - - it('Throws on Invalid Admin', async () => { - mocktokit.graphql.mockResolvedValue({ - user: { - isEmployee: false, - email: 'fakeuser@notgithub.com' - } - }) - - try { - await actions.addAdmin( - { - action: AllowedIssueAction.CREATE, - customerName: 'Nick Testing Industries', - customerAbbr: 'NA1', - startDate: new Date(2024, 10, 17), - endDate: new Date(2024, 10, 20), - administrators: [ - { - handle: 'ncalteen', - email: 'ncalteen@github.com' - } - ], - attendees: [ - { - handle: 'ncalteen-testuser', - email: 'ncalteen+testing@github.com' - } - ] - }, - { - issue: { number: 1 }, - comment: { - body: '.add-admin fakeuser,fakeuser@notgithub.com' - } - } as any - ) - } catch (error: any) { - // eslint-disable-next-line jest/no-conditional-expect - expect(error.message).toBe('Admins Must be GitHub/Microsoft Employees') - } - }) - }) - describe('addUser()', () => { it('Throws on Invalid Format', async () => { try { @@ -456,12 +299,6 @@ describe('actions', () => { customerAbbr: 'NA1', startDate: new Date(2024, 10, 17), endDate: new Date(2024, 10, 20), - administrators: [ - { - handle: 'ncalteen', - email: 'ncalteen@github.com' - } - ], attendees: [ { handle: 'ncalteen-testuser', @@ -492,12 +329,6 @@ describe('actions', () => { customerAbbr: 'NA1', startDate: new Date(2024, 10, 17), endDate: new Date(2024, 10, 20), - administrators: [ - { - handle: 'ncalteen', - email: 'ncalteen@github.com' - } - ], attendees: [ { handle: 'ncalteen-testuser', @@ -519,43 +350,4 @@ describe('actions', () => { expect(issues_complete).toHaveBeenCalled() }) }) - - describe('removeAdmin()', () => { - it('Throws on Invalid Format', async () => { - try { - await actions.removeAdmin( - { - action: AllowedIssueAction.CREATE, - customerName: 'Nick Testing Industries', - customerAbbr: 'NA1', - startDate: new Date(2024, 10, 17), - endDate: new Date(2024, 10, 20), - administrators: [ - { - handle: 'ncalteen', - email: 'ncalteen@github.com' - } - ], - attendees: [ - { - handle: 'ncalteen-testuser', - email: 'ncalteen+testing@github.com' - } - ] - }, - { - issue: { number: 1 }, - comment: { - body: '.remove-admin invalid format' - } - } as any - ) - } catch (error: any) { - // eslint-disable-next-line jest/no-conditional-expect - expect(error.message).toBe( - 'Invalid Format! Try `.remove-admin handle,email`' - ) - } - }) - }) }) diff --git a/__tests__/events.test.ts b/__tests__/events.test.ts index 00974dc..bf52a15 100644 --- a/__tests__/events.test.ts +++ b/__tests__/events.test.ts @@ -54,17 +54,6 @@ describe('events', () => { ).toBe(undefined) }) - it('Returns Add Admin Action for .add-admin Issue Comment Events', () => { - expect( - events.getAction('issue_comment', { - action: 'created', - comment: { - body: '.add-admin handle,email' - } - } as any) - ).toBe(AllowedIssueCommentAction.ADD_ADMIN) - }) - it('Returns Add User for .add-user Issue Comment Events', () => { expect( events.getAction('issue_comment', { @@ -76,17 +65,6 @@ describe('events', () => { ).toBe(AllowedIssueCommentAction.ADD_USER) }) - it('Returns Remove Admin for .remove-admin Issue Comment Events', () => { - expect( - events.getAction('issue_comment', { - action: 'created', - comment: { - body: '.remove-admin handle,email' - } - } as any) - ).toBe(AllowedIssueCommentAction.REMOVE_ADMIN) - }) - it('Returns Remove User for .remove-user Issue Comment Events', () => { expect( events.getAction('issue_comment', { diff --git a/__tests__/github/issues.test.ts b/__tests__/github/issues.test.ts index 2e96750..a61bd5b 100644 --- a/__tests__/github/issues.test.ts +++ b/__tests__/github/issues.test.ts @@ -33,6 +33,9 @@ const teams_exists: jest.SpiedFunction< const teams_generateTeamName: jest.SpiedFunction< typeof import('../../src/github/teams.js').generateTeamName > = jest.fn() +const users_isInstructor: jest.SpiedFunction< + typeof import('../../src/github/users.js').isInstructor +> = jest.fn() const users_isOrgMember: jest.SpiedFunction< typeof import('../../src/github/users.js').isOrgMember > = jest.fn() @@ -46,6 +49,7 @@ jest.unstable_mockModule('../../src/github/teams.js', () => ({ generateTeamName: teams_generateTeamName })) jest.unstable_mockModule('../../src/github/users.js', () => ({ + isInstructor: users_isInstructor, isOrgMember: users_isOrgMember })) @@ -145,7 +149,7 @@ describe('issues', () => { } catch (e: any) { // eslint-disable-next-line jest/no-conditional-expect expect(e.message).toBe( - "Invalid Administrator: (must be 'handle,email' format)" + "Invalid Attendee: (must be 'handle,email' format)" ) } }) @@ -184,12 +188,6 @@ describe('issues', () => { customerAbbr: 'NA1', startDate: expect.any(Date), endDate: expect.any(Date), - administrators: [ - { - handle: 'ncalteen', - email: 'ncalteen@github.com' - } - ], attendees: [ { handle: 'ncalteen-testuser', @@ -216,12 +214,6 @@ describe('issues', () => { customerAbbr: 'NA1', startDate: expect.any(Date), endDate: expect.any(Date), - administrators: [ - { - handle: 'ncalteen', - email: 'ncalteen@github.com' - } - ], attendees: [] }) }) @@ -240,12 +232,6 @@ describe('issues', () => { customerAbbr: 'NA1', startDate: new Date(2024, 10, 17), endDate: new Date(2024, 10, 20), - administrators: [ - { - handle: 'ncalteen', - email: 'ncalteen@github.com' - } - ], attendees: [ { handle: 'ncalteen-testuser', @@ -296,12 +282,6 @@ describe('issues', () => { customerAbbr: 'NA1', startDate: new Date(2024, 10, 17), endDate: new Date(2024, 10, 20), - administrators: [ - { - handle: 'ncalteen', - email: 'ncalteen@github.com' - } - ], attendees: [ { handle: 'ncalteen-testuser', @@ -339,12 +319,6 @@ describe('issues', () => { customerAbbr: 'NA1', startDate: new Date(2024, 10, 17), endDate: new Date(2024, 10, 20), - administrators: [ - { - handle: 'ncalteen', - email: 'ncalteen@github.com' - } - ], attendees: [ { handle: 'ncalteen-testuser', @@ -360,33 +334,6 @@ describe('issues', () => { }) describe('generateMessage()', () => { - it('Generates an Add Admin Message', () => { - github.context.payload.comment.body = - '.add-admin ncalteen,ncalteen@github.com' - - expect( - typeof issues.generateMessage({ - action: AllowedIssueCommentAction.ADD_ADMIN, - customerName: 'Nick Testing Industries', - customerAbbr: 'NA1', - startDate: new Date(2024, 10, 17), - endDate: new Date(2024, 10, 20), - administrators: [ - { - handle: 'ncalteen', - email: 'ncalteen@github.com' - } - ], - attendees: [ - { - handle: 'ncalteen-testuser', - email: 'ncalteen+testing@github.com' - } - ] - }) - ).toBe('string') - }) - it('Generates an Add User Message', () => { github.context.payload.comment.body = '.add-user ncalteen,ncalteen@github.com' @@ -398,12 +345,6 @@ describe('issues', () => { customerAbbr: 'NA1', startDate: new Date(2024, 10, 17), endDate: new Date(2024, 10, 20), - administrators: [ - { - handle: 'ncalteen', - email: 'ncalteen@github.com' - } - ], attendees: [ { handle: 'ncalteen-testuser', @@ -422,12 +363,6 @@ describe('issues', () => { customerAbbr: 'NA1', startDate: new Date(2024, 10, 17), endDate: new Date(2024, 10, 20), - administrators: [ - { - handle: 'ncalteen', - email: 'ncalteen@github.com' - } - ], attendees: [ { handle: 'ncalteen-testuser', @@ -446,12 +381,6 @@ describe('issues', () => { customerAbbr: 'NA1', startDate: new Date(2024, 10, 17), endDate: new Date(2024, 10, 20), - administrators: [ - { - handle: 'ncalteen', - email: 'ncalteen@github.com' - } - ], attendees: [ { handle: 'ncalteen-testuser', @@ -470,39 +399,6 @@ describe('issues', () => { customerAbbr: 'NA1', startDate: new Date(2024, 10, 17), endDate: new Date(2024, 10, 20), - administrators: [ - { - handle: 'ncalteen', - email: 'ncalteen@github.com' - } - ], - attendees: [ - { - handle: 'ncalteen-testuser', - email: 'ncalteen+testing@github.com' - } - ] - }) - ).toBe('string') - }) - - it('Generates a Remove Admin Message', () => { - github.context.payload.comment.body = - '.remove-admin ncalteen,ncalteen@github.com' - - expect( - typeof issues.generateMessage({ - action: AllowedIssueCommentAction.REMOVE_ADMIN, - customerName: 'Nick Testing Industries', - customerAbbr: 'NA1', - startDate: new Date(2024, 10, 17), - endDate: new Date(2024, 10, 20), - administrators: [ - { - handle: 'ncalteen', - email: 'ncalteen@github.com' - } - ], attendees: [ { handle: 'ncalteen-testuser', @@ -524,12 +420,6 @@ describe('issues', () => { customerAbbr: 'NA1', startDate: new Date(2024, 10, 17), endDate: new Date(2024, 10, 20), - administrators: [ - { - handle: 'ncalteen', - email: 'ncalteen@github.com' - } - ], attendees: [ { handle: 'ncalteen-testuser', @@ -548,12 +438,6 @@ describe('issues', () => { customerAbbr: 'NA1', startDate: new Date(2024, 10, 17), endDate: new Date(2024, 10, 20), - administrators: [ - { - handle: 'ncalteen', - email: 'ncalteen@github.com' - } - ], attendees: [ { handle: 'ncalteen-testuser', diff --git a/__tests__/main.test.ts b/__tests__/main.test.ts index 96847c4..1b47c4c 100644 --- a/__tests__/main.test.ts +++ b/__tests__/main.test.ts @@ -21,6 +21,13 @@ jest.unstable_mockModule('@octokit/rest', async () => { }) jest.unstable_mockModule('fs', () => fs) +const yaml_parse: jest.SpiedFunction = jest.fn() +jest.unstable_mockModule('yaml', () => ({ + default: { + parse: yaml_parse + } +})) + const events_getAction: jest.SpiedFunction< typeof import('../src/events.js').getAction > = jest.fn() @@ -36,15 +43,9 @@ const actions_close: jest.SpiedFunction< const actions_expire: jest.SpiedFunction< typeof import('../src/actions.js').expire > = jest.fn() -const actions_addAdmin: jest.SpiedFunction< - typeof import('../src/actions.js').addAdmin -> = jest.fn() const actions_addUser: jest.SpiedFunction< typeof import('../src/actions.js').addUser > = jest.fn() -const actions_removeAdmin: jest.SpiedFunction< - typeof import('../src/actions.js').removeAdmin -> = jest.fn() const actions_removeUser: jest.SpiedFunction< typeof import('../src/actions.js').removeUser > = jest.fn() @@ -64,9 +65,7 @@ jest.unstable_mockModule('../src/actions.js', () => { create: actions_create, close: actions_close, expire: actions_expire, - addAdmin: actions_addAdmin, addUser: actions_addUser, - removeAdmin: actions_removeAdmin, removeUser: actions_removeUser } }) @@ -83,12 +82,27 @@ describe('main', () => { fs.readFileSync.mockReturnValue(dedent`instructors: - test`) + + yaml_parse.mockReturnValue({ + instructors: github.context.actor + }) }) afterEach(() => { jest.resetAllMocks() }) + it('Fails if the User is not an Instructor', async () => { + yaml_parse.mockReturnValue({ + instructors: ['not-an-instructor'] + }) + + await main.run() + expect(core.setFailed).toHaveBeenCalledWith( + 'You are not authorized to use this action. Please contact an instructor.' + ) + }) + it('Skips Invalid Actions', async () => { events_getAction.mockReturnValue(undefined) @@ -96,9 +110,7 @@ describe('main', () => { expect(actions_create).not.toHaveBeenCalled() expect(actions_close).not.toHaveBeenCalled() - expect(actions_addAdmin).not.toHaveBeenCalled() expect(actions_addUser).not.toHaveBeenCalled() - expect(actions_removeAdmin).not.toHaveBeenCalled() expect(actions_removeUser).not.toHaveBeenCalled() expect(core.setFailed).not.toHaveBeenCalled() }) @@ -127,14 +139,6 @@ describe('main', () => { expect(actions_close).toHaveBeenCalledTimes(1) }) - it('Processes an Add Admin Event', async () => { - events_getAction.mockReturnValue(AllowedIssueCommentAction.ADD_ADMIN) - - await main.run() - - expect(actions_addAdmin).toHaveBeenCalledTimes(1) - }) - it('Processes an Add User Event', async () => { events_getAction.mockReturnValue(AllowedIssueCommentAction.ADD_USER) @@ -143,14 +147,6 @@ describe('main', () => { expect(actions_addUser).toHaveBeenCalledTimes(1) }) - it('Processes a Remove Admin Event', async () => { - events_getAction.mockReturnValue(AllowedIssueCommentAction.REMOVE_ADMIN) - - await main.run() - - expect(actions_removeAdmin).toHaveBeenCalledTimes(1) - }) - it('Processes a Remove User Event', async () => { events_getAction.mockReturnValue(AllowedIssueCommentAction.REMOVE_USER) diff --git a/badges/coverage.svg b/badges/coverage.svg index 74f5622..447170c 100644 --- a/badges/coverage.svg +++ b/badges/coverage.svg @@ -1 +1 @@ -Coverage: 83.4%Coverage83.4% \ No newline at end of file +Coverage: 84.22%Coverage84.22% \ No newline at end of file diff --git a/dist/actions.d.ts b/dist/actions.d.ts deleted file mode 100644 index 3ea920f..0000000 --- a/dist/actions.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -import type { IssueCommentEvent, IssuesEvent } from '@octokit/webhooks-types'; -import type { ClassRequest } from './types.js'; -/** - * Creates a class from a request. - * - * @param request Class Request - * @param issue Issue Payload - */ -export declare function create(request: ClassRequest, issue: IssuesEvent['issue']): Promise; -/** - * Closes a class. - * - * @param request Class Request - * @param issue Issue Payload - */ -export declare function close(request: ClassRequest, issue: IssuesEvent['issue']): Promise; -/** - * Expires any open classes. - */ -export declare function expire(): Promise; -/** - * Adds an administrator to a class. - * - * @param request Class Request - * @param payload Issue Comment Payload - */ -export declare function addAdmin(request: ClassRequest, payload: IssueCommentEvent): Promise; -/** - * Adds an user to a class. - * - * @param request Class Request - * @param payload Issue Comment Payload - */ -export declare function addUser(request: ClassRequest, payload: IssueCommentEvent): Promise; -/** - * Removes an administrator from the class. - * - * @param request Class Request - * @param payload Issue Comment - */ -export declare function removeAdmin(request: ClassRequest, payload: IssueCommentEvent): Promise; -/** - * Removes a user from the class. - * - * @param request Class Request - * @param payload Issue Comment Payload - */ -export declare function removeUser(request: ClassRequest, payload: IssueCommentEvent): Promise; diff --git a/dist/enums.d.ts b/dist/enums.d.ts deleted file mode 100644 index d31df5d..0000000 --- a/dist/enums.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** Allowed Action Types (Issue Event) */ -export declare enum AllowedIssueAction { - /** Close a Class */ - CLOSE = "close", - /** Create a Class */ - CREATE = "create", - /** Expire Classes */ - EXPIRE = "expire" -} -/** Allowed Action Types (Issue Comment Event) */ -export declare enum AllowedIssueCommentAction { - /** Add an Administrator */ - ADD_ADMIN = "add-admin", - /** Add a User */ - ADD_USER = "add-user", - /** Remove an Administrator */ - REMOVE_ADMIN = "remove-admin", - /** Remove a User */ - REMOVE_USER = "remove-user" -} -/** Fast Track Bot (GitHub App) */ -export declare enum Bot { - /** Email Address */ - EMAIL = "185417500+gh-intermediate-issueops[bot]@users.noreply.github.com", - /** User Name */ - USER = "gh-intermediate-issueops[bot]" -} -/** Common Constants */ -export declare enum Common { - /** IssueOps Repository */ - ISSUEOPS_REPO = "gh-github-intermediate-issueops", - /** Organization */ - OWNER = "githubschool", - /** Template Repositoriy */ - TEMPLATE_REPO = "gh-github-intermediate-template" -} diff --git a/dist/events.d.ts b/dist/events.d.ts deleted file mode 100644 index d966abc..0000000 --- a/dist/events.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { IssueCommentEvent, IssuesEvent } from '@octokit/webhooks-types'; -import { AllowedIssueAction, AllowedIssueCommentAction } from './enums.js'; -/** - * Checks the event name and payload to determine the action to take. - * - * @param name Event Name - * @param payload Event Payload - * @returns Action to Take - */ -export declare function getAction(name: string, payload: IssueCommentEvent | IssuesEvent): AllowedIssueAction | AllowedIssueCommentAction | undefined; diff --git a/dist/github/issues.d.ts b/dist/github/issues.d.ts deleted file mode 100644 index afeda19..0000000 --- a/dist/github/issues.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -import type { IssueCommentEvent, IssuesEvent } from '@octokit/webhooks-types'; -import { AllowedIssueAction, AllowedIssueCommentAction } from '../enums.js'; -import type { ClassRequest } from '../types.js'; -/** - * Parses the issue body and returns a JSON object. - * - * @param issue Issue - * @param action Action - * @returns Class Request - */ -export declare function parse(issue: IssueCommentEvent['issue'] | IssuesEvent['issue'], action: AllowedIssueAction | AllowedIssueCommentAction): ClassRequest; -/** - * Completes the class request. - * - * @param issue Issue - * @param request Class Request - */ -export declare function complete(request: ClassRequest, issue: IssueCommentEvent['issue'] | IssuesEvent['issue']): Promise; -/** - * Closes a request. - * - * @param issue Issue - * @param request Class Request - */ -export declare function close(issue: IssueCommentEvent['issue'], request: ClassRequest): Promise; -/** - * Generates the body for a successfully processed request. - * - * @param request Class Request - * @returns Comment Body - */ -export declare function generateMessage(request: ClassRequest): string; -/** - * Adds one or more labels to an issue. - * - * @param issue Issue - * @param labels Labels - */ -export declare function addLabels(issue: IssueCommentEvent['issue'] | IssuesEvent['issue'], labels: string[]): Promise; diff --git a/dist/github/repos.d.ts b/dist/github/repos.d.ts deleted file mode 100644 index c23ed36..0000000 --- a/dist/github/repos.d.ts +++ /dev/null @@ -1,125 +0,0 @@ -import type { ExecOptions } from '@actions/exec'; -import type { GitHub } from '@actions/github/lib/utils.js'; -import type { ClassRequest, Team, User } from '../types.js'; -/** - * Generates the repository name for this class and user. - * - * @param request Class Request - * @param user User - */ -export declare function generateRepoName(request: ClassRequest, user: User): string; -/** - * Creates a repository for an attendee. - * - * @param request Class Request - * @param team Team - * @returns Repository Name - */ -export declare function create(request: ClassRequest, user: User, team: Team): Promise; -/** - * Checks if the repository exists. - * - * @param request Class Request - * @param user User - * @returns True if the Repository Exists - */ -export declare function exists(request: ClassRequest, user: User): Promise; -/** - * Configures an attendee repository. - * - * @param request Class Request - * @param user User - * @param repo Repository Name - * @param team Team - */ -export declare function configure(request: ClassRequest, user: User, repo: string, team: Team): Promise; -/** - * Deletes all class repositories. - * - * @param request Class Request - */ -export declare function deleteRepositories(request: ClassRequest): Promise; -/** - * Configure Lab 1: Add a Feature - * - * @param options Exec Options - * @param octokit Octokit Client - */ -export declare function configureLab1(options: ExecOptions, octokit: InstanceType): Promise; -/** - * Configure Lab 2: Add Tags - * - * @param options Exec Options - * @param octokit Octokit Client - */ -export declare function configureLab2(options: ExecOptions, octokit: InstanceType): Promise; -/** - * Configure Lab 3: Git Bisect - * - * This setup step creates a number of commits in the lab repository. One commit - * will contain the specific code that the student will need to bisect to find. - * The remainder are just filler commits to make the history more complex. - * - * @param options Exec Options - * @param octokit Octokit Client - */ -export declare function configureLab3(options: ExecOptions, octokit: InstanceType): Promise; -/** - * Configure Lab 4: Interactive Rebase - * - * This setup step creates a feature branch off an earlier commit on main, so - * that students can rebase the feature branch onto the latest commit on main. - * - * @param options Exec Options - * @param octokit Octokit Client - */ -export declare function configureLab4(options: ExecOptions, octokit: InstanceType): Promise; -/** - * Configure Lab 5: Cherry-Pick - * - * @param options Exec Options - * @param octokit Octokit Client - */ -export declare function configureLab5(options: ExecOptions, octokit: InstanceType): Promise; -/** - * Configure Lab 6: Protect Main - * - * @param options Exec Options - * @param octokit Octokit Client - */ -export declare function configureLab6(options: ExecOptions, octokit: InstanceType): Promise; -/** - * Configure Lab 7: GitHub Flow - * - * @param options Exec Options - * @param octokit Octokit Client - */ -export declare function configureLab7(options: ExecOptions, octokit: InstanceType): Promise; -/** - * Configure Lab 8: Merge Conflicts - * - * @param options Exec Options - * @param octokit Octokit Client - */ -export declare function configureLab8(options: ExecOptions, octokit: InstanceType): Promise; -/** - * Configure Lab 9: Run a Workflow - * - * @param options Exec Options - * @param octokit Octokit Client - */ -export declare function configureLab9(options: ExecOptions, octokit: InstanceType): Promise; -/** - * Configure Lab 10: Create a Release - * - * @param options Exec Options - * @param octokit Octokit Client - */ -export declare function configureLab10(options: ExecOptions, octokit: InstanceType): Promise; -/** - * Configure Lab 11: Deploy to an Environment - * - * @param options Exec Options - * @param octokit Octokit Client - */ -export declare function configureLab11(options: ExecOptions, octokit: InstanceType): Promise; diff --git a/dist/github/teams.d.ts b/dist/github/teams.d.ts deleted file mode 100644 index 56b0da7..0000000 --- a/dist/github/teams.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -import type { ClassRequest, Team, User } from '../types.js'; -/** - * Generates the team name for this class. - * - * @param request Class Request - */ -export declare function generateTeamName(request: ClassRequest): string; -/** - * Checks if the team exists. - * - * @param request Class Request - * @returns True if Team Exists - */ -export declare function exists(request: ClassRequest): Promise; -/** - * Gets the team. - * - * @param request Class Request - * @returns Team Information - */ -export declare function get(request: ClassRequest): Promise; -/** - * Creates the team for this class. - * - * @param request Class Request - * @returns Team Information - */ -export declare function create(request: ClassRequest): Promise; -/** - * Adds a member to the team. - * - * @param request Class Request - * @param user User to Add - * @param role Role to Assign - */ -export declare function addUser(request: ClassRequest, user: User, role?: 'member' | 'maintainer'): Promise; -/** - * Removes a member to the team. - * - * @param request Class Request - * @param user User to Remove - */ -export declare function removeUser(request: ClassRequest, user: User): Promise; -/** - * Deletes the team. - * - * @param request Class Request - */ -export declare function deleteTeam(request: ClassRequest): Promise; -/** - * Gets the members of the team. - * - * @param request Class Request - * @returns Team Members - */ -export declare function getMembers(request: ClassRequest): Promise; diff --git a/dist/github/users.d.ts b/dist/github/users.d.ts deleted file mode 100644 index 53cebab..0000000 --- a/dist/github/users.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { ClassRequest } from '../types.js'; -/** - * Checks if the user is a member of the organization. - * - * @param handle User Handle - * @returns User Membership Status - */ -export declare function isOrgMember(handle: string): Promise<'pending' | 'active' | undefined>; -/** - * Removes all users in this class from the organization. - * - * @param request Class Request - */ -export declare function removeUsers(request: ClassRequest): Promise; diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dist/index.js b/dist/index.js index 6fa1484..27fa875 100644 --- a/dist/index.js +++ b/dist/index.js @@ -27955,7 +27955,7 @@ function withDefaults$2(oldDefaults, newDefaults) { const endpoint = withDefaults$2(null, DEFAULTS); -const VERSION$4 = "8.4.0"; +const VERSION$4 = "8.4.1"; function isPlainObject(value) { if (typeof value !== "object" || value === null) @@ -28103,7 +28103,7 @@ class RequestError extends Error { if (options.request.headers.authorization) { requestCopy.headers = Object.assign({}, options.request.headers, { authorization: options.request.headers.authorization.replace( - / .*$/, + /(?]+)>; rel="deprecation"/); + const matches = headers.link && headers.link.match(/<([^<>]+)>; rel="deprecation"/); const deprecationLink = matches && matches.pop(); log.warn( `[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}` @@ -30740,7 +30740,7 @@ var distSrc = /*#__PURE__*/Object.freeze({ var require$$3 = /*@__PURE__*/getAugmentedNamespace(distSrc); // pkg/dist-src/version.js -var VERSION = "9.2.1"; +var VERSION = "9.2.2"; // pkg/dist-src/normalize-paginated-list-response.js function normalizePaginatedListResponse(response) { @@ -30788,7 +30788,7 @@ function iterator(octokit, route, parameters) { const response = await requestMethod({ method, url, headers }); const normalizedResponse = normalizePaginatedListResponse(response); url = ((normalizedResponse.headers.link || "").match( - /<([^>]+)>;\s*rel="next"/ + /<([^<>]+)>;\s*rel="next"/ ) || [])[1]; return { value: normalizedResponse }; } catch (error) { @@ -38715,12 +38715,8 @@ var AllowedIssueAction; /** Allowed Action Types (Issue Comment Event) */ var AllowedIssueCommentAction; (function (AllowedIssueCommentAction) { - /** Add an Administrator */ - AllowedIssueCommentAction["ADD_ADMIN"] = "add-admin"; /** Add a User */ AllowedIssueCommentAction["ADD_USER"] = "add-user"; - /** Remove an Administrator */ - AllowedIssueCommentAction["REMOVE_ADMIN"] = "remove-admin"; /** Remove a User */ AllowedIssueCommentAction["REMOVE_USER"] = "remove-user"; })(AllowedIssueCommentAction || (AllowedIssueCommentAction = {})); @@ -38758,6 +38754,7 @@ function generateRepoName(request, user) { * Creates a repository for an attendee. * * @param request Class Request + * @param user User * @param team Team * @returns Repository Name */ @@ -39122,12 +39119,7 @@ async function configureLab10(options, octokit) { */ async function configureLab11(options, octokit) { coreExports.info('Configuring Lab 11: Deploy to an Environment'); - // // Commit the updates. - // core.info('Committing Changes') - // await exec.exec('git', ['add', '.'], options) - // await exec.exec('git', ['commit', '-m', 'Initial configuration'], options) - // core.info('Pushing changes') - // await exec.exec('git', ['push'], options) + // Nothing needs to be done... coreExports.info('Configured Lab 11: Deploy to an Environment'); } @@ -39197,14 +39189,11 @@ async function create$1(request) { // Create the team. Add the class administrators as maintainers. const response = await octokit.rest.teams.create({ org: Common.OWNER, - name: generateTeamName(request), - maintainers: request.administrators.map((user) => { - return user.handle; - }) + name: generateTeamName(request) }); // Add the users to the team. for (const user of request.attendees) - await addUser$1(request, user, 'member'); + await addUser$1(request, user); coreExports.info(`Created Class Team: ${generateTeamName(request)}`); return { slug: response.data.slug, id: response.data.id }; } @@ -39215,7 +39204,7 @@ async function create$1(request) { * @param user User to Add * @param role Role to Assign */ -async function addUser$1(request, user, role = 'member') { +async function addUser$1(request, user) { coreExports.info(`Adding User to Class Team: ${user.handle}`); // Create the authenticated Octokit client. const token = coreExports.getInput('github_token', { required: true }); @@ -39225,12 +39214,12 @@ async function addUser$1(request, user, role = 'member') { org: Common.OWNER, team_slug: generateTeamName(request), username: user.handle, - role + role: 'member' }); coreExports.info(`Added User to Class Team: ${user.handle}`); } /** - * Removes a member to the team. + * Removes a member from the team. * * @param request Class Request * @param user User to Remove @@ -39351,10 +39340,11 @@ async function removeUsers(request) { } `, { login: member.handle }); // Remove the user from the organization (if they're not a GitHub or - // Microsoft employee). + // Microsoft employee and are not in the instructors list). if (!response.user.isEmployee && !response.user.email.includes('@microsoft.com') && - (await isOrgMember(member.handle))) + (await isOrgMember(member.handle)) && + !isInstructor(member.handle)) await octokit.rest.orgs.removeMember({ org: Common.OWNER, username: member.handle @@ -39362,6 +39352,17 @@ async function removeUsers(request) { } coreExports.info(`Removed Users from the Organization: ${Common.OWNER}`); } +/** + * Checks if the user is an instructor. + * + * @param handle User Handle + * @returns True if the user is in the instructors list, false otherwise. + */ +function isInstructor(handle) { + return YAML + .parse(fs.readFileSync(require$$1$4.resolve(process.env.GITHUB_WORKSPACE, 'instructors.yml'), 'utf8')) + .instructors.some((instructor) => instructor === handle); +} /** * Parses the issue body and returns a JSON object. @@ -39378,7 +39379,6 @@ function parse(issue, action) { customerAbbr: /### Customer Abbreviation[\r\n]+(?[\s\S]*?)(?=###|$)/, startDate: /### Start Date[\r\n]+(?[\s\S]*?)(?=###|$)/, endDate: /### End Date[\r\n]+(?[\s\S]*?)(?=###|$)/, - administrators: /### Administrators[\r\n]+(?[\s\S]*?)(?=###|$)/, attendees: /### Attendees[\r\n]+(?[\s\S]*?)(?=###|$)/ }; // Get the PR body and check that it isn't empty @@ -39394,10 +39394,6 @@ function parse(issue, action) { .toUpperCase() ?? '', startDate: body.match(regexes.startDate)?.groups?.startDate.trim() ?? '', endDate: body.match(regexes.endDate)?.groups?.endDate.trim() ?? '', - administrators: body - .match(regexes.administrators) - ?.groups?.administrators.trim() - .toLowerCase() ?? '', attendees: body.match(regexes.attendees)?.groups?.attendees.trim().toLowerCase() ?? '' }; @@ -39418,17 +39414,6 @@ function parse(issue, action) { const endDate = isNaN(Date.parse(results.endDate)) ? undefined : new Date(Date.parse(results.endDate)); - // Parse the administrators, default to empty array. - const administrators = results.administrators.includes(noResponse.toLowerCase()) - ? [] - : results.administrators.split(/\n/).map((value) => { - if (value.split(/,\s?/).length !== 2) - throw new Error(`Invalid Administrator: ${value} (must be 'handle,email' format)`); - return { - email: value.split(/,\s?/)[1], - handle: value.split(/,\s?/)[0] - }; - }); // Parse the attendees, default to empty array. const attendees = results.attendees.includes(noResponse.toLowerCase()) ? [] @@ -39450,9 +39435,6 @@ function parse(issue, action) { throw new Error('Start Date Not Found'); if (!endDate) throw new Error('End Date Not Found'); - // At least one admin is required, but attendees can be empty - if (administrators.length === 0) - throw new Error('At Least One Administrator Required'); coreExports.info('Creating Class Request'); const request = { action, @@ -39460,7 +39442,6 @@ function parse(issue, action) { customerAbbr, startDate, endDate, - administrators, attendees }; coreExports.info(JSON.stringify(request, null, 2)); @@ -39493,16 +39474,7 @@ async function complete(request, issue) { * @returns Comment Body */ function generateMessage(request) { - // New class creation - if (request.action === AllowedIssueCommentAction.ADD_ADMIN) { - const payload = githubExports.context.payload; - const user = { - handle: payload.comment.body.split(' ')[1].split(',')[0], - email: payload.comment.body.split(' ')[1].split(',')[1] - }; - return `The following admin has been added: ${user.handle}`; - } - else if (request.action === AllowedIssueCommentAction.ADD_USER) { + if (request.action === AllowedIssueCommentAction.ADD_USER) { const payload = githubExports.context.payload; const user = { handle: payload.comment.body.split(' ')[1].split(',')[0], @@ -39536,22 +39508,12 @@ function generateMessage(request) { | Command | Description | |--------------------------------|---------------------------------| | \`.add-user handle,email\` | Add a user to the class. | - | \`.add-admin handle,email\` | Add an admin to the class. | | \`.remove-user handle,email\` | Remove a user from the class. | - | \`.remove-admin handle,email\` | Remove an admin from the class. | `); } else if (request.action === AllowedIssueAction.EXPIRE) { return 'It looks like this request has expired. Access has been revoked for all attendees!'; } - else if (request.action === AllowedIssueCommentAction.REMOVE_ADMIN) { - const payload = githubExports.context.payload; - const user = { - handle: payload.comment.body.split(' ')[1].split(',')[0], - email: payload.comment.body.split(' ')[1].split(',')[1] - }; - return `The following admin has been removed: ${user.handle}`; - } else if (request.action === AllowedIssueCommentAction.REMOVE_USER) { const payload = githubExports.context.payload; const user = { @@ -39679,46 +39641,7 @@ async function expire() { coreExports.info('Expired Open Classes'); } /** - * Adds an administrator to a class. - * - * @param request Class Request - * @param payload Issue Comment Payload - */ -async function addAdmin(request, payload) { - coreExports.info(`Adding Admin to Class Request: #${payload.issue.number}`); - // Create the authenticated Octokit client. - const token = coreExports.getInput('github_token', { required: true }); - const octokit = githubExports.getOctokit(token); - // Get the user from the comment body. - // Format: .add-admin handle,email - if (!payload.comment.body.split(' ')[1] || - !payload.comment.body.split(' ')[1].includes(',') || - payload.comment.body.split(' ')[1].split(',').length !== 2) - throw new Error('Invalid Format! Try `.add-admin handle,email`'); - const user = { - handle: payload.comment.body.split(' ')[1].split(',')[0], - email: payload.comment.body.split(' ')[1].split(',')[1] - }; - // Check if the user is a GitHub/Microsoft employee. - const response = await octokit.graphql(` - query($login: String!) { - user(login: $login) { - isEmployee - email - } - } - `, { login: user.handle }); - // Do not add the admin if they are not a GitHub or Microsoft employee. - if (!response.user.isEmployee && - !response.user.email.includes('@microsoft.com')) - throw new Error('Admins Must be GitHub/Microsoft Employees'); - await addUser$1(request, user, 'maintainer'); - // Comment on the issue with the summary. - await complete(request, payload.issue); - coreExports.info(`Added Admin to Class Request: #${payload.issue.number}`); -} -/** - * Adds an user to a class. + * Adds a user to a class. * * @param request Class Request * @param payload Issue Comment Payload @@ -39745,70 +39668,6 @@ async function addUser(request, payload) { await complete(request, payload.issue); coreExports.info(`Added User to Class Request: #${payload.issue.number}`); } -/** - * Removes an administrator from the class. - * - * @param request Class Request - * @param payload Issue Comment - */ -async function removeAdmin(request, payload) { - coreExports.info(`Removing Admin from Class Request: #${payload.issue.number}`); - // Create the authenticated Octokit client. - const token = coreExports.getInput('github_token', { required: true }); - const octokit = githubExports.getOctokit(token); - // Get the user from the comment body. - // Format: .remove-admin handle,email - if (!payload.comment.body.split(' ')[1] || - !payload.comment.body.split(' ')[1].includes(',') || - payload.comment.body.split(' ')[1].split(',').length !== 2) - throw new Error('Invalid Format! Try `.remove-admin handle,email`'); - const user = { - handle: payload.comment.body.split(' ')[1].split(',')[0], - email: payload.comment.body.split(' ')[1].split(',')[1] - }; - // Check if the user is a GitHub/Microsoft employee. - const response = await octokit.graphql(` - query($login: String!) { - user(login: $login) { - isEmployee - email - } - } - `, { login: user.handle }); - // Get the user's membership state. - const memberState = await isOrgMember(user.handle); - // Remove the user from the organization (if they're not a GitHub or Microsoft - // employee). This will also remove them from the team. - if (!response.user.isEmployee && - !response.user.email.includes('@microsoft.com') && - memberState === 'active') - await octokit.rest.orgs.removeMember({ - org: Common.OWNER, - username: user.handle - }); - // If the membership is still pending, cancel the invitation. - if (!response.user.isEmployee && - !response.user.email.includes('@microsoft.com') && - memberState === 'pending') { - // Get the invitation ID. - const invitations = await octokit.paginate(octokit.rest.orgs.listPendingInvitations, { - org: Common.OWNER - }); - for (const invitation of invitations) { - if (invitation.login === user.handle) { - // Cancel the invitation. - await octokit.rest.orgs.cancelInvitation({ - org: Common.OWNER, - invitation_id: invitation.id - }); - } - } - } - // Remove from the team. - await removeUser$1(request, user); - await complete(request, payload.issue); - coreExports.info(`Removed Admin from Class Request: #${payload.issue.number}`); -} /** * Removes a user from the class. * @@ -39821,11 +39680,11 @@ async function removeUser(request, payload) { const token = coreExports.getInput('github_token', { required: true }); const octokit = githubExports.getOctokit(token); // Get the user from the comment body. - // Format: .remove-admin handle,email + // Format: .remove-user handle,email if (!payload.comment.body.split(' ')[1] || !payload.comment.body.split(' ')[1].includes(',') || payload.comment.body.split(' ')[1].split(',').length !== 2) - throw new Error('Invalid Format! Try `.remove-admin handle,email`'); + throw new Error('Invalid Format! Try `.remove-user handle,email`'); const user = { handle: payload.comment.body.split(' ')[1].split(',')[0], email: payload.comment.body.split(' ')[1].split(',')[1] @@ -39842,10 +39701,12 @@ async function removeUser(request, payload) { // Get the user's membership state. const memberState = await isOrgMember(user.handle); // Remove the user from the organization (if they're not a GitHub or Microsoft - // employee). This will also remove them from the team. + // employee, and are not in the instructors file). This will also remove them + // from the team. if (!response.user.isEmployee && !response.user.email.includes('@microsoft.com') && - memberState === 'active') + memberState === 'active' && + !isInstructor(user.handle)) await octokit.rest.orgs.removeMember({ org: Common.OWNER, username: user.handle @@ -39853,7 +39714,8 @@ async function removeUser(request, payload) { // If the membership is still pending, cancel the invitation. if (!response.user.isEmployee && !response.user.email.includes('@microsoft.com') && - memberState === 'pending') { + memberState === 'pending' && + !isInstructor(user.handle)) { // Get the invitation ID. const invitations = await octokit.paginate(octokit.rest.orgs.listPendingInvitations, { org: Common.OWNER @@ -39868,13 +39730,15 @@ async function removeUser(request, payload) { } } } - // Delete the user repository. + // Delete the user repository. This should happen regardless of whether the + // user is an employee or instructor. if (await exists$1(request, user)) await octokit.rest.repos.delete({ owner: Common.OWNER, repo: generateRepoName(request, user) }); - // Remove from the team. + // Remove from the team. This should happen regardless of whether the user is + // an employee or instructor. await removeUser$1(request, user); await complete(request, payload.issue); coreExports.info(`Removed User from Class Request: #${payload.issue.number}`); @@ -39902,12 +39766,8 @@ function getAction(name, payload) { return undefined; } if (name === 'issue_comment' && payload.action === 'created') { - if (payload.comment.body.startsWith('.add-admin')) - return AllowedIssueCommentAction.ADD_ADMIN; if (payload.comment.body.startsWith('.add-user')) return AllowedIssueCommentAction.ADD_USER; - if (payload.comment.body.startsWith('.remove-admin')) - return AllowedIssueCommentAction.REMOVE_ADMIN; if (payload.comment.body.startsWith('.remove-user')) return AllowedIssueCommentAction.REMOVE_USER; } @@ -39942,12 +39802,8 @@ async function run() { await create(request, payload.issue); else if (action === AllowedIssueAction.CLOSE) await close(request, payload.issue); - else if (action === AllowedIssueCommentAction.ADD_ADMIN) - await addAdmin(request, payload); else if (action === AllowedIssueCommentAction.ADD_USER) await addUser(request, payload); - else if (action === AllowedIssueCommentAction.REMOVE_ADMIN) - await removeAdmin(request, payload); else if (action === AllowedIssueCommentAction.REMOVE_USER) await removeUser(request, payload); } diff --git a/dist/main.d.ts b/dist/main.d.ts deleted file mode 100644 index 1aeec71..0000000 --- a/dist/main.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function run(): Promise; diff --git a/dist/types.d.ts b/dist/types.d.ts deleted file mode 100644 index 02abeee..0000000 --- a/dist/types.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { AllowedIssueAction, AllowedIssueCommentAction } from './enums.js'; -/** Class Request */ -export type ClassRequest = { - /** Request Action */ - action: AllowedIssueAction | AllowedIssueCommentAction; - /** Customer Name */ - customerName: string; - /** Customer Abbreviation */ - customerAbbr: string; - /** Start Date */ - startDate: Date; - /** End Date */ - endDate: Date; - /** Administrators */ - administrators: User[]; - /** Attendees */ - attendees: User[]; - /** Team */ - team?: string; -}; -/** Team Information */ -export type Team = { - /** ID */ - id: number; - /** Slug */ - slug: string; -}; -/** User Information */ -export type User = { - /** Email Address */ - email: string; - /** GitHub.com Handle */ - handle: string; -}; diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..554be9c --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,89 @@ +import { fixupPluginRules } from '@eslint/compat' +import { FlatCompat } from '@eslint/eslintrc' +import js from '@eslint/js' +import typescriptEslint from '@typescript-eslint/eslint-plugin' +import tsParser from '@typescript-eslint/parser' +import _import from 'eslint-plugin-import' +import jest from 'eslint-plugin-jest' +import prettier from 'eslint-plugin-prettier' +import { defineConfig, globalIgnores } from 'eslint/config' +import globals from 'globals' +import path from 'node:path' +import { fileURLToPath } from 'node:url' + +const __filename = fileURLToPath(import.meta.url) +const __dirname = path.dirname(__filename) +const compat = new FlatCompat({ + baseDirectory: __dirname, + recommendedConfig: js.configs.recommended, + allConfig: js.configs.all +}) + +export default defineConfig([ + globalIgnores([ + '**/.github', + '**/.vscode', + '**/coverage', + '**/dist', + '**/megalinter-reports', + '**/node_modules', + '**/reports' + ]), + { + extends: compat.extends( + 'eslint:recommended', + 'plugin:@typescript-eslint/eslint-recommended', + 'plugin:@typescript-eslint/recommended', + 'plugin:jest/recommended', + 'plugin:prettier/recommended' + ), + + plugins: { + import: fixupPluginRules(_import), + jest, + prettier, + '@typescript-eslint': typescriptEslint + }, + + languageOptions: { + globals: { + ...globals.node, + ...globals.jest, + Atomics: 'readonly', + NodeRequire: 'readonly', + SharedArrayBuffer: 'readonly' + }, + + parser: tsParser, + ecmaVersion: 'latest', + sourceType: 'module', + + parserOptions: { + project: ['tsconfig.eslint.json'], + tsconfigRootDir: '.' + } + }, + + settings: { + 'import/resolver': { + typescript: { + alwaysTryTypes: true, + project: 'tsconfig.eslint.json' + } + } + }, + + rules: { + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-unused-vars': 'off', + camelcase: 'off', + 'eslint-comments/no-use': 'off', + 'eslint-comments/no-unused-disable': 'off', + 'i18n-text/no-en': 'off', + 'import/no-namespace': 'off', + 'no-console': 'off', + 'no-shadow': 'off', + 'no-unused-vars': 'off' + } + } +]) diff --git a/package-lock.json b/package-lock.json index 5d7c4a2..37c060b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,22 +16,27 @@ "yaml": "^2.6.0" }, "devDependencies": { + "@eslint/compat": "^1.2.8", + "@eslint/eslintrc": "^3.3.1", + "@eslint/js": "^9.23.0", "@github/local-action": "^3.1.3", "@octokit/types": "^13.6.1", "@octokit/webhooks-types": "^7.6.1", "@rollup/plugin-commonjs": "^28.0.3", "@rollup/plugin-json": "^6.1.0", - "@rollup/plugin-node-resolve": "^15.3.0", + "@rollup/plugin-node-resolve": "^16.0.1", "@rollup/plugin-typescript": "^12.1.2", "@types/jest": "^29.5.14", "@types/node": "^22.13.14", "@typescript-eslint/eslint-plugin": "^8.28.0", "@typescript-eslint/parser": "^8.28.0", - "eslint": "^8.57.1", - "eslint-import-resolver-typescript": "^3.6.3", - "eslint-plugin-github": "^5.0.2", + "eslint": "^9.23.0", + "eslint-config-prettier": "^10.1.1", + "eslint-import-resolver-typescript": "^4.3.1", "eslint-plugin-import": "^2.31.0", "eslint-plugin-jest": "^28.11.0", + "eslint-plugin-prettier": "^5.2.5", + "globals": "^16.0.0", "jest": "^29.7.0", "jest-junit": "^16.0.0", "make-coverage-badge": "^1.2.0", @@ -44,6 +49,9 @@ }, "engines": { "node": ">=21" + }, + "optionalDependencies": { + "@rollup/rollup-linux-x64-gnu": "*" } }, "node_modules/@actions/artifact": { @@ -465,13 +473,14 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.25.7.tgz", - "integrity": "sha512-0xZJFNE5XMpENsgfHYTw8FbX4kv53mFLn2i3XPoq69LyhYSCBJtitaHx9QnsVTrsogI4Z3+HtEfZ2/GFPOtf5g==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", + "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/highlight": "^7.25.7", + "@babel/helper-validator-identifier": "^7.25.9", + "js-tokens": "^4.0.0", "picocolors": "^1.0.0" }, "engines": { @@ -630,9 +639,9 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.7.tgz", - "integrity": "sha512-CbkjYdsJNHFk8uqpEkpCvRs3YRp9tY6FmFY7wLMSYuGYkrdUi7r2lc4/wqsvlHoMznX3WJ9IP8giGPq68T/Y6g==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", + "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", "dev": true, "license": "MIT", "engines": { @@ -640,9 +649,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.7.tgz", - "integrity": "sha512-AM6TzwYqGChO45oiuPqwL2t20/HdMC1rTPAesnBCgPCSF1x3oN9MVUwQV2iyz4xqWrctwK5RNC8LV22kaQCNYg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", "dev": true, "license": "MIT", "engines": { @@ -660,104 +669,27 @@ } }, "node_modules/@babel/helpers": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.25.7.tgz", - "integrity": "sha512-Sv6pASx7Esm38KQpF/U/OXLwPPrdGHNKoeblRxgZRLXnAtnkEe4ptJPDtAZM7fBLadbc1Q07kQpSiGQ0Jg6tRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.25.7", - "@babel/types": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.25.7.tgz", - "integrity": "sha512-iYyACpW3iW8Fw+ZybQK+drQre+ns/tKpXbNESfrhNnPLIklLbXr7MYJ6gPEd0iETGLOK+SxMjVvKb/ffmk+FEw==", + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.0.tgz", + "integrity": "sha512-U5eyP/CTFPuNE3qk+WZMxFkp/4zUzdceQlfzf7DdGdhp+Fezd7HD+i8Y24ZuTMKX3wQBld449jijbGq6OdGNQg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.25.7", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" + "@babel/template": "^7.27.0", + "@babel/types": "^7.27.0" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/@babel/parser": { - "version": "7.25.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.8.tgz", - "integrity": "sha512-HcttkxzdPucv3nNFmfOOMfFf64KgdJVqm1KaCm25dPGMLElo9nsLvXeJECQg8UzPuBGLyTSA0ZzqCtDSzKTEoQ==", + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.0.tgz", + "integrity": "sha512-iaepho73/2Pz7w2eMS0Q5f83+0RKI7i4xmiYeBmDzfRVbQtTOG7Ts0S4HzJVsTMGI9keU8rNfuZr8DKfSt7Yyg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.25.8" + "@babel/types": "^7.27.0" }, "bin": { "parser": "bin/babel-parser.js" @@ -1006,15 +938,15 @@ } }, "node_modules/@babel/template": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.7.tgz", - "integrity": "sha512-wRwtAgI3bAS+JGU2upWNL9lSlDcRCqD05BZ1n3X2ONLH1WilFP6O1otQjeMK/1g0pvYcXC7b/qVUB1keofjtZA==", + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.0.tgz", + "integrity": "sha512-2ncevenBqXI6qRMukPlXwHKHchC7RyMuu4xv5JBXRfOGVcTy1mXCD12qrp7Jsoxll1EV3+9sE4GugBVRjT2jFA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.25.7", - "@babel/parser": "^7.25.7", - "@babel/types": "^7.25.7" + "@babel/code-frame": "^7.26.2", + "@babel/parser": "^7.27.0", + "@babel/types": "^7.27.0" }, "engines": { "node": ">=6.9.0" @@ -1050,15 +982,14 @@ } }, "node_modules/@babel/types": { - "version": "7.25.8", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.8.tgz", - "integrity": "sha512-JWtuCu8VQsMladxVz/P4HzHUGCAwpuqacmowgXFs5XjxIgKuNjnLokQzuVjlTvIzODaDmpjT3oxcC48vyk9EWg==", + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.0.tgz", + "integrity": "sha512-H45s8fVLYjbhFH62dIJ3WtmJ6RSPt/3DRO0ZcT2SUiYiQyz3BLVb9ADEnLl91m74aQPS3AzzeajZHYOalWe3bg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.25.7", - "@babel/helper-validator-identifier": "^7.25.7", - "to-fast-properties": "^2.0.0" + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1095,6 +1026,40 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "node_modules/@emnapi/core": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.4.0.tgz", + "integrity": "sha512-H+N/FqT07NmLmt6OFFtDfwe8PNygprzBikrEMyQfgqSmT0vzE515Pz7R8izwB9q/zsH/MA64AKoul3sA6/CzVg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/wasi-threads": "1.0.1", + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/runtime": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.4.0.tgz", + "integrity": "sha512-64WYIf4UYcdLnbKn/umDlNjQDSS8AgZrI/R9+x5ilkUVFxXcA1Ebl+gQLc/6mERA4407Xof0R7wEyEuj091CVw==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/wasi-threads": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.0.1.tgz", + "integrity": "sha512-iIBu7mwkq4UQGeMEM8bLwNK962nXdhodeScX4slfQnRhEMMzvYivHhutCIk8uojvmASXXPC2WNEjwxFWk72Oqw==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.25.1", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.1.tgz", @@ -1537,26 +1502,106 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.11.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.1.tgz", - "integrity": "sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==", + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", "dev": true, "license": "MIT", "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, + "node_modules/@eslint/compat": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@eslint/compat/-/compat-1.2.8.tgz", + "integrity": "sha512-LqCYHdWL/QqKIJuZ/ucMAv8d4luKGs4oCPgpt8mWztQAtPrHfXKQ/XAUc8ljCHAfJCn6SvkpTcGt5Tsh8saowA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "peerDependencies": { + "eslint": "^9.10.0" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/@eslint/config-array": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.19.2.tgz", + "integrity": "sha512-GNKqxfHG2ySmJOBSHg7LxeUx4xpuCoFjacmlCoYWEbaPXLwvfIjixRI12xCQZeULksQb23uiA8F40w5TojpV7w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^2.1.6", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-array/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.2.1.tgz", + "integrity": "sha512-RI17tsD2frtDu/3dmI7QRrD4bedNKPM08ziRYaC5AhkGrzIAJelm9kJU1TznK+apx6V+cqRz8tfpEeG3oIyjxw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/core": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.12.0.tgz", + "integrity": "sha512-cmrR6pytBuSMTaBweKoGMwu3EiHiEC+DoyupPmlZ0HxBJBtIxwe+j/E4XPIKNx+Q74c8lXKPwYawBf5glsTkHg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", + "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", "dev": true, "license": "MIT", "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", + "espree": "^10.0.1", + "globals": "^14.0.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -1564,7 +1609,7 @@ "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -1581,6 +1626,19 @@ "concat-map": "0.0.1" } }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@eslint/eslintrc/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -1595,13 +1653,50 @@ } }, "node_modules/@eslint/js": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", - "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", + "version": "9.23.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.23.0.tgz", + "integrity": "sha512-35MJ8vCPU0ZMxo7zfev2pypqTwWTofFZO6m4KAtdoFhRpLJUpHTZZ+KB3C7Hb1d7bULYwO4lJXGCi5Se+8OMbw==", "dev": true, "license": "MIT", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz", + "integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.8.tgz", + "integrity": "sha512-ZAoA40rNMPwSm+AeHpCq8STiNAwzWLJuP8Xv4CHIc9wv/PSuExjMrmjfYNj682vW0OOiZ1HKxzvjQr9XZIisQA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.13.0", + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit/node_modules/@eslint/core": { + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.13.0.tgz", + "integrity": "sha512-yfkgDw1KR66rkT5A8ci4irzDysN7FRpq3ttJolR88OqQikAWqwA8j5VZyas+vjyBNFIJ7MfybJ9plMILI2UrCw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, "node_modules/@fastify/busboy": { @@ -1613,13 +1708,6 @@ "node": ">=14" } }, - "node_modules/@github/browserslist-config": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@github/browserslist-config/-/browserslist-config-1.0.0.tgz", - "integrity": "sha512-gIhjdJp/c2beaIWWIlsXdqXVRUz3r2BxBCpfz/F3JXHvSAQ1paMYjLH+maEATtENg+k5eLV7gA+9yPp762ieuw==", - "dev": true, - "license": "MIT" - }, "node_modules/@github/local-action": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/@github/local-action/-/local-action-3.1.3.tgz", @@ -1833,44 +1921,42 @@ "dev": true, "license": "ISC" }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", - "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", - "deprecated": "Use @eslint/config-array instead", + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", "dev": true, "license": "Apache-2.0", - "dependencies": { - "@humanwhocodes/object-schema": "^2.0.3", - "debug": "^4.3.1", - "minimatch": "^3.0.5" - }, "engines": { - "node": ">=10.10.0" + "node": ">=18.18.0" } }, - "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "node_modules/@humanfs/node": { + "version": "0.16.6", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", + "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.3.0" + }, + "engines": { + "node": ">=18.18.0" } }, - "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", + "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, + "license": "Apache-2.0", "engines": { - "node": "*" + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" } }, "node_modules/@humanwhocodes/module-importer": { @@ -1887,13 +1973,19 @@ "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", - "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", - "deprecated": "Use @eslint/object-schema instead", + "node_modules/@humanwhocodes/retry": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.2.tgz", + "integrity": "sha512-xeO57FpIu4p1Ri3Jq/EXq4ClRm86dVF2z/+kvFnyqVYRavTZmaFaUBbWCOuuTh0o/g7DSsk6kc2vrS4Vl5oPOQ==", "dev": true, - "license": "BSD-3-Clause" + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } }, "node_modules/@isaacs/cliui": { "version": "8.0.2", @@ -2718,6 +2810,19 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@napi-rs/wasm-runtime": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.8.tgz", + "integrity": "sha512-OBlgKdX7gin7OIq4fadsjpg+cp2ZphvAIKucHsNfTdJiqdOmOEwQd/bHi0VwNrcw5xpBJyUw6cK/QilCqy1BSg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "^1.4.0", + "@emnapi/runtime": "^1.4.0", + "@tybys/wasm-util": "^0.9.0" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -2756,16 +2861,6 @@ "node": ">= 8" } }, - "node_modules/@nolyfill/is-core-module": { - "version": "1.0.39", - "resolved": "https://registry.npmjs.org/@nolyfill/is-core-module/-/is-core-module-1.0.39.tgz", - "integrity": "sha512-nn5ozdjYQpUCZlWGuxcJY/KpxkWQs4DcbMCmKojjyrYDEAGy4Ce19NN4v5MduafTwJlbKc99UA8YhSVqq9yPZA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.4.0" - } - }, "node_modules/@octokit/auth-token": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-4.0.0.tgz", @@ -2827,9 +2922,9 @@ "license": "MIT" }, "node_modules/@octokit/plugin-paginate-rest": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.2.1.tgz", - "integrity": "sha512-wfGhE/TAkXZRLjksFXuDZdmGnJQHvtU/joFQdweXUgzo1XwvBCD4o4+75NtFfjfLK5IwLf9vHTfSiU3sLRYpRw==", + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.2.2.tgz", + "integrity": "sha512-u3KYkGF7GcZnSD/3UP0S7K5XUFT2FkOQdcfXZGZQPGv3lm4F2Xbf71lvjldr8c1H3nNbF+33cLEkWYbokGWqiQ==", "license": "MIT", "dependencies": { "@octokit/types": "^12.6.0" @@ -2925,13 +3020,13 @@ } }, "node_modules/@octokit/request": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.4.0.tgz", - "integrity": "sha512-9Bb014e+m2TgBeEJGEbdplMVWwPmL1FPtggHQRkV+WVsMggPtEkLKPlcVYm/o8xKLkpJ7B+6N8WfQMtDLX2Dpw==", + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.4.1.tgz", + "integrity": "sha512-qnB2+SY3hkCmBxZsR/MPCybNmbJe4KAlfWErXq+rBKkQJlbjdJeS85VI9r8UqeLYLvnAenU8Q1okM/0MBsAGXw==", "license": "MIT", "dependencies": { - "@octokit/endpoint": "^9.0.1", - "@octokit/request-error": "^5.1.0", + "@octokit/endpoint": "^9.0.6", + "@octokit/request-error": "^5.1.1", "@octokit/types": "^13.1.0", "universal-user-agent": "^6.0.0" }, @@ -2940,9 +3035,9 @@ } }, "node_modules/@octokit/request-error": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-5.1.0.tgz", - "integrity": "sha512-GETXfE05J0+7H2STzekpKObFe765O5dlAKUTLNGeH+x47z7JjXHfsHKo5z21D/o/IOZTUEI6nyWyR+bZVP/n5Q==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-5.1.1.tgz", + "integrity": "sha512-v9iyEQJH6ZntoENr9/yXxjuezh4My67CBSu9r6Ve/05Iu5gNgnisNWOsoJHTP6k0Rr0+HQIpnH+kyammu90q/g==", "license": "MIT", "dependencies": { "@octokit/types": "^13.1.0", @@ -3132,9 +3227,9 @@ } }, "node_modules/@pkgr/core": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", - "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.2.0.tgz", + "integrity": "sha512-vsJDAkYR6qCPu+ioGScGiMYR7LvZYIXh/dlQeviqoTWNCVfKTLYD/LkNWH4Mxsv2a5vpIRc77FN5DnmK1eBggQ==", "dev": true, "license": "MIT", "engines": { @@ -3277,9 +3372,9 @@ } }, "node_modules/@rollup/plugin-node-resolve": { - "version": "15.3.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.3.0.tgz", - "integrity": "sha512-9eO5McEICxMzJpDW9OnMYSv4Sta3hmt7VtBFz5zR9273suNOydOyq/FrGeGy+KsTRFm8w0SLVhzig2ILFT63Ag==", + "version": "16.0.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-16.0.1.tgz", + "integrity": "sha512-tk5YCxJWIG81umIvNkSod2qK5KyQW19qcBF/B78n1bjtOON6gzKoVeSzAE8yHCZEDmqkHKkxplExA8KzdJLJpA==", "dev": true, "license": "MIT", "dependencies": { @@ -3581,7 +3676,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3706,6 +3800,17 @@ "dev": true, "license": "MIT" }, + "node_modules/@tybys/wasm-util": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.9.0.tgz", + "integrity": "sha512-6+7nlbMVX/PVDCwaIQ8nTOPveOcFLSt8GcXdx8hD0bt39uWxYT88uXzqTd4fTvqta7oeUJqudepapKNt2DYJFw==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, "node_modules/@types/babel__core": { "version": "7.20.5", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", @@ -3806,6 +3911,13 @@ "pretty-format": "^29.0.0" } }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", @@ -3855,17 +3967,17 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.28.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.28.0.tgz", - "integrity": "sha512-lvFK3TCGAHsItNdWZ/1FkvpzCxTHUVuFrdnOGLMa0GGCFIbCgQWVk3CzCGdA7kM3qGVc+dfW9tr0Z/sHnGDFyg==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.29.0.tgz", + "integrity": "sha512-PAIpk/U7NIS6H7TEtN45SPGLQaHNgB7wSjsQV/8+KYokAb2T/gloOA/Bee2yd4/yKVhPKe5LlaUGhAZk5zmSaQ==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.28.0", - "@typescript-eslint/type-utils": "8.28.0", - "@typescript-eslint/utils": "8.28.0", - "@typescript-eslint/visitor-keys": "8.28.0", + "@typescript-eslint/scope-manager": "8.29.0", + "@typescript-eslint/type-utils": "8.29.0", + "@typescript-eslint/utils": "8.29.0", + "@typescript-eslint/visitor-keys": "8.29.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -3885,16 +3997,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.28.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.28.0.tgz", - "integrity": "sha512-LPcw1yHD3ToaDEoljFEfQ9j2xShY367h7FZ1sq5NJT9I3yj4LHer1Xd1yRSOdYy9BpsrxU7R+eoDokChYM53lQ==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.29.0.tgz", + "integrity": "sha512-8C0+jlNJOwQso2GapCVWWfW/rzaq7Lbme+vGUFKE31djwNncIpgXD7Cd4weEsDdkoZDjH0lwwr3QDQFuyrMg9g==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.28.0", - "@typescript-eslint/types": "8.28.0", - "@typescript-eslint/typescript-estree": "8.28.0", - "@typescript-eslint/visitor-keys": "8.28.0", + "@typescript-eslint/scope-manager": "8.29.0", + "@typescript-eslint/types": "8.29.0", + "@typescript-eslint/typescript-estree": "8.29.0", + "@typescript-eslint/visitor-keys": "8.29.0", "debug": "^4.3.4" }, "engines": { @@ -3910,14 +4022,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.28.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.28.0.tgz", - "integrity": "sha512-u2oITX3BJwzWCapoZ/pXw6BCOl8rJP4Ij/3wPoGvY8XwvXflOzd1kLrDUUUAIEdJSFh+ASwdTHqtan9xSg8buw==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.29.0.tgz", + "integrity": "sha512-aO1PVsq7Gm+tcghabUpzEnVSFMCU4/nYIgC2GOatJcllvWfnhrgW0ZEbnTxm36QsikmCN1K/6ZgM7fok2I7xNw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.28.0", - "@typescript-eslint/visitor-keys": "8.28.0" + "@typescript-eslint/types": "8.29.0", + "@typescript-eslint/visitor-keys": "8.29.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -3928,14 +4040,14 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.28.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.28.0.tgz", - "integrity": "sha512-oRoXu2v0Rsy/VoOGhtWrOKDiIehvI+YNrDk5Oqj40Mwm0Yt01FC/Q7nFqg088d3yAsR1ZcZFVfPCTTFCe/KPwg==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.29.0.tgz", + "integrity": "sha512-ahaWQ42JAOx+NKEf5++WC/ua17q5l+j1GFrbbpVKzFL/tKVc0aYY8rVSYUpUvt2hUP1YBr7mwXzx+E/DfUWI9Q==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.28.0", - "@typescript-eslint/utils": "8.28.0", + "@typescript-eslint/typescript-estree": "8.29.0", + "@typescript-eslint/utils": "8.29.0", "debug": "^4.3.4", "ts-api-utils": "^2.0.1" }, @@ -3952,9 +4064,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.28.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.28.0.tgz", - "integrity": "sha512-bn4WS1bkKEjx7HqiwG2JNB3YJdC1q6Ue7GyGlwPHyt0TnVq6TtD/hiOdTZt71sq0s7UzqBFXD8t8o2e63tXgwA==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.29.0.tgz", + "integrity": "sha512-wcJL/+cOXV+RE3gjCyl/V2G877+2faqvlgtso/ZRbTCnZazh0gXhe+7gbAnfubzN2bNsBtZjDvlh7ero8uIbzg==", "dev": true, "license": "MIT", "engines": { @@ -3966,14 +4078,14 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.28.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.28.0.tgz", - "integrity": "sha512-H74nHEeBGeklctAVUvmDkxB1mk+PAZ9FiOMPFncdqeRBXxk1lWSYraHw8V12b7aa6Sg9HOBNbGdSHobBPuQSuA==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.29.0.tgz", + "integrity": "sha512-yOfen3jE9ISZR/hHpU/bmNvTtBW1NjRbkSFdZOksL1N+ybPEE7UVGMwqvS6CP022Rp00Sb0tdiIkhSCe6NI8ow==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.28.0", - "@typescript-eslint/visitor-keys": "8.28.0", + "@typescript-eslint/types": "8.29.0", + "@typescript-eslint/visitor-keys": "8.29.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -3993,16 +4105,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.28.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.28.0.tgz", - "integrity": "sha512-OELa9hbTYciYITqgurT1u/SzpQVtDLmQMFzy/N8pQE+tefOyCWT79jHsav294aTqV1q1u+VzqDGbuujvRYaeSQ==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.29.0.tgz", + "integrity": "sha512-gX/A0Mz9Bskm8avSWFcK0gP7cZpbY4AIo6B0hWYFCaIsz750oaiWR4Jr2CI+PQhfW1CpcQr9OlfPS+kMFegjXA==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.28.0", - "@typescript-eslint/types": "8.28.0", - "@typescript-eslint/typescript-estree": "8.28.0" + "@typescript-eslint/scope-manager": "8.29.0", + "@typescript-eslint/types": "8.29.0", + "@typescript-eslint/typescript-estree": "8.29.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -4017,13 +4129,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.28.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.28.0.tgz", - "integrity": "sha512-hbn8SZ8w4u2pRwgQ1GlUrPKE+t2XvcCW5tTRF7j6SMYIuYG37XuzIW44JCZPa36evi0Oy2SnM664BlIaAuQcvg==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.29.0.tgz", + "integrity": "sha512-Sne/pVz8ryR03NFK21VpN88dZ2FdQXOlq3VIklbrTYEt8yXtRFr9tvUhqvCeKjqYk5FSim37sHbooT6vzBTZcg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.28.0", + "@typescript-eslint/types": "8.29.0", "eslint-visitor-keys": "^4.2.0" }, "engines": { @@ -4047,13 +4159,219 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/@ungap/structured-clone": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", - "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "node_modules/@unrs/resolver-binding-darwin-arm64": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-arm64/-/resolver-binding-darwin-arm64-1.3.3.tgz", + "integrity": "sha512-EpRILdWr3/xDa/7MoyfO7JuBIJqpBMphtu4+80BK1bRfFcniVT74h3Z7q1+WOc92FuIAYatB1vn9TJR67sORGw==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "ISC" - }, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@unrs/resolver-binding-darwin-x64": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-x64/-/resolver-binding-darwin-x64-1.3.3.tgz", + "integrity": "sha512-ntj/g7lPyqwinMJWZ+DKHBse8HhVxswGTmNgFKJtdgGub3M3zp5BSZ3bvMP+kBT6dnYJLSVlDqdwOq1P8i0+/g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@unrs/resolver-binding-freebsd-x64": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-freebsd-x64/-/resolver-binding-freebsd-x64-1.3.3.tgz", + "integrity": "sha512-l6BT8f2CU821EW7U8hSUK8XPq4bmyTlt9Mn4ERrfjJNoCw0/JoHAh9amZZtV3cwC3bwwIat+GUnrcHTG9+qixw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@unrs/resolver-binding-linux-arm-gnueabihf": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-gnueabihf/-/resolver-binding-linux-arm-gnueabihf-1.3.3.tgz", + "integrity": "sha512-8ScEc5a4y7oE2BonRvzJ+2GSkBaYWyh0/Ko4Q25e/ix6ANpJNhwEPZvCR6GVRmsQAYMIfQvYLdM6YEN+qRjnAQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-arm-musleabihf": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-musleabihf/-/resolver-binding-linux-arm-musleabihf-1.3.3.tgz", + "integrity": "sha512-8qQ6l1VTzLNd3xb2IEXISOKwMGXDCzY/UNy/7SovFW2Sp0K3YbL7Ao7R18v6SQkLqQlhhqSBIFRk+u6+qu5R5A==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-arm64-gnu": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-gnu/-/resolver-binding-linux-arm64-gnu-1.3.3.tgz", + "integrity": "sha512-v81R2wjqcWXJlQY23byqYHt9221h4anQ6wwN64oMD/WAE+FmxPHFZee5bhRkNVtzqO/q7wki33VFWlhiADwUeQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-arm64-musl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-musl/-/resolver-binding-linux-arm64-musl-1.3.3.tgz", + "integrity": "sha512-cAOx/j0u5coMg4oct/BwMzvWJdVciVauUvsd+GQB/1FZYKQZmqPy0EjJzJGbVzFc6gbnfEcSqvQE6gvbGf2N8Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-ppc64-gnu": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-ppc64-gnu/-/resolver-binding-linux-ppc64-gnu-1.3.3.tgz", + "integrity": "sha512-mq2blqwErgDJD4gtFDlTX/HZ7lNP8YCHYFij2gkXPtMzrXxPW1hOtxL6xg4NWxvnj4bppppb0W3s/buvM55yfg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-s390x-gnu": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-s390x-gnu/-/resolver-binding-linux-s390x-gnu-1.3.3.tgz", + "integrity": "sha512-u0VRzfFYysarYHnztj2k2xr+eu9rmgoTUUgCCIT37Nr+j0A05Xk2c3RY8Mh5+DhCl2aYibihnaAEJHeR0UOFIQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-x64-gnu": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-gnu/-/resolver-binding-linux-x64-gnu-1.3.3.tgz", + "integrity": "sha512-OrVo5ZsG29kBF0Ug95a2KidS16PqAMmQNozM6InbquOfW/udouk063e25JVLqIBhHLB2WyBnixOQ19tmeC/hIg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-x64-musl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-musl/-/resolver-binding-linux-x64-musl-1.3.3.tgz", + "integrity": "sha512-PYnmrwZ4HMp9SkrOhqPghY/aoL+Rtd4CQbr93GlrRTjK6kDzfMfgz3UH3jt6elrQAfupa1qyr1uXzeVmoEAxUA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-wasm32-wasi": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-wasm32-wasi/-/resolver-binding-wasm32-wasi-1.3.3.tgz", + "integrity": "sha512-81AnQY6fShmktQw4hWDUIilsKSdvr/acdJ5azAreu2IWNlaJOKphJSsUVWE+yCk6kBMoQyG9ZHCb/krb5K0PEA==", + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@napi-rs/wasm-runtime": "^0.2.7" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@unrs/resolver-binding-win32-arm64-msvc": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-arm64-msvc/-/resolver-binding-win32-arm64-msvc-1.3.3.tgz", + "integrity": "sha512-X/42BMNw7cW6xrB9syuP5RusRnWGoq+IqvJO8IDpp/BZg64J1uuIW6qA/1Cl13Y4LyLXbJVYbYNSKwR/FiHEng==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@unrs/resolver-binding-win32-ia32-msvc": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-ia32-msvc/-/resolver-binding-win32-ia32-msvc-1.3.3.tgz", + "integrity": "sha512-EGNnNGQxMU5aTN7js3ETYvuw882zcO+dsVjs+DwO2j/fRVKth87C8e2GzxW1L3+iWAXMyJhvFBKRavk9Og1Z6A==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@unrs/resolver-binding-win32-x64-msvc": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-x64-msvc/-/resolver-binding-win32-x64-msvc-1.3.3.tgz", + "integrity": "sha512-GraLbYqOJcmW1qY3osB+2YIiD62nVf2/bVLHZmrb4t/YSUwE03l7TwcDJl08T/Tm3SVhepX8RQkpzWbag/Sb4w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/abort-controller": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", @@ -4068,9 +4386,9 @@ } }, "node_modules/acorn": { - "version": "8.12.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", - "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", + "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", "dev": true, "license": "MIT", "bin": { @@ -4282,16 +4600,6 @@ "dev": true, "license": "Python-2.0" }, - "node_modules/aria-query": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.2.tgz", - "integrity": "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">= 0.4" - } - }, "node_modules/array-buffer-byte-length": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", @@ -4419,13 +4727,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/ast-types-flow": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.8.tgz", - "integrity": "sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==", - "dev": true, - "license": "MIT" - }, "node_modules/async": { "version": "3.2.6", "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", @@ -4449,26 +4750,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/axe-core": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.10.0.tgz", - "integrity": "sha512-Mr2ZakwQ7XUAjp7pAwQWRhhK8mQQ6JAaNWSjmjxil0R8BPioMtQsTLOolGYkji1rcL++3dCqZA3zWqpT+9Ew6g==", - "dev": true, - "license": "MPL-2.0", - "engines": { - "node": ">=4" - } - }, - "node_modules/axobject-query": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.1.0.tgz", - "integrity": "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">= 0.4" - } - }, "node_modules/b4a": { "version": "1.6.7", "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.7.tgz", @@ -5001,23 +5282,6 @@ "dev": true, "license": "MIT" }, - "node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true, - "license": "MIT" - }, "node_modules/commander": { "version": "13.1.0", "resolved": "https://registry.npmjs.org/commander/-/commander-13.1.0.tgz", @@ -5214,13 +5478,6 @@ "node": ">= 8" } }, - "node_modules/damerau-levenshtein": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz", - "integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==", - "dev": true, - "license": "BSD-2-Clause" - }, "node_modules/data-view-buffer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", @@ -5276,9 +5533,9 @@ } }, "node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dev": true, "license": "MIT", "dependencies": { @@ -5308,39 +5565,6 @@ } } }, - "node_modules/deep-equal": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.3.tgz", - "integrity": "sha512-ZIwpnevOurS8bpT4192sqAowWM76JDKSHYzMLty3BZGSswgq6pBaH3DhCSW5xVAZICZyKdOBPjwww5wfgT/6PA==", - "dev": true, - "license": "MIT", - "dependencies": { - "array-buffer-byte-length": "^1.0.0", - "call-bind": "^1.0.5", - "es-get-iterator": "^1.1.3", - "get-intrinsic": "^1.2.2", - "is-arguments": "^1.1.1", - "is-array-buffer": "^3.0.2", - "is-date-object": "^1.0.5", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", - "isarray": "^2.0.5", - "object-is": "^1.1.5", - "object-keys": "^1.1.1", - "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.5.1", - "side-channel": "^1.0.4", - "which-boxed-primitive": "^1.0.2", - "which-collection": "^1.0.1", - "which-typed-array": "^1.1.13" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -5430,19 +5654,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/dotenv": { "version": "16.4.5", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", @@ -5506,20 +5717,6 @@ "dev": true, "license": "MIT" }, - "node_modules/enhanced-resolve": { - "version": "5.17.1", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", - "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" - }, - "engines": { - "node": ">=10.13.0" - } - }, "node_modules/error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -5614,53 +5811,6 @@ "node": ">= 0.4" } }, - "node_modules/es-get-iterator": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.3.tgz", - "integrity": "sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.3", - "has-symbols": "^1.0.3", - "is-arguments": "^1.1.1", - "is-map": "^2.0.2", - "is-set": "^2.0.2", - "is-string": "^1.0.7", - "isarray": "^2.0.5", - "stop-iteration-iterator": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es-iterator-helpers": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.1.0.tgz", - "integrity": "sha512-/SurEfycdyssORP/E+bj4sEu1CWw4EmLDsHynHwSXQ7utgbrMRWW195pTrCjFgFCddf/UkYm3oqKPRq5i8bJbw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.3", - "es-errors": "^1.3.0", - "es-set-tostringtag": "^2.0.3", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "globalthis": "^1.0.4", - "has-property-descriptors": "^1.0.2", - "has-proto": "^1.0.3", - "has-symbols": "^1.0.3", - "internal-slot": "^1.0.7", - "iterator.prototype": "^1.1.3", - "safe-array-concat": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/es-object-atoms": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", @@ -5782,66 +5932,70 @@ } }, "node_modules/eslint": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", - "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", - "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", + "version": "9.23.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.23.0.tgz", + "integrity": "sha512-jV7AbNoFPAY1EkFYpLq5bslU9NLNO8xnEeQXwErNibVryjk67wHVmddTBilc5srIttJDBrB0eMHKZBFbSIABCw==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.1", - "@humanwhocodes/config-array": "^0.13.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.19.2", + "@eslint/config-helpers": "^0.2.0", + "@eslint/core": "^0.12.0", + "@eslint/eslintrc": "^3.3.1", + "@eslint/js": "9.23.0", + "@eslint/plugin-kit": "^0.2.7", + "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", + "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", + "cross-spawn": "^7.0.6", "debug": "^4.3.2", - "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", + "eslint-scope": "^8.3.0", + "eslint-visitor-keys": "^4.2.0", + "espree": "^10.3.0", + "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", + "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" + "optionator": "^0.9.3" }, "bin": { "eslint": "bin/eslint.js" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://opencollective.com/eslint" + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } } }, "node_modules/eslint-config-prettier": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", - "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.1.1.tgz", + "integrity": "sha512-4EQQr6wXwS+ZJSzaR5ZCrYgLxqvUjdXctaEtBqHcbkW944B1NQyO4qpdHQbXBONfwxXdkAY81HH4+LUfrg+zPw==", "dev": true, "license": "MIT", "bin": { @@ -5874,26 +6028,24 @@ } }, "node_modules/eslint-import-resolver-typescript": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.3.tgz", - "integrity": "sha512-ud9aw4szY9cCT1EWWdGv1L1XR6hh2PaRWif0j2QjQ0pgTY/69iw+W0Z4qZv5wHahOl8isEr+k/JnyAqNQkLkIA==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-4.3.1.tgz", + "integrity": "sha512-/dR9YMomeBlvfuvX5q0C3Y/2PHC9OCRdT2ijFwdfq/4Bq+4m5/lqstEp9k3P6ocha1pCbhoY9fkwVYLmOqR0VQ==", "dev": true, "license": "ISC", "dependencies": { - "@nolyfill/is-core-module": "1.0.39", - "debug": "^4.3.5", - "enhanced-resolve": "^5.15.0", - "eslint-module-utils": "^2.8.1", - "fast-glob": "^3.3.2", - "get-tsconfig": "^4.7.5", - "is-bun-module": "^1.0.2", - "is-glob": "^4.0.3" + "debug": "^4.4.0", + "get-tsconfig": "^4.10.0", + "is-bun-module": "^2.0.0", + "stable-hash": "^0.0.5", + "tinyglobby": "^0.2.12", + "unrs-resolver": "^1.3.3" }, "engines": { - "node": "^14.18.0 || >=16.0.0" + "node": "^16.17.0 || >=18.6.0" }, "funding": { - "url": "https://opencollective.com/unts/projects/eslint-import-resolver-ts" + "url": "https://opencollective.com/eslint-import-resolver-typescript" }, "peerDependencies": { "eslint": "*", @@ -5937,107 +6089,6 @@ "ms": "^2.1.1" } }, - "node_modules/eslint-plugin-escompat": { - "version": "3.11.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-escompat/-/eslint-plugin-escompat-3.11.3.tgz", - "integrity": "sha512-Gz/eTJzl7fK9SPBkvB3t+xc1iribxRc5Fgu6Z7206b5q1d7kG0t8Drtin8MRY4UgGBg8Zu1HG6RGzR35LCUpLA==", - "dev": true, - "license": "MIT", - "dependencies": { - "browserslist": "^4.23.1" - }, - "peerDependencies": { - "eslint": ">=5.14.1" - } - }, - "node_modules/eslint-plugin-eslint-comments": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-eslint-comments/-/eslint-plugin-eslint-comments-3.2.0.tgz", - "integrity": "sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "escape-string-regexp": "^1.0.5", - "ignore": "^5.0.5" - }, - "engines": { - "node": ">=6.5.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=4.19.1" - } - }, - "node_modules/eslint-plugin-eslint-comments/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/eslint-plugin-filenames": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-filenames/-/eslint-plugin-filenames-1.3.2.tgz", - "integrity": "sha512-tqxJTiEM5a0JmRCUYQmxw23vtTxrb2+a3Q2mMOPhFxvt7ZQQJmdiuMby9B/vUAuVMghyP7oET+nIf6EO6CBd/w==", - "dev": true, - "license": "MIT", - "dependencies": { - "lodash.camelcase": "4.3.0", - "lodash.kebabcase": "4.1.1", - "lodash.snakecase": "4.1.1", - "lodash.upperfirst": "4.3.1" - }, - "peerDependencies": { - "eslint": "*" - } - }, - "node_modules/eslint-plugin-github": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-github/-/eslint-plugin-github-5.0.2.tgz", - "integrity": "sha512-nMdzWJQ5CimjQDY6SFeJ0KIXuNFf0dgDWEd4eP3UWfuTuP/dXcZJDg7MQRvAFt743T1zUi4+/HdOihfu8xJkLA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@github/browserslist-config": "^1.0.0", - "@typescript-eslint/eslint-plugin": "^8.0.0", - "@typescript-eslint/parser": "^8.0.0", - "aria-query": "^5.3.0", - "eslint-config-prettier": ">=8.0.0", - "eslint-plugin-escompat": "^3.3.3", - "eslint-plugin-eslint-comments": "^3.2.0", - "eslint-plugin-filenames": "^1.3.2", - "eslint-plugin-i18n-text": "^1.0.1", - "eslint-plugin-import": "^2.25.2", - "eslint-plugin-jsx-a11y": "^6.7.1", - "eslint-plugin-no-only-tests": "^3.0.0", - "eslint-plugin-prettier": "^5.0.0", - "eslint-rule-documentation": ">=1.0.0", - "jsx-ast-utils": "^3.3.2", - "prettier": "^3.0.0", - "svg-element-attributes": "^1.3.1" - }, - "bin": { - "eslint-ignore-errors": "bin/eslint-ignore-errors.js" - }, - "peerDependencies": { - "eslint": "^8.0.1" - } - }, - "node_modules/eslint-plugin-i18n-text": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-i18n-text/-/eslint-plugin-i18n-text-1.0.1.tgz", - "integrity": "sha512-3G3UetST6rdqhqW9SfcfzNYMpQXS7wNkJvp6dsXnjzGiku6Iu5hl3B0kmk6lIcFPwYjhQIY+tXVRtK9TlGT7RA==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "eslint": ">=5.0.0" - } - }, "node_modules/eslint-plugin-import": { "version": "2.31.0", "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.31.0.tgz", @@ -6191,90 +6242,15 @@ } } }, - "node_modules/eslint-plugin-jsx-a11y": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.10.0.tgz", - "integrity": "sha512-ySOHvXX8eSN6zz8Bywacm7CvGNhUtdjvqfQDVe6020TUK34Cywkw7m0KsCCk1Qtm9G1FayfTN1/7mMYnYO2Bhg==", - "dev": true, - "license": "MIT", - "dependencies": { - "aria-query": "~5.1.3", - "array-includes": "^3.1.8", - "array.prototype.flatmap": "^1.3.2", - "ast-types-flow": "^0.0.8", - "axe-core": "^4.10.0", - "axobject-query": "^4.1.0", - "damerau-levenshtein": "^1.0.8", - "emoji-regex": "^9.2.2", - "es-iterator-helpers": "^1.0.19", - "hasown": "^2.0.2", - "jsx-ast-utils": "^3.3.5", - "language-tags": "^1.0.9", - "minimatch": "^3.1.2", - "object.fromentries": "^2.0.8", - "safe-regex-test": "^1.0.3", - "string.prototype.includes": "^2.0.0" - }, - "engines": { - "node": ">=4.0" - }, - "peerDependencies": { - "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9" - } - }, - "node_modules/eslint-plugin-jsx-a11y/node_modules/aria-query": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.1.3.tgz", - "integrity": "sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "deep-equal": "^2.0.5" - } - }, - "node_modules/eslint-plugin-jsx-a11y/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/eslint-plugin-jsx-a11y/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/eslint-plugin-no-only-tests": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-no-only-tests/-/eslint-plugin-no-only-tests-3.3.0.tgz", - "integrity": "sha512-brcKcxGnISN2CcVhXJ/kEQlNa0MEfGRtwKtWA16SkqXHKitaKIMrfemJKLKX1YqDU5C/5JY3PvZXd5jEW04e0Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=5.0.0" - } - }, "node_modules/eslint-plugin-prettier": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.1.tgz", - "integrity": "sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw==", + "version": "5.2.5", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.5.tgz", + "integrity": "sha512-IKKP8R87pJyMl7WWamLgPkloB16dagPIdd2FjBDbyRYPKo93wS/NbCOPh6gH+ieNLC+XZrhJt/kWj0PS/DFdmg==", "dev": true, "license": "MIT", "dependencies": { "prettier-linter-helpers": "^1.0.0", - "synckit": "^0.9.1" + "synckit": "^0.10.2" }, "engines": { "node": "^14.18.0 || >=16.0.0" @@ -6285,7 +6261,7 @@ "peerDependencies": { "@types/eslint": ">=8.0.0", "eslint": ">=8.0.0", - "eslint-config-prettier": "*", + "eslint-config-prettier": ">= 7.0.0 <10.0.0 || >=10.1.0", "prettier": ">=3.0.0" }, "peerDependenciesMeta": { @@ -6297,20 +6273,10 @@ } } }, - "node_modules/eslint-rule-documentation": { - "version": "1.0.23", - "resolved": "https://registry.npmjs.org/eslint-rule-documentation/-/eslint-rule-documentation-1.0.23.tgz", - "integrity": "sha512-pWReu3fkohwyvztx/oQWWgld2iad25TfUdi6wvhhaDPIQjHU/pyvlKgXFw1kX31SQK2Nq9MH+vRDWB0ZLy8fYw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4.0.0" - } - }, "node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.3.0.tgz", + "integrity": "sha512-pUNxi75F8MJ/GdeKtVLSbYg4ZI34J6C0C7sbL4YOp2exGwen7ZsuBqKzUhXd0qMQ362yET3z+uPwKeg/0C2XCQ==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -6318,7 +6284,7 @@ "estraverse": "^5.2.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -6401,6 +6367,19 @@ "dev": true, "license": "MIT" }, + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/eslint/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -6415,18 +6394,31 @@ } }, "node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", + "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "acorn": "^8.9.0", + "acorn": "^8.14.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" + "eslint-visitor-keys": "^4.2.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -6607,9 +6599,9 @@ "license": "MIT" }, "node_modules/fast-glob": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", "dev": true, "license": "MIT", "dependencies": { @@ -6617,7 +6609,7 @@ "@nodelib/fs.walk": "^1.2.3", "glob-parent": "^5.1.2", "merge2": "^1.3.0", - "micromatch": "^4.0.4" + "micromatch": "^4.0.8" }, "engines": { "node": ">=8.6.0" @@ -6690,9 +6682,9 @@ } }, "node_modules/fdir": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.0.tgz", - "integrity": "sha512-3oB133prH1o4j/L5lLW7uOCF1PlD+/It2L0eL/iAqWMB91RBbqTewABqxhj0ibBd90EEmWZq7ntIWzVaWcXTGQ==", + "version": "6.4.3", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.3.tgz", + "integrity": "sha512-PMXmW2y1hDDfTSRc9gaXIuCCRpuoz3Kaz8cUelp3smouvfT632ozg2vrT6lJsHKKOF59YLbOGfAWGUcKEfRMQw==", "dev": true, "license": "MIT", "peerDependencies": { @@ -6718,16 +6710,16 @@ } }, "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "dev": true, "license": "MIT", "dependencies": { - "flat-cache": "^3.0.4" + "flat-cache": "^4.0.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16.0.0" } }, "node_modules/filelist": { @@ -6784,24 +6776,23 @@ } }, "node_modules/flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "dev": true, "license": "MIT", "dependencies": { "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" + "keyv": "^4.5.4" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16" } }, "node_modules/flatted": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", - "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", "dev": true, "license": "ISC" }, @@ -6988,9 +6979,9 @@ } }, "node_modules/get-tsconfig": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.8.1.tgz", - "integrity": "sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==", + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.10.0.tgz", + "integrity": "sha512-kGzZ3LWWQcGIAmg6iWvXn0ei6WDtV26wzHRMwDSzmAbcXrTEXxHy6IehI6/4eT6VRKyMP1eF1VqwrVUmE/LR7A==", "dev": true, "license": "MIT", "dependencies": { @@ -7060,16 +7051,13 @@ } }, "node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-16.0.0.tgz", + "integrity": "sha512-iInW14XItCXET01CQFqudPOWP2jYMl7T+QRQT+UNcR/iQncN/F0UNpgd76iFkBPgNQb4+X3LV9tLJYzwh+Gl3A==", "dev": true, "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, "engines": { - "node": ">=8" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -7374,23 +7362,6 @@ "node": ">= 0.4" } }, - "node_modules/is-arguments": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", - "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-array-buffer": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", @@ -7413,23 +7384,7 @@ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", "dev": true, - "license": "MIT" - }, - "node_modules/is-async-function": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.0.0.tgz", - "integrity": "sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "license": "MIT" }, "node_modules/is-bigint": { "version": "1.0.4", @@ -7462,13 +7417,13 @@ } }, "node_modules/is-bun-module": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-bun-module/-/is-bun-module-1.2.1.tgz", - "integrity": "sha512-AmidtEM6D6NmUiLOvvU7+IePxjEjOzra2h0pSrsfSAcXwl/83zLLXDByafUJy9k/rKK0pvXMLdwKwGHlX2Ke6Q==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-bun-module/-/is-bun-module-2.0.0.tgz", + "integrity": "sha512-gNCGbnnnnFAUGKeZ9PdbyeGYJqewpmc2aKHUEMO5nQPWU9lOmv7jcmQIv+qHD8fXW6W7qfuCwX4rY9LNRjXrkQ==", "dev": true, "license": "MIT", "dependencies": { - "semver": "^7.6.3" + "semver": "^7.7.1" } }, "node_modules/is-callable": { @@ -7542,19 +7497,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-finalizationregistry": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.0.2.tgz", - "integrity": "sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -7575,22 +7517,6 @@ "node": ">=6" } }, - "node_modules/is-generator-function": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", - "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -7604,19 +7530,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-map": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", - "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-module": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", @@ -7663,16 +7576,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/is-plain-object": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", @@ -7710,19 +7613,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-set": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", - "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-shared-array-buffer": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", @@ -7800,19 +7690,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-weakmap": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", - "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-weakref": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", @@ -7826,23 +7703,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-weakset": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.3.tgz", - "integrity": "sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "get-intrinsic": "^1.2.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/isarray": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", @@ -7928,23 +7788,6 @@ "node": ">=8" } }, - "node_modules/iterator.prototype": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.3.tgz", - "integrity": "sha512-FW5iMbeQ6rBGm/oKgzq2aW4KvAGpxPzYES8N4g4xNXUKpL1mclMvOe+76AcLDTvD+Ze+sOpVhgdAQEKF4L9iGQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-properties": "^1.2.1", - "get-intrinsic": "^1.2.1", - "has-symbols": "^1.0.3", - "reflect.getprototypeof": "^1.0.4", - "set-function-name": "^2.0.1" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/jackspeak": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", @@ -9485,22 +9328,6 @@ "node": ">=6" } }, - "node_modules/jsx-ast-utils": { - "version": "3.3.5", - "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz", - "integrity": "sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "array-includes": "^3.1.6", - "array.prototype.flat": "^1.3.1", - "object.assign": "^4.1.4", - "object.values": "^1.1.6" - }, - "engines": { - "node": ">=4.0" - } - }, "node_modules/jwt-decode": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-3.1.2.tgz", @@ -9528,26 +9355,6 @@ "node": ">=6" } }, - "node_modules/language-subtag-registry": { - "version": "0.3.23", - "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.23.tgz", - "integrity": "sha512-0K65Lea881pHotoGEa5gDlMxt3pctLi2RplBb7Ezh4rRdLEOtgi7n4EwK9lamnUCkKBqaeKRVebTq6BAxSkpXQ==", - "dev": true, - "license": "CC0-1.0" - }, - "node_modules/language-tags": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/language-tags/-/language-tags-1.0.9.tgz", - "integrity": "sha512-MbjN408fEndfiQXbFQ1vnd+1NoLDsnQW41410oQBXiyXDMYH5z505juWa4KUE1LqxRC7DgOgZDbKLxHIwm27hA==", - "dev": true, - "license": "MIT", - "dependencies": { - "language-subtag-registry": "^0.3.20" - }, - "engines": { - "node": ">=0.10" - } - }, "node_modules/lazystream": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.1.tgz", @@ -9655,20 +9462,6 @@ "dev": true, "license": "MIT" }, - "node_modules/lodash.camelcase": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", - "dev": true, - "license": "MIT" - }, - "node_modules/lodash.kebabcase": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz", - "integrity": "sha512-N8XRTIMMqqDgSy4VLKPnJ/+hpGZN+PHQiJnSenYqPaVV/NCqEogTnAdZLQiGKhxX+JCs8waWq2t1XHWKOmlY8g==", - "dev": true, - "license": "MIT" - }, "node_modules/lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -9683,20 +9476,6 @@ "dev": true, "license": "MIT" }, - "node_modules/lodash.snakecase": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", - "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==", - "dev": true, - "license": "MIT" - }, - "node_modules/lodash.upperfirst": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz", - "integrity": "sha512-sReKOYJIJf74dhJONhU4e0/shzi1trVbSWDOhKYE5XV2O+H7Sb2Dihwuc7xWxVl+DgFPyTqIN3zMfT9cq5iWDg==", - "dev": true, - "license": "MIT" - }, "node_modules/lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -9965,23 +9744,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/object-is": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.6.tgz", - "integrity": "sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", @@ -10551,28 +10313,6 @@ "node": ">=10" } }, - "node_modules/reflect.getprototypeof": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.6.tgz", - "integrity": "sha512-fmfw4XgoDke3kdI6h4xcUz1dG8uaiv5q9gcEwLS4Pnth2kxT+GZ7YehS1JTMGBQmtV7Y4GFGbs2re2NqhdozUg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.1", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "globalthis": "^1.0.3", - "which-builtin-type": "^1.1.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/regexp.prototype.flags": { "version": "1.5.3", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.3.tgz", @@ -10694,23 +10434,6 @@ "node": ">=0.10.0" } }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/rollup": { "version": "4.38.0", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.38.0.tgz", @@ -10974,6 +10697,13 @@ "dev": true, "license": "BSD-3-Clause" }, + "node_modules/stable-hash": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/stable-hash/-/stable-hash-0.0.5.tgz", + "integrity": "sha512-+L3ccpzibovGXFK+Ap/f8LOS0ahMrHTf3xu7mMLSpEGU0EO9ucaysSylKo9eRDFNhWve/y275iPmIZ4z39a9iA==", + "dev": true, + "license": "MIT" + }, "node_modules/stack-utils": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", @@ -10997,19 +10727,6 @@ "node": ">=8" } }, - "node_modules/stop-iteration-iterator": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz", - "integrity": "sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "internal-slot": "^1.0.4" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/streamx": { "version": "2.22.0", "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.22.0.tgz", @@ -11093,17 +10810,6 @@ "dev": true, "license": "MIT" }, - "node_modules/string.prototype.includes": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/string.prototype.includes/-/string.prototype.includes-2.0.0.tgz", - "integrity": "sha512-E34CkBgyeqNDcrbU76cDjL5JLcVrtSdYq0MEh/B10r17pRP4ciHLwTgnuLV8Ay6cgEMLkcBkFCKyFZ43YldYzg==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" - } - }, "node_modules/string.prototype.trim": { "version": "1.2.9", "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", @@ -11255,26 +10961,15 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/svg-element-attributes": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/svg-element-attributes/-/svg-element-attributes-1.3.1.tgz", - "integrity": "sha512-Bh05dSOnJBf3miNMqpsormfNtfidA/GxQVakhtn0T4DECWKeXQRQUceYjJ+OxYiiLdGe4Jo9iFV8wICFapFeIA==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/synckit": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.9.2.tgz", - "integrity": "sha512-vrozgXDQwYO72vHjUb/HnFbQx1exDjoKzqx23aXEg2a9VIg2TSFZ8FmeZpTjUCFMYw7mpX4BE2SFu8wI7asYsw==", + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.10.3.tgz", + "integrity": "sha512-R1urvuyiTaWfeCggqEvpDJwAlDVdsT9NM+IP//Tk2x7qHCkSvBk/fwFgw/TLAHzZlrAnnazMcRw0ZD8HlYFTEQ==", "dev": true, "license": "MIT", "dependencies": { - "@pkgr/core": "^0.1.0", - "tslib": "^2.6.2" + "@pkgr/core": "^0.2.0", + "tslib": "^2.8.1" }, "engines": { "node": "^14.18.0 || >=16.0.0" @@ -11283,16 +10978,6 @@ "url": "https://opencollective.com/unts" } }, - "node_modules/tapable": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", - "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/tar-stream": { "version": "3.1.7", "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz", @@ -11354,12 +11039,22 @@ "b4a": "^1.6.4" } }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "node_modules/tinyglobby": { + "version": "0.2.12", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.12.tgz", + "integrity": "sha512-qkf4trmKSIiMTs/E63cxH+ojC2unam7rJ0WrauAzpT3ECNTxGRMlaXxVbfxMUC/w0LaYk6jQ4y/nGR9uBO3tww==", "dev": true, - "license": "MIT" + "license": "MIT", + "dependencies": { + "fdir": "^6.4.3", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } }, "node_modules/tmpl": { "version": "1.0.5", @@ -11368,16 +11063,6 @@ "dev": true, "license": "BSD-3-Clause" }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -11631,19 +11316,6 @@ "node": ">=4" } }, - "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/typed-array-buffer": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", @@ -11776,6 +11448,33 @@ "integrity": "sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ==", "license": "ISC" }, + "node_modules/unrs-resolver": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/unrs-resolver/-/unrs-resolver-1.3.3.tgz", + "integrity": "sha512-PFLAGQzYlyjniXdbmQ3dnGMZJXX5yrl2YS4DLRfR3BhgUsE1zpRIrccp9XMOGRfIHpdFvCn/nr5N1KMVda4x3A==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/JounQin" + }, + "optionalDependencies": { + "@unrs/resolver-binding-darwin-arm64": "1.3.3", + "@unrs/resolver-binding-darwin-x64": "1.3.3", + "@unrs/resolver-binding-freebsd-x64": "1.3.3", + "@unrs/resolver-binding-linux-arm-gnueabihf": "1.3.3", + "@unrs/resolver-binding-linux-arm-musleabihf": "1.3.3", + "@unrs/resolver-binding-linux-arm64-gnu": "1.3.3", + "@unrs/resolver-binding-linux-arm64-musl": "1.3.3", + "@unrs/resolver-binding-linux-ppc64-gnu": "1.3.3", + "@unrs/resolver-binding-linux-s390x-gnu": "1.3.3", + "@unrs/resolver-binding-linux-x64-gnu": "1.3.3", + "@unrs/resolver-binding-linux-x64-musl": "1.3.3", + "@unrs/resolver-binding-wasm32-wasi": "1.3.3", + "@unrs/resolver-binding-win32-arm64-msvc": "1.3.3", + "@unrs/resolver-binding-win32-ia32-msvc": "1.3.3", + "@unrs/resolver-binding-win32-x64-msvc": "1.3.3" + } + }, "node_modules/unzip-stream": { "version": "0.3.4", "resolved": "https://registry.npmjs.org/unzip-stream/-/unzip-stream-0.3.4.tgz", @@ -11941,52 +11640,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/which-builtin-type": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.1.4.tgz", - "integrity": "sha512-bppkmBSsHFmIMSl8BO9TbsyzsvGjVoppt8xUiGzwiu/bhDCGxnpOKCxgqj6GuyHE0mINMDecBFPlOm2hzY084w==", - "dev": true, - "license": "MIT", - "dependencies": { - "function.prototype.name": "^1.1.6", - "has-tostringtag": "^1.0.2", - "is-async-function": "^2.0.0", - "is-date-object": "^1.0.5", - "is-finalizationregistry": "^1.0.2", - "is-generator-function": "^1.0.10", - "is-regex": "^1.1.4", - "is-weakref": "^1.0.2", - "isarray": "^2.0.5", - "which-boxed-primitive": "^1.0.2", - "which-collection": "^1.0.2", - "which-typed-array": "^1.1.15" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-collection": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", - "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-map": "^2.0.3", - "is-set": "^2.0.3", - "is-weakmap": "^2.0.2", - "is-weakset": "^2.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/which-typed-array": { "version": "1.1.15", "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", diff --git a/package.json b/package.json index b73cdd3..d6f2a70 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "coverage": "npx make-coverage-badge --output-path ./badges/coverage.svg", "format:write": "npx prettier --write .", "format:check": "npx prettier --check .", - "lint": "npx eslint . -c .eslintrc.yml", + "lint": "npx eslint . -c eslint.config.mjs", "local-action": "npx @github/local-action . src/main.ts .env", "package": "npx rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript", "test": "NODE_OPTIONS=--experimental-vm-modules NODE_NO_WARNINGS=1 npx jest", @@ -42,22 +42,27 @@ "yaml": "^2.6.0" }, "devDependencies": { + "@eslint/compat": "^1.2.8", + "@eslint/eslintrc": "^3.3.1", + "@eslint/js": "^9.23.0", "@github/local-action": "^3.1.3", "@octokit/types": "^13.6.1", "@octokit/webhooks-types": "^7.6.1", "@rollup/plugin-commonjs": "^28.0.3", "@rollup/plugin-json": "^6.1.0", - "@rollup/plugin-node-resolve": "^15.3.0", + "@rollup/plugin-node-resolve": "^16.0.1", "@rollup/plugin-typescript": "^12.1.2", "@types/jest": "^29.5.14", "@types/node": "^22.13.14", "@typescript-eslint/eslint-plugin": "^8.28.0", "@typescript-eslint/parser": "^8.28.0", - "eslint": "^8.57.1", - "eslint-import-resolver-typescript": "^3.6.3", - "eslint-plugin-github": "^5.0.2", + "eslint": "^9.23.0", + "eslint-config-prettier": "^10.1.1", + "eslint-import-resolver-typescript": "^4.3.1", "eslint-plugin-import": "^2.31.0", "eslint-plugin-jest": "^28.11.0", + "eslint-plugin-prettier": "^5.2.5", + "globals": "^16.0.0", "jest": "^29.7.0", "jest-junit": "^16.0.0", "make-coverage-badge": "^1.2.0", @@ -67,5 +72,8 @@ "ts-jest-resolver": "^2.0.1", "ts-node": "^10.9.2", "typescript": "^5.8.2" + }, + "optionalDependencies": { + "@rollup/rollup-linux-x64-gnu": "*" } } diff --git a/src/actions.ts b/src/actions.ts index d6751cf..2f55d1e 100644 --- a/src/actions.ts +++ b/src/actions.ts @@ -141,66 +141,7 @@ export async function expire(): Promise { } /** - * Adds an administrator to a class. - * - * @param request Class Request - * @param payload Issue Comment Payload - */ -export async function addAdmin( - request: ClassRequest, - payload: IssueCommentEvent -): Promise { - core.info(`Adding Admin to Class Request: #${payload.issue.number}`) - - // Create the authenticated Octokit client. - const token: string = core.getInput('github_token', { required: true }) - const octokit = github.getOctokit(token) - - // Get the user from the comment body. - // Format: .add-admin handle,email - if ( - !payload.comment.body.split(' ')[1] || - !payload.comment.body.split(' ')[1].includes(',') || - payload.comment.body.split(' ')[1].split(',').length !== 2 - ) - throw new Error('Invalid Format! Try `.add-admin handle,email`') - - const user = { - handle: payload.comment.body.split(' ')[1].split(',')[0], - email: payload.comment.body.split(' ')[1].split(',')[1] - } - - // Check if the user is a GitHub/Microsoft employee. - const response: { user: { isEmployee: boolean; email: string } } = - await octokit.graphql( - ` - query($login: String!) { - user(login: $login) { - isEmployee - email - } - } - `, - { login: user.handle } - ) - - // Do not add the admin if they are not a GitHub or Microsoft employee. - if ( - !response.user.isEmployee && - !response.user.email.includes('@microsoft.com') - ) - throw new Error('Admins Must be GitHub/Microsoft Employees') - - await teams.addUser(request, user, 'maintainer') - - // Comment on the issue with the summary. - await issues.complete(request, payload.issue) - - core.info(`Added Admin to Class Request: #${payload.issue.number}`) -} - -/** - * Adds an user to a class. + * Adds a user to a class. * * @param request Class Request * @param payload Issue Comment Payload @@ -240,98 +181,6 @@ export async function addUser( core.info(`Added User to Class Request: #${payload.issue.number}`) } -/** - * Removes an administrator from the class. - * - * @param request Class Request - * @param payload Issue Comment - */ -export async function removeAdmin( - request: ClassRequest, - payload: IssueCommentEvent -): Promise { - core.info(`Removing Admin from Class Request: #${payload.issue.number}`) - - // Create the authenticated Octokit client. - const token: string = core.getInput('github_token', { required: true }) - const octokit = github.getOctokit(token) - - // Get the user from the comment body. - // Format: .remove-admin handle,email - if ( - !payload.comment.body.split(' ')[1] || - !payload.comment.body.split(' ')[1].includes(',') || - payload.comment.body.split(' ')[1].split(',').length !== 2 - ) - throw new Error('Invalid Format! Try `.remove-admin handle,email`') - - const user = { - handle: payload.comment.body.split(' ')[1].split(',')[0], - email: payload.comment.body.split(' ')[1].split(',')[1] - } - - // Check if the user is a GitHub/Microsoft employee. - const response: { user: { isEmployee: boolean; email: string } } = - await octokit.graphql( - ` - query($login: String!) { - user(login: $login) { - isEmployee - email - } - } - `, - { login: user.handle } - ) - - // Get the user's membership state. - const memberState = await users.isOrgMember(user.handle) - - // Remove the user from the organization (if they're not a GitHub or Microsoft - // employee). This will also remove them from the team. - if ( - !response.user.isEmployee && - !response.user.email.includes('@microsoft.com') && - memberState === 'active' - ) - await octokit.rest.orgs.removeMember({ - org: Common.OWNER, - username: user.handle - }) - - // If the membership is still pending, cancel the invitation. - if ( - !response.user.isEmployee && - !response.user.email.includes('@microsoft.com') && - memberState === 'pending' - ) { - // Get the invitation ID. - const invitations = await octokit.paginate( - octokit.rest.orgs.listPendingInvitations, - { - org: Common.OWNER - } - ) - - for (const invitation of invitations) { - if (invitation.login === user.handle) { - // Cancel the invitation. - await octokit.rest.orgs.cancelInvitation({ - org: Common.OWNER, - invitation_id: invitation.id - }) - } - } - } - - // Remove from the team. - await teams.removeUser(request, user) - - await issues.complete(request, payload.issue) - - core.info(`Removed Admin from Class Request: #${payload.issue.number}`) -} - /** * Removes a user from the class. * @@ -349,13 +198,13 @@ export async function removeUser( const octokit = github.getOctokit(token) // Get the user from the comment body. - // Format: .remove-admin handle,email + // Format: .remove-user handle,email if ( !payload.comment.body.split(' ')[1] || !payload.comment.body.split(' ')[1].includes(',') || payload.comment.body.split(' ')[1].split(',').length !== 2 ) - throw new Error('Invalid Format! Try `.remove-admin handle,email`') + throw new Error('Invalid Format! Try `.remove-user handle,email`') const user = { handle: payload.comment.body.split(' ')[1].split(',')[0], @@ -380,11 +229,13 @@ export async function removeUser( const memberState = await users.isOrgMember(user.handle) // Remove the user from the organization (if they're not a GitHub or Microsoft - // employee). This will also remove them from the team. + // employee, and are not in the instructors file). This will also remove them + // from the team. if ( !response.user.isEmployee && !response.user.email.includes('@microsoft.com') && - memberState === 'active' + memberState === 'active' && + !users.isInstructor(user.handle) ) await octokit.rest.orgs.removeMember({ org: Common.OWNER, @@ -395,7 +246,8 @@ export async function removeUser( if ( !response.user.isEmployee && !response.user.email.includes('@microsoft.com') && - memberState === 'pending' + memberState === 'pending' && + !users.isInstructor(user.handle) ) { // Get the invitation ID. const invitations = await octokit.paginate( @@ -416,14 +268,16 @@ export async function removeUser( } } - // Delete the user repository. + // Delete the user repository. This should happen regardless of whether the + // user is an employee or instructor. if (await repos.exists(request, user)) await octokit.rest.repos.delete({ owner: Common.OWNER, repo: repos.generateRepoName(request, user) }) - // Remove from the team. + // Remove from the team. This should happen regardless of whether the user is + // an employee or instructor. await teams.removeUser(request, user) await issues.complete(request, payload.issue) diff --git a/src/enums.ts b/src/enums.ts index b970e8f..f9a53f1 100644 --- a/src/enums.ts +++ b/src/enums.ts @@ -10,12 +10,8 @@ export enum AllowedIssueAction { /** Allowed Action Types (Issue Comment Event) */ export enum AllowedIssueCommentAction { - /** Add an Administrator */ - ADD_ADMIN = 'add-admin', /** Add a User */ ADD_USER = 'add-user', - /** Remove an Administrator */ - REMOVE_ADMIN = 'remove-admin', /** Remove a User */ REMOVE_USER = 'remove-user' } diff --git a/src/events.ts b/src/events.ts index 14ebf88..6b3e929 100644 --- a/src/events.ts +++ b/src/events.ts @@ -29,15 +29,9 @@ export function getAction( } if (name === 'issue_comment' && payload.action === 'created') { - if (payload.comment.body.startsWith('.add-admin')) - return AllowedIssueCommentAction.ADD_ADMIN - if (payload.comment.body.startsWith('.add-user')) return AllowedIssueCommentAction.ADD_USER - if (payload.comment.body.startsWith('.remove-admin')) - return AllowedIssueCommentAction.REMOVE_ADMIN - if (payload.comment.body.startsWith('.remove-user')) return AllowedIssueCommentAction.REMOVE_USER } diff --git a/src/github/issues.ts b/src/github/issues.ts index 9327b46..0b06376 100644 --- a/src/github/issues.ts +++ b/src/github/issues.ts @@ -33,8 +33,6 @@ export function parse( /### Customer Abbreviation[\r\n]+(?[\s\S]*?)(?=###|$)/, startDate: /### Start Date[\r\n]+(?[\s\S]*?)(?=###|$)/, endDate: /### End Date[\r\n]+(?[\s\S]*?)(?=###|$)/, - administrators: - /### Administrators[\r\n]+(?[\s\S]*?)(?=###|$)/, attendees: /### Attendees[\r\n]+(?[\s\S]*?)(?=###|$)/ } @@ -54,11 +52,6 @@ export function parse( .toUpperCase() ?? '', startDate: body.match(regexes.startDate)?.groups?.startDate.trim() ?? '', endDate: body.match(regexes.endDate)?.groups?.endDate.trim() ?? '', - administrators: - body - .match(regexes.administrators) - ?.groups?.administrators.trim() - .toLowerCase() ?? '', attendees: body.match(regexes.attendees)?.groups?.attendees.trim().toLowerCase() ?? '' @@ -89,23 +82,6 @@ export function parse( ? undefined : new Date(Date.parse(results.endDate)) - // Parse the administrators, default to empty array. - const administrators: User[] = results.administrators.includes( - noResponse.toLowerCase() - ) - ? [] - : results.administrators.split(/\n/).map((value: string) => { - if (value.split(/,\s?/).length !== 2) - throw new Error( - `Invalid Administrator: ${value} (must be 'handle,email' format)` - ) - - return { - email: value.split(/,\s?/)[1], - handle: value.split(/,\s?/)[0] - } - }) - // Parse the attendees, default to empty array. const attendees: User[] = results.attendees.includes(noResponse.toLowerCase()) ? [] @@ -128,10 +104,6 @@ export function parse( if (!startDate) throw new Error('Start Date Not Found') if (!endDate) throw new Error('End Date Not Found') - // At least one admin is required, but attendees can be empty - if (administrators.length === 0) - throw new Error('At Least One Administrator Required') - core.info('Creating Class Request') const request: ClassRequest = { action, @@ -139,7 +111,6 @@ export function parse( customerAbbr, startDate, endDate, - administrators, attendees } @@ -207,7 +178,7 @@ export async function close( }) // Remove the user from the organization (if they're not a GitHub or - // Microsoft employee). + // Microsoft employee and are not in the instructors list). const response = (await octokit.graphql( ` query($login: String!) { @@ -223,12 +194,14 @@ export async function close( // Get the user's membership state. const memberState = await users.isOrgMember(user.handle) - // Remove the user from the organization (if they're not a GitHub or Microsoft - // employee). This will also remove them from the team. + // Remove the user from the organization (if they're not a GitHub or + // Microsoft employee and are not in the instructor list). This will also + // remove them from the team. if ( !response.user.isEmployee && !response.user.email.includes('@microsoft.com') && - memberState === 'active' + memberState === 'active' && + !users.isInstructor(user.handle) ) await octokit.rest.orgs.removeMember({ org: Common.OWNER, @@ -239,7 +212,8 @@ export async function close( if ( !response.user.isEmployee && !response.user.email.includes('@microsoft.com') && - memberState === 'pending' + memberState === 'pending' && + !users.isInstructor(user.handle) ) { // Get the invitation ID. const invitations = await octokit.paginate( @@ -291,16 +265,7 @@ export async function close( * @returns Comment Body */ export function generateMessage(request: ClassRequest): string { - // New class creation - if (request.action === AllowedIssueCommentAction.ADD_ADMIN) { - const payload = github.context.payload as IssueCommentEvent - const user = { - handle: payload.comment.body.split(' ')[1].split(',')[0], - email: payload.comment.body.split(' ')[1].split(',')[1] - } - - return `The following admin has been added: ${user.handle}` - } else if (request.action === AllowedIssueCommentAction.ADD_USER) { + if (request.action === AllowedIssueCommentAction.ADD_USER) { const payload = github.context.payload as IssueCommentEvent const user = { handle: payload.comment.body.split(' ')[1].split(',')[0], @@ -336,20 +301,10 @@ export function generateMessage(request: ClassRequest): string { | Command | Description | |--------------------------------|---------------------------------| | \`.add-user handle,email\` | Add a user to the class. | - | \`.add-admin handle,email\` | Add an admin to the class. | | \`.remove-user handle,email\` | Remove a user from the class. | - | \`.remove-admin handle,email\` | Remove an admin from the class. | `) } else if (request.action === AllowedIssueAction.EXPIRE) { return 'It looks like this request has expired. Access has been revoked for all attendees!' - } else if (request.action === AllowedIssueCommentAction.REMOVE_ADMIN) { - const payload = github.context.payload as IssueCommentEvent - const user = { - handle: payload.comment.body.split(' ')[1].split(',')[0], - email: payload.comment.body.split(' ')[1].split(',')[1] - } - - return `The following admin has been removed: ${user.handle}` } else if (request.action === AllowedIssueCommentAction.REMOVE_USER) { const payload = github.context.payload as IssueCommentEvent const user = { diff --git a/src/github/repos.ts b/src/github/repos.ts index f970df4..4d2d8dc 100644 --- a/src/github/repos.ts +++ b/src/github/repos.ts @@ -21,6 +21,7 @@ export function generateRepoName(request: ClassRequest, user: User): string { * Creates a repository for an attendee. * * @param request Class Request + * @param user User * @param team Team * @returns Repository Name */ @@ -569,13 +570,7 @@ export async function configureLab11( ): Promise { core.info('Configuring Lab 11: Deploy to an Environment') - // // Commit the updates. - // core.info('Committing Changes') - // await exec.exec('git', ['add', '.'], options) - // await exec.exec('git', ['commit', '-m', 'Initial configuration'], options) - - // core.info('Pushing changes') - // await exec.exec('git', ['push'], options) + // Nothing needs to be done... core.info('Configured Lab 11: Deploy to an Environment') } diff --git a/src/github/teams.ts b/src/github/teams.ts index 8f14d92..240ada7 100644 --- a/src/github/teams.ts +++ b/src/github/teams.ts @@ -77,14 +77,11 @@ export async function create(request: ClassRequest): Promise { // Create the team. Add the class administrators as maintainers. const response = await octokit.rest.teams.create({ org: Common.OWNER, - name: generateTeamName(request), - maintainers: request.administrators.map((user) => { - return user.handle - }) + name: generateTeamName(request) }) // Add the users to the team. - for (const user of request.attendees) await addUser(request, user, 'member') + for (const user of request.attendees) await addUser(request, user) core.info(`Created Class Team: ${generateTeamName(request)}`) return { slug: response.data.slug, id: response.data.id } @@ -99,8 +96,7 @@ export async function create(request: ClassRequest): Promise { */ export async function addUser( request: ClassRequest, - user: User, - role: 'member' | 'maintainer' = 'member' + user: User ): Promise { core.info(`Adding User to Class Team: ${user.handle}`) @@ -113,14 +109,14 @@ export async function addUser( org: Common.OWNER, team_slug: generateTeamName(request), username: user.handle, - role + role: 'member' }) core.info(`Added User to Class Team: ${user.handle}`) } /** - * Removes a member to the team. + * Removes a member from the team. * * @param request Class Request * @param user User to Remove diff --git a/src/github/users.ts b/src/github/users.ts index 43a444a..0302ed6 100644 --- a/src/github/users.ts +++ b/src/github/users.ts @@ -1,5 +1,8 @@ import * as core from '@actions/core' import * as github from '@actions/github' +import fs from 'fs' +import path from 'path' +import yaml from 'yaml' import { Common } from '../enums.js' import type { ClassRequest } from '../types.js' import * as teams from './teams.js' @@ -66,11 +69,12 @@ export async function removeUsers(request: ClassRequest): Promise { ) // Remove the user from the organization (if they're not a GitHub or - // Microsoft employee). + // Microsoft employee and are not in the instructors list). if ( !response.user.isEmployee && !response.user.email.includes('@microsoft.com') && - (await isOrgMember(member.handle)) + (await isOrgMember(member.handle)) && + !isInstructor(member.handle) ) await octokit.rest.orgs.removeMember({ org: Common.OWNER, @@ -80,3 +84,20 @@ export async function removeUsers(request: ClassRequest): Promise { core.info(`Removed Users from the Organization: ${Common.OWNER}`) } + +/** + * Checks if the user is an instructor. + * + * @param handle User Handle + * @returns True if the user is in the instructors list, false otherwise. + */ +export function isInstructor(handle: string): boolean { + return yaml + .parse( + fs.readFileSync( + path.resolve(process.env.GITHUB_WORKSPACE!, 'instructors.yml'), + 'utf8' + ) + ) + .instructors.some((instructor: string) => instructor === handle) +} diff --git a/src/main.ts b/src/main.ts index 6f172ac..24c0710 100644 --- a/src/main.ts +++ b/src/main.ts @@ -57,12 +57,8 @@ export async function run(): Promise { await actions.create(request, payload.issue) else if (action === AllowedIssueAction.CLOSE) await actions.close(request, payload.issue) - else if (action === AllowedIssueCommentAction.ADD_ADMIN) - await actions.addAdmin(request, payload as IssueCommentEvent) else if (action === AllowedIssueCommentAction.ADD_USER) await actions.addUser(request, payload as IssueCommentEvent) - else if (action === AllowedIssueCommentAction.REMOVE_ADMIN) - await actions.removeAdmin(request, payload as IssueCommentEvent) else if (action === AllowedIssueCommentAction.REMOVE_USER) await actions.removeUser(request, payload as IssueCommentEvent) } catch (error: any) { diff --git a/src/types.ts b/src/types.ts index a7fe2c5..1ed6225 100644 --- a/src/types.ts +++ b/src/types.ts @@ -12,8 +12,6 @@ export type ClassRequest = { startDate: Date /** End Date */ endDate: Date - /** Administrators */ - administrators: User[] /** Attendees */ attendees: User[] /** Team */ diff --git a/tsconfig.base.json b/tsconfig.base.json index 78fda2f..588b02e 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -2,7 +2,7 @@ "$schema": "https://json.schemastore.org/tsconfig", "compilerOptions": { "allowSyntheticDefaultImports": true, - "declaration": true, + "declaration": false, "declarationMap": false, "esModuleInterop": true, "forceConsistentCasingInFileNames": true, diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json index 1077f59..aab70c6 100644 --- a/tsconfig.eslint.json +++ b/tsconfig.eslint.json @@ -2,6 +2,7 @@ "$schema": "https://json.schemastore.org/tsconfig", "extends": "./tsconfig.base.json", "compilerOptions": { + "allowJs": true, "noEmit": true }, "exclude": ["dist", "node_modules"], @@ -10,6 +11,7 @@ "__mocks__", "__tests__", "src", + "eslint.config.mjs", "jest.config.ts", "rollup.config.ts" ] diff --git a/tsconfig.json b/tsconfig.json index 91326d0..099737b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -13,6 +13,7 @@ "coverage", "dist", "node_modules", + "eslint.config.mjs", "jest.config.ts", "rollup.config.ts" ],