Skip to content

Commit c3ef49d

Browse files
committed
pretty default logs for build
1 parent b1e2701 commit c3ef49d

File tree

66 files changed

+914
-383
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+914
-383
lines changed

.changeset/selfish-tools-add.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@e2b/python-sdk': patch
3+
'e2b': patch
4+
'@e2b/cli': patch
5+
---
6+
7+
add template build logs pretty output helper

packages/cli/src/templates/python-build-async.hbs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import asyncio
2-
from e2b import AsyncTemplate
2+
from e2b import AsyncTemplate, default_build_logger
33
from template import template
44

55

@@ -13,6 +13,7 @@ async def main():
1313
{{#if memoryMB}}
1414
memory_mb={{memoryMB}},
1515
{{/if}}
16+
on_build_logs=default_build_logger(),
1617
)
1718

1819

packages/cli/src/templates/python-build-sync.hbs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from e2b import Template
1+
from e2b import Template, default_build_logger
22
from template import template
33

44

@@ -12,4 +12,5 @@ if __name__ == "__main__":
1212
{{#if memoryMB}}
1313
memory_mb={{memoryMB}},
1414
{{/if}}
15+
on_build_logs=default_build_logger(),
1516
)

packages/cli/src/templates/typescript-build.hbs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Template } from 'e2b'
1+
import { Template, defaultBuildLogger } from 'e2b'
22
import { template } from './template'
33

44
async function main() {
@@ -10,6 +10,7 @@ async function main() {
1010
{{#if memoryMB}}
1111
memoryMB: {{memoryMB}},
1212
{{/if}}
13+
onBuildLogs: defaultBuildLogger(),
1314
});
1415
}
1516

packages/cli/tests/commands/template/fixtures/complex-python/expected/python-async/build_dev.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import asyncio
2-
from e2b import AsyncTemplate
2+
from e2b import AsyncTemplate, default_build_logger
33
from template import template
44

55

66
async def main():
77
await AsyncTemplate.build(
88
template,
99
alias="complex-python-app-dev",
10+
on_build_logs=default_build_logger(),
1011
)
1112

1213

packages/cli/tests/commands/template/fixtures/complex-python/expected/python-async/build_prod.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import asyncio
2-
from e2b import AsyncTemplate
2+
from e2b import AsyncTemplate, default_build_logger
33
from template import template
44

55

66
async def main():
77
await AsyncTemplate.build(
88
template,
99
alias="complex-python-app",
10+
on_build_logs=default_build_logger(),
1011
)
1112

1213

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
from e2b import Template
1+
from e2b import Template, default_build_logger
22
from template import template
33

44

55
if __name__ == "__main__":
66
Template.build(
77
template,
88
alias="complex-python-app-dev",
9+
on_build_logs=default_build_logger(),
910
)
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
from e2b import Template
1+
from e2b import Template, default_build_logger
22
from template import template
33

44

55
if __name__ == "__main__":
66
Template.build(
77
template,
88
alias="complex-python-app",
9+
on_build_logs=default_build_logger(),
910
)

packages/cli/tests/commands/template/fixtures/complex-python/expected/typescript/build.dev.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
import { Template } from 'e2b'
1+
import { Template, defaultBuildLogger } from 'e2b'
22
import { template } from './template'
33

44
async function main() {
55
await Template.build(template, {
66
alias: 'complex-python-app-dev',
7+
onBuildLogs: defaultBuildLogger(),
78
});
89
}
910

packages/cli/tests/commands/template/fixtures/complex-python/expected/typescript/build.prod.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
import { Template } from 'e2b'
1+
import { Template, defaultBuildLogger } from 'e2b'
22
import { template } from './template'
33

44
async function main() {
55
await Template.build(template, {
66
alias: 'complex-python-app',
7+
onBuildLogs: defaultBuildLogger(),
78
});
89
}
910

0 commit comments

Comments
 (0)