Convert back to CJS and use ncc.

This commit is contained in:
Fabio Niephaus
2025-02-12 20:42:16 +01:00
committed by Fabio Niephaus
parent f07b5bfaef
commit 0f761465f7
25 changed files with 134415 additions and 123756 deletions

View File

@@ -25,10 +25,10 @@
*/
import * as core from '@actions/core'
import * as constants from './constants.js'
import { save } from './features/cache.js'
import { generateReports } from './features/reports.js'
import { processSBOM } from './features/sbom.js'
import * as constants from './constants'
import { save } from './features/cache'
import { generateReports } from './features/reports'
import { processSBOM } from './features/sbom'
/**
* Check given input and run a save process for the specified package manager

View File

@@ -1,6 +1,6 @@
import * as core from '@actions/core'
import { GRAALVM_PLATFORM } from './constants.js'
import { exec } from './utils.js'
import { GRAALVM_PLATFORM } from './constants'
import { exec } from './utils'
const APT_GET_INSTALL_BASE = 'sudo apt-get -y --no-upgrade install'
const COMPONENT_TO_DEPS = new Map<string, Map<string, string>>([

View File

@@ -1,7 +1,7 @@
import * as c from '../constants.js'
import * as c from '../constants'
import * as core from '@actions/core'
import * as tc from '@actions/tool-cache'
import { exec } from '../utils.js'
import { exec } from '../utils'
import { join } from 'path'
const MUSL_NAME = 'x86_64-linux-musl-native'

View File

@@ -1,4 +1,4 @@
import * as c from '../constants.js'
import * as c from '../constants'
import * as core from '@actions/core'
import * as fs from 'fs'
import * as github from '@actions/github'
@@ -11,7 +11,7 @@ import {
updatePRComment,
tmpfile,
setNativeImageOption
} from '../utils.js'
} from '../utils'
const BUILD_OUTPUT_JSON_PATH = tmpfile('native-image-build-output.json')
const BYTES_TO_KiB = 1024

View File

@@ -1,11 +1,11 @@
import * as c from '../constants.js'
import * as c from '../constants'
import * as core from '@actions/core'
import * as fs from 'fs'
import * as github from '@actions/github'
import * as glob from '@actions/glob'
import { basename } from 'path'
import * as semver from 'semver'
import { setNativeImageOption } from '../utils.js'
import { setNativeImageOption } from '../utils'
const INPUT_NI_SBOM = 'native-image-enable-sbom'
const SBOM_FILE_SUFFIX = '.sbom.json'

View File

@@ -1,4 +1,4 @@
import * as c from './constants.js'
import * as c from './constants'
import * as core from '@actions/core'
import * as fs from 'fs'
import * as httpClient from '@actions/http-client'
@@ -8,8 +8,8 @@ import * as stream from 'stream'
import * as util from 'util'
import * as semver from 'semver'
import { IncomingHttpHeaders, OutgoingHttpHeaders } from 'http'
import { RetryHelper } from '@actions/tool-cache/lib/retry-helper.js'
import { calculateSHA256 } from './utils.js'
import { RetryHelper } from '@actions/tool-cache/lib/retry-helper'
import { calculateSHA256 } from './utils'
import { ok } from 'assert'
import { v4 as uuidv4 } from 'uuid'

View File

@@ -1,4 +1,4 @@
import * as c from './constants.js'
import * as c from './constants'
import * as core from '@actions/core'
import * as semver from 'semver'
import {
@@ -8,8 +8,8 @@ import {
getLatestRelease,
getMatchingTags,
getTaggedRelease
} from './utils.js'
import { downloadGraalVM, downloadGraalVMEELegacy } from './gds.js'
} from './utils'
import { downloadGraalVM, downloadGraalVMEELegacy } from './gds'
import { downloadTool } from '@actions/tool-cache'
import { basename } from 'path'

View File

@@ -1,8 +1,8 @@
import * as c from './constants.js'
import * as c from './constants'
import * as core from '@actions/core'
import * as semver from 'semver'
import { GRAALVM_PLATFORM } from './constants.js'
import { exec } from './utils.js'
import { GRAALVM_PLATFORM } from './constants'
import { exec } from './utils'
import { join } from 'path'
const BASE_FLAGS = ['--non-interactive', 'install', '--no-progress']

View File

@@ -1,6 +1,6 @@
import * as c from './constants.js'
import * as c from './constants'
import * as semver from 'semver'
import { downloadExtractAndCacheJDK, getTaggedRelease, getMatchingTags } from './utils.js'
import { downloadExtractAndCacheJDK, getTaggedRelease, getMatchingTags } from './utils'
import { downloadTool } from '@actions/tool-cache'
import { spawnSync } from 'child_process'

View File

@@ -1,20 +1,20 @@
import * as c from './constants.js'
import * as c from './constants'
import * as core from '@actions/core'
import * as graalvm from './graalvm.js'
import * as graalvm from './graalvm'
import * as semver from 'semver'
import { isFeatureAvailable as isCacheAvailable } from '@actions/cache'
import { basename, join } from 'path'
import { restore } from './features/cache.js'
import { setUpDependencies } from './dependencies.js'
import { setUpGUComponents } from './gu.js'
import { setUpMandrel } from './mandrel.js'
import { setUpLiberica } from './liberica.js'
import { checkForUpdates } from './features/check-for-updates.js'
import { setUpNativeImageMusl } from './features/musl.js'
import { setUpWindowsEnvironment } from './msvc.js'
import { setUpNativeImageBuildReports } from './features/reports.js'
import { restore } from './features/cache'
import { setUpDependencies } from './dependencies'
import { setUpGUComponents } from './gu'
import { setUpMandrel } from './mandrel'
import { setUpLiberica } from './liberica'
import { checkForUpdates } from './features/check-for-updates'
import { setUpNativeImageMusl } from './features/musl'
import { setUpWindowsEnvironment } from './msvc'
import { setUpNativeImageBuildReports } from './features/reports'
import { exec } from '@actions/exec'
import { setUpSBOMSupport } from './features/sbom.js'
import { setUpSBOMSupport } from './features/sbom'
async function run(): Promise<void> {
try {

View File

@@ -1,6 +1,6 @@
import * as c from './constants.js'
import * as c from './constants'
import * as httpClient from '@actions/http-client'
import { downloadExtractAndCacheJDK } from './utils.js'
import { downloadExtractAndCacheJDK } from './utils'
import { downloadTool } from '@actions/tool-cache'
import { basename } from 'path'

View File

@@ -1,7 +1,7 @@
import * as core from '@actions/core'
import { execSync } from 'child_process'
import { existsSync } from 'fs'
import { VERSION_DEV } from './constants.js'
import { VERSION_DEV } from './constants'
// Keep in sync with https://github.com/actions/virtual-environments
const KNOWN_VISUAL_STUDIO_INSTALLATIONS = [

View File

@@ -1,4 +1,4 @@
import * as c from './constants.js'
import * as c from './constants'
import * as core from '@actions/core'
import * as github from '@actions/github'
import * as httpClient from '@actions/http-client'