-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
74 additions
and
105 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { fileURLToPath } from 'url' | ||
|
||
const HANDLER_MAIN_PATH = fileURLToPath( | ||
new URL('./handler/main.js', import.meta.url), | ||
) | ||
|
||
export const launch = function ({ shell }) { | ||
return { | ||
spawn: ['node', HANDLER_MAIN_PATH], | ||
versions: SHELL_VERSIONS[shell], | ||
} | ||
} | ||
|
||
const SHELL_VERSIONS = { | ||
none: {}, | ||
sh: {}, | ||
bash: { Bash: ['bash', '-c', 'echo $BASH_VERSION'] }, | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
export { launch } from './launch/main.js' | ||
import { shellDefinition } from './shell.js' | ||
|
||
export { launch } from './launch.js' | ||
|
||
export const config = [shellDefinition] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { | ||
validateDefinedString, | ||
validateEnum, | ||
} from '../../config/normalize/validate.js' | ||
|
||
// We only allow shells that are cross-platform | ||
const SHELL_VALUES = new Set(['none', 'sh', 'bash']) | ||
// Shells have a performance impact and are less portable, so they are opt-in | ||
const DEFAULT_SHELL = 'none' | ||
|
||
export const shellDefinition = { | ||
name: 'shell', | ||
default: DEFAULT_SHELL, | ||
validate(value) { | ||
validateDefinedString(value) | ||
validateEnum(value, SHELL_VALUES) | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,5 @@ | ||
import { normalizeNumberString } from '../../config/normalize/transform.js' | ||
import { validateNumberString } from '../../config/normalize/validate.js' | ||
|
||
import { transformVersion, validateVersion } from './version.js' | ||
import { versionDefinitions } from './version.js' | ||
|
||
export { launch } from './launch.js' | ||
|
||
export const config = [ | ||
{ | ||
name: 'version', | ||
validate: validateNumberString, | ||
transform: normalizeNumberString, | ||
}, | ||
{ | ||
name: 'version', | ||
validate: validateVersion, | ||
transform: transformVersion, | ||
}, | ||
] | ||
export const config = [...versionDefinitions] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.