-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: aeria cli automatic codegen for aeria-sdk
- Loading branch information
1 parent
d8e11dd
commit a15a3a4
Showing
10 changed files
with
123 additions
and
33 deletions.
There are no files selected for viewing
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,19 @@ | ||
import { compileAndSpawn } from './watch.js' | ||
|
||
const result = compileAndSpawn() | ||
|
||
process.on('SIGTERM', async () => { | ||
const proc = await result | ||
if( !proc ) { | ||
process.exit(1) | ||
} | ||
|
||
if( proc.exitCode !== null ) { | ||
process.exit(1) | ||
} | ||
|
||
proc.kill() | ||
proc.on('exit', () => { | ||
process.exit(0) | ||
}) | ||
}) |
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 |
---|---|---|
@@ -1,14 +1,9 @@ | ||
import path from 'path' | ||
import { mirror } from './mirror.js' | ||
import { mirrorRemotely } from './mirror.js' | ||
import { getConfig } from './utils.js' | ||
|
||
const main = async () => { | ||
const { aeriaSdk } = require(path.join(process.cwd(), 'package.json')) | ||
if( typeof aeriaSdk !== 'object' || !aeriaSdk ) { | ||
console.log('aeriaSdk is absent in package.json') | ||
return | ||
} | ||
|
||
mirror(aeriaSdk) | ||
const config = await getConfig() | ||
mirrorRemotely(config) | ||
} | ||
|
||
main() |
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
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