Skip to content

Commit

Permalink
feat: convert to esm
Browse files Browse the repository at this point in the history
feat: convert to esm
  • Loading branch information
wdavidw committed Dec 18, 2023
1 parent 3cb1854 commit 9ab7a34
Show file tree
Hide file tree
Showing 1,091 changed files with 13,648 additions and 11,919 deletions.
5 changes: 2 additions & 3 deletions extra/lxd-runner/lib/actions/delete.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Generated by CoffeeScript 2.7.0
module.exports = function({config}) {
return this.lxc.delete({
export default async function({config}) {
await this.lxc.delete({
$header: 'Container delete',
container: `${config.container}`,
force: config.force
Expand Down
5 changes: 2 additions & 3 deletions extra/lxd-runner/lib/actions/enter.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
// Generated by CoffeeScript 2.7.0
module.exports = function({config}) {
export default async function({config}) {
// Note, using `lxc shell` would be nice but `cwd` doesn't seem right
// `lxc shell --cwd /nikita/packages/$pkg` then `pwd` return `/root`
// `lxc shell --cwd /nikita/packages/$pkg -- pkg` prints:
// `pwd: ignoring non-option arguments`
// `/nikita/packages/$pkg`
return this.execute({
await this.execute({
$header: 'Container enter',
command: `lxc exec --cwd ${config.cwd} ${config.container} -- bash`,
stdio: ['inherit', 'inherit', 'inherit'],
Expand Down
5 changes: 2 additions & 3 deletions extra/lxd-runner/lib/actions/exec.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
// Generated by CoffeeScript 2.7.0
module.exports = function({config}) {
export default async function({config}) {
// Note, using `lxc shell` would be nice but `cwd` doesn't seem right
// `lxc shell --cwd /nikita/packages/$pkg` then `pwd` return `/root`
// `lxc shell --cwd /nikita/packages/$pkg -- pkg` prints:
// `pwd: ignoring non-option arguments`
// `/nikita/packages/$pkg`
return this.execute({
await this.execute({
$header: 'Container exec',
command: `lxc exec --cwd ${config.cwd} ${config.container} -- ${config.cmd}`,
stdio: ['inherit', 'inherit', 'inherit'],
Expand Down
9 changes: 0 additions & 9 deletions extra/lxd-runner/lib/actions/info.js

This file was deleted.

9 changes: 4 additions & 5 deletions extra/lxd-runner/lib/actions/run.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Generated by CoffeeScript 2.7.0
module.exports = async function({config}) {
await this.call('@nikitajs/lxd-runner/lib/actions/start', config);
await this.call('@nikitajs/lxd-runner/lib/actions/test', config);
return (await this.call('@nikitajs/lxd-runner/lib/actions/stop', config));
export default async function({config}) {
await this.call('@nikitajs/lxd-runner/start', config);
await this.call('@nikitajs/lxd-runner/test', config);
await this.call('@nikitajs/lxd-runner/stop', config);
};
5 changes: 2 additions & 3 deletions extra/lxd-runner/lib/actions/start.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Generated by CoffeeScript 2.7.0
module.exports = function({config}) {
return this.lxc.cluster({
export default async function({config}) {
await this.lxc.cluster({
$header: 'Container start'
}, config.cluster);
};
9 changes: 4 additions & 5 deletions extra/lxd-runner/lib/actions/state.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// Generated by CoffeeScript 2.7.0
module.exports = async function({config, ...args}) {
({config} = (await this.lxc.state({
export default async function({config}) {
const {config: state} = await this.lxc.state({
$header: 'Container state',
container: `${config.container}`
})));
return process.stdout.write(JSON.stringify(config, null, 2));
});
process.stdout.write(JSON.stringify(state, null, 2));
};
5 changes: 2 additions & 3 deletions extra/lxd-runner/lib/actions/stop.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Generated by CoffeeScript 2.7.0
module.exports = function({config}) {
return this.lxc.stop({
export default async function({config}) {
await this.lxc.stop({
$header: 'Container stop',
container: `${config.container}`
});
Expand Down
5 changes: 2 additions & 3 deletions extra/lxd-runner/lib/actions/test.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
// Generated by CoffeeScript 2.7.0
module.exports = function({config}) {
export default async function({config}) {
// @lxc.exec
// container: "#{config.container}"
// cwd: "#{config.cwd}"
// command: 'npm run test:local'
// shell: 'bash -l'
return this.execute({
await this.execute({
stdout: process.stdout,
env: process.env,
command: [
Expand Down
Loading

0 comments on commit 9ab7a34

Please sign in to comment.