Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
Falcon
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Walter Huang
Falcon
Commits
e98719b8
Commit
e98719b8
authored
Jun 27, 2025
by
Lin Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: execute the command line
parent
e93da218
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
2 deletions
+44
-2
index.ts
index.ts
+44
-2
No files found.
index.ts
View file @
e98719b8
console
.
log
(
'Hello world!'
)
\ No newline at end of file
import
{
spawn
}
from
"bun"
;
// 任务执行入口,自动设置 SLACK_WEBHOOK 并依次运行 gsheet、gsheet:ai 和 notify-slack
async
function
main
()
{
const
env
=
{
...
process
.
env
};
// 运行 bun run task:gsheet
await
spawn
({
cmd
:
[
"bun"
,
"run"
,
"task:gsheet"
],
env
,
stdout
:
"inherit"
,
stderr
:
"inherit"
});
// 延迟执行 task:gsheet:ai 避免 Google Sheet 限流
const
delayMs
=
parseInt
(
process
.
env
.
GSHEET_AI_DELAY_MS
??
"60000"
,
10
);
console
.
log
(
`Waiting
${
delayMs
}
ms before running task:gsheet:ai to avoid rate limiting`
);
await
new
Promise
<
void
>
(
resolve
=>
setTimeout
(
resolve
,
delayMs
));
// 运行 bun run task:gsheet:ai
await
spawn
({
cmd
:
[
"bun"
,
"run"
,
"task:gsheet:ai"
],
env
,
stdout
:
"inherit"
,
stderr
:
"inherit"
});
// 运行 bun run notify-slack
await
spawn
({
cmd
:
[
"bun"
,
"run"
,
"notify-slack"
],
env
,
stdout
:
"inherit"
,
stderr
:
"inherit"
});
}
// 调用入口
main
().
catch
(
err
=>
{
console
.
error
(
err
);
process
.
exit
(
1
);
});
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment