Skip to content

Commit

Permalink
build: update got to 14.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
piquark6046 committed Nov 30, 2023
1 parent 17e8d69 commit e5aea30
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 22 deletions.
14 changes: 7 additions & 7 deletions index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import * as Commander from 'commander'
import type * as Types from './sources/types'
import {ExportArgs, IsDebug} from './sources/debug'
import {ReplaceStringWithBooleanInObject} from './sources/utility'
import {GetLatestWorkflowTime} from './sources/actions'
import {ListBranches} from './sources/branches'
import {GetChangedFilesFromSHAToHead, GetCommitSHAFromLatestWorkflowTime} from './sources/commits'
import {PurgeRequestManager} from './sources/requests'
import type * as Types from './sources/types.js'
import {ExportArgs, IsDebug} from './sources/debug.js'
import {ReplaceStringWithBooleanInObject} from './sources/utility.js'
import {GetLatestWorkflowTime} from './sources/actions.js'
import {ListBranches} from './sources/branches.js'
import {GetChangedFilesFromSHAToHead, GetCommitSHAFromLatestWorkflowTime} from './sources/commits.js'
import {PurgeRequestManager} from './sources/requests.js'

const Program = new Commander.Command()

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@types/node": "^20.9.4",
"check-disk-space": "^3.4.0",
"commander": "^11.1.0",
"got": "^12.6.1",
"got": "^14.0.0",
"luxon": "^3.4.4",
"p-queue": "^7.4.1",
"simple-git": "^3.21.0",
Expand Down
2 changes: 1 addition & 1 deletion sources/actions.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as GitHub from '@octokit/rest'
import {DateTime} from 'luxon'
import type {ProgramOptionsType} from './types'
import type {ProgramOptionsType} from './types.js'

/**
* @name GetLatestWorkflowTime
Expand Down
4 changes: 2 additions & 2 deletions sources/branches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import * as Git from 'simple-git'
import * as GitHub from '@octokit/rest'
import * as Actions from '@actions/core'
import * as Os from 'node:os'
import type * as Types from './types'
import {IsDebug} from './debug'
import type * as Types from './types.js'
import {IsDebug} from './debug.js'

function CreateGitHubInstance(ProgramOptions: Types.ProgramOptionsType): GitHub.Octokit {
const GitHubInstance = new GitHub.Octokit({auth: ProgramOptions.ghToken})
Expand Down
2 changes: 1 addition & 1 deletion sources/commits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as Git from 'simple-git'
import * as GitHub from '@octokit/rest'
import * as Os from 'node:os'
import {DateTime} from 'luxon'
import type * as Types from './types'
import type * as Types from './types.js'

function CreateGitHubInstance(ProgramOptions: Types.ProgramOptionsType): GitHub.Octokit {
const GitHubInstance = new GitHub.Octokit({auth: ProgramOptions.ghToken})
Expand Down
2 changes: 1 addition & 1 deletion sources/debug.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as Actions from '@actions/core'
import type * as Types from './types'
import type * as Types from './types.js'

export function IsDebug(Args: Types.ProgramOptionsType | Types.ProgramOptionsRawType) {
const ArgsDebug = typeof Args.debug === 'string' ? Args.debug === 'true' : Args.debug
Expand Down
12 changes: 6 additions & 6 deletions sources/requests.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import * as Got from 'got'
import got from 'got'
import * as Actions from '@actions/core'
import * as Os from 'node:os'
import PQueue from 'p-queue'
import {IsDebug} from './debug'
import * as Utility from './utility'
import type * as Types from './types'
import {IsDebug} from './debug.js'
import * as Utility from './utility.js'
import type * as Types from './types.js'

async function GetCDNResponse(ProgramOptions: Types.ProgramOptionsType, ID: string): Promise<Types.CDNStatusResponseType> {
const ResponseRaw: Types.CDNStatusResponseType = await Got.got(`https://purge.jsdelivr.net/status/${ID}`, {
const ResponseRaw: Types.CDNStatusResponseType = await got(`https://purge.jsdelivr.net/status/${ID}`, {
https: {
minVersion: 'TLSv1.3',
ciphers: 'TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256',
Expand All @@ -22,7 +22,7 @@ async function GetCDNResponse(ProgramOptions: Types.ProgramOptionsType, ID: stri
}

async function PostPurgeRequest(ProgramOptions: Types.ProgramOptionsType, BranchOrTag: string[], Filenames: string[]): Promise<Types.CDNPostResponseType> {
const ResponseRaw: Types.CDNPostResponseType = await Got.got.post('https://purge.jsdelivr.net/', {
const ResponseRaw: Types.CDNPostResponseType = await got.post('https://purge.jsdelivr.net/', {
headers: {
'cache-control': 'no-cache',
},
Expand Down
5 changes: 2 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
{
"compilerOptions": {
"outDir": "dist",
"module": "ES2022",
"module": "NodeNext",
"target": "ES2022",
"moduleResolution": "node",
"moduleResolution": "NodeNext",
"removeComments": true,
"alwaysStrict": true,
"skipLibCheck": true
},
"include": [
"index.ts",
"calc-repo-size/**/*.ts",
"sources/**/*.ts"
]
}

0 comments on commit e5aea30

Please sign in to comment.