Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

Scope template build for typescript and python (#922)

Jakub Dobryad7ad6f101b8
diff --git a/packages/cli/src/templates/python-build-sync.hbs b/packages/cli/src/templates/python-build-sync.hbs
index 41b73d00a..517dcd21b 100644
--- a/packages/cli/src/templates/python-build-sync.hbs
+++ b/packages/cli/src/templates/python-build-sync.hbs
@@ -2,13 +2,14 @@ from e2b import Template
from template import template
-Template.build(
- template,
- alias="{{alias}}",
-{{#if cpuCount}}
- cpu_count={{cpuCount}},
-{{/if}}
-{{#if memoryMB}}
- memory_mb={{memoryMB}},
-{{/if}}
-)
+if __name__ == "__main__":
+ Template.build(
+ template,
+ alias="{{alias}}",
+ {{#if cpuCount}}
+ cpu_count={{cpuCount}},
+ {{/if}}
+ {{#if memoryMB}}
+ memory_mb={{memoryMB}},
+ {{/if}}
+ )
diff --git a/packages/cli/src/templates/typescript-build.hbs b/packages/cli/src/templates/typescript-build.hbs
index 06495227d..05998e2fc 100644
--- a/packages/cli/src/templates/typescript-build.hbs
+++ b/packages/cli/src/templates/typescript-build.hbs
@@ -1,12 +1,16 @@
import { Template } from 'e2b'
import { template } from './template'
-await Template.build(template, {
- alias: '{{alias}}',
-{{#if cpuCount}}
- cpuCount: {{cpuCount}},
-{{/if}}
-{{#if memoryMB}}
- memoryMB: {{memoryMB}},
-{{/if}}
-})
+async function main() {
+ await Template.build(template, {
+ alias: '{{alias}}',
+ {{#if cpuCount}}
+ cpuCount: {{cpuCount}},
+ {{/if}}
+ {{#if memoryMB}}
+ memoryMB: {{memoryMB}},
+ {{/if}}
+ });
+}
+
+main().catch(console.error);
diff --git a/packages/cli/tests/commands/template/fixtures/complex-python/e2b.toml b/packages/cli/tests/commands/template/fixtures/complex-python/e2b.toml
index 0c8bfc7a4..11975f038 100644
--- a/packages/cli/tests/commands/template/fixtures/complex-python/e2b.toml
+++ b/packages/cli/tests/commands/template/fixtures/complex-python/e2b.toml
@@ -1,3 +1,3 @@
template_id = "complex-python"
dockerfile = "e2b.Dockerfile"
-template_name = "Complex Python App"
\ No newline at end of file
+template_name = "complex-python-app"
diff --git a/packages/cli/tests/commands/template/fixtures/complex-python/expected/python-async/build_dev.py b/packages/cli/tests/commands/template/fixtures/complex-python/expected/python-async/build_dev.py
index 4fd71e953..f69bf1901 100644
--- a/packages/cli/tests/commands/template/fixtures/complex-python/expected/python-async/build_dev.py
+++ b/packages/cli/tests/commands/template/fixtures/complex-python/expected/python-async/build_dev.py
@@ -6,7 +6,7 @@ from template import template
async def main():
await AsyncTemplate.build(
template,
- alias="Complex Python App-dev",
+ alias="complex-python-app-dev",
)
diff --git a/packages/cli/tests/commands/template/fixtures/complex-python/expected/python-async/build_prod.py b/packages/cli/tests/commands/template/fixtures/complex-python/expected/python-async/build_prod.py
index ded9eaf7c..c47bc588a 100644
--- a/packages/cli/tests/commands/template/fixtures/complex-python/expected/python-async/build_prod.py
+++ b/packages/cli/tests/commands/template/fixtures/complex-python/expected/python-async/build_prod.py
@@ -6,7 +6,7 @@ from template import template
async def main():
await AsyncTemplate.build(
template,
- alias="Complex Python App",
+ alias="complex-python-app",
)
diff --git a/packages/cli/tests/commands/template/fixtures/complex-python/expected/python-sync/build_dev.py b/packages/cli/tests/commands/template/fixtures/complex-python/expected/python-sync/build_dev.py
index f934811e8..8eefb972c 100644
--- a/packages/cli/tests/commands/template/fixtures/complex-python/expected/python-sync/build_dev.py
+++ b/packages/cli/tests/commands/template/fixtures/complex-python/expected/python-sync/build_dev.py
@@ -2,7 +2,8 @@ from e2b import Template
from template import template
-Template.build(
- template,
- alias="Complex Python App-dev",
-)
+if __name__ == "__main__":
+ Template.build(
+ template,
+ alias="complex-python-app-dev",
+ )
diff --git a/packages/cli/tests/commands/template/fixtures/complex-python/expected/python-sync/build_prod.py b/packages/cli/tests/commands/template/fixtures/complex-python/expected/python-sync/build_prod.py
index 87b5b7717..40faea9ec 100644
--- a/packages/cli/tests/commands/template/fixtures/complex-python/expected/python-sync/build_prod.py
+++ b/packages/cli/tests/commands/template/fixtures/complex-python/expected/python-sync/build_prod.py
@@ -2,7 +2,8 @@ from e2b import Template
from template import template
-Template.build(
- template,
- alias="Complex Python App",
-)
+if __name__ == "__main__":
+ Template.build(
+ template,
+ alias="complex-python-app",
+ )
diff --git a/packages/cli/tests/commands/template/fixtures/complex-python/expected/typescript/build.dev.ts b/packages/cli/tests/commands/template/fixtures/complex-python/expected/typescript/build.dev.ts
index de85e46ae..70d937e2d 100644
--- a/packages/cli/tests/commands/template/fixtures/complex-python/expected/typescript/build.dev.ts
+++ b/packages/cli/tests/commands/template/fixtures/complex-python/expected/typescript/build.dev.ts
@@ -1,6 +1,10 @@
import { Template } from 'e2b'
import { template } from './template'
-await Template.build(template, {
- alias: 'Complex Python App-dev',
-})
+async function main() {
+ await Template.build(template, {
+ alias: 'complex-python-app-dev',
+ });
+}
+
+main().catch(console.error);
diff --git a/packages/cli/tests/commands/template/fixtures/complex-python/expected/typescript/build.prod.ts b/packages/cli/tests/commands/template/fixtures/complex-python/expected/typescript/build.prod.ts
index 99e42b312..4a0c008cb 100644
--- a/packages/cli/tests/commands/template/fixtures/complex-python/expected/typescript/build.prod.ts
+++ b/packages/cli/tests/commands/template/fixtures/complex-python/expected/typescript/build.prod.ts
@@ -1,6 +1,10 @@
import { Template } from 'e2b'
import { template } from './template'
-await Template.build(template, {
- alias: 'Complex Python App',
-})
+async function main() {
+ await Template.build(template, {
+ alias: 'complex-python-app',
+ });
+}
+
+main().catch(console.error);
diff --git a/packages/cli/tests/commands/template/fixtures/copy-variations/expected/python-sync/build_dev.py b/packages/cli/tests/commands/template/fixtures/copy-variations/expected/python-sync/build_dev.py
index 2f033aa46..862806d80 100644
--- a/packages/cli/tests/commands/template/fixtures/copy-variations/expected/python-sync/build_dev.py
+++ b/packages/cli/tests/commands/template/fixtures/copy-variations/expected/python-sync/build_dev.py
@@ -2,7 +2,8 @@ from e2b import Template
from template import template
-Template.build(
- template,
- alias="copy-test-dev",
-)
+if __name__ == "__main__":
+ Template.build(
+ template,
+ alias="copy-test-dev",
+ )
diff --git a/packages/cli/tests/commands/template/fixtures/copy-variations/expected/python-sync/build_prod.py b/packages/cli/tests/commands/template/fixtures/copy-variations/expected/python-sync/build_prod.py
index ddd7f9faa..93a6b4e91 100644
--- a/packages/cli/tests/commands/template/fixtures/copy-variations/expected/python-sync/build_prod.py
+++ b/packages/cli/tests/commands/template/fixtures/copy-variations/expected/python-sync/build_prod.py
@@ -2,7 +2,8 @@ from e2b import Template
from template import template
-Template.build(
- template,
- alias="copy-test",
-)
+if __name__ == "__main__":
+ Template.build(
+ template,
+ alias="copy-test",
+ )
diff --git a/packages/cli/tests/commands/template/fixtures/copy-variations/expected/typescript/build.dev.ts b/packages/cli/tests/commands/template/fixtures/copy-variations/expected/typescript/build.dev.ts
index b3dc2e379..813b63eba 100644
--- a/packages/cli/tests/commands/template/fixtures/copy-variations/expected/typescript/build.dev.ts
+++ b/packages/cli/tests/commands/template/fixtures/copy-variations/expected/typescript/build.dev.ts
@@ -1,6 +1,10 @@
import { Template } from 'e2b'
import { template } from './template'
-await Template.build(template, {
- alias: 'copy-test-dev',
-})
+async function main() {
+ await Template.build(template, {
+ alias: 'copy-test-dev',
+ });
+}
+
+main().catch(console.error);
diff --git a/packages/cli/tests/commands/template/fixtures/copy-variations/expected/typescript/build.prod.ts b/packages/cli/tests/commands/template/fixtures/copy-variations/expected/typescript/build.prod.ts
index 81aafb1b8..a6170c019 100644
--- a/packages/cli/tests/commands/template/fixtures/copy-variations/expected/typescript/build.prod.ts
+++ b/packages/cli/tests/commands/template/fixtures/copy-variations/expected/typescript/build.prod.ts
@@ -1,6 +1,10 @@
import { Template } from 'e2b'
import { template } from './template'
-await Template.build(template, {
- alias: 'copy-test',
-})
+async function main() {
+ await Template.build(template, {
+ alias: 'copy-test',
+ });
+}
+
+main().catch(console.error);
diff --git a/packages/cli/tests/commands/template/fixtures/custom-commands/expected/python-sync/build_dev.py b/packages/cli/tests/commands/template/fixtures/custom-commands/expected/python-sync/build_dev.py
index 5da498d47..6c80575d0 100644
--- a/packages/cli/tests/commands/template/fixtures/custom-commands/expected/python-sync/build_dev.py
+++ b/packages/cli/tests/commands/template/fixtures/custom-commands/expected/python-sync/build_dev.py
@@ -2,7 +2,8 @@ from e2b import Template
from template import template
-Template.build(
- template,
- alias="custom-app-dev",
-)
+if __name__ == "__main__":
+ Template.build(
+ template,
+ alias="custom-app-dev",
+ )
diff --git a/packages/cli/tests/commands/template/fixtures/custom-commands/expected/python-sync/build_prod.py b/packages/cli/tests/commands/template/fixtures/custom-commands/expected/python-sync/build_prod.py
index 7ebfe9232..e1f9176e5 100644
--- a/packages/cli/tests/commands/template/fixtures/custom-commands/expected/python-sync/build_prod.py
+++ b/packages/cli/tests/commands/template/fixtures/custom-commands/expected/python-sync/build_prod.py
@@ -2,7 +2,8 @@ from e2b import Template
from template import template
-Template.build(
- template,
- alias="custom-app",
-)
+if __name__ == "__main__":
+ Template.build(
+ template,
+ alias="custom-app",
+ )
diff --git a/packages/cli/tests/commands/template/fixtures/custom-commands/expected/typescript/build.dev.ts b/packages/cli/tests/commands/template/fixtures/custom-commands/expected/typescript/build.dev.ts
index 485193c16..5600f1fdf 100644
--- a/packages/cli/tests/commands/template/fixtures/custom-commands/expected/typescript/build.dev.ts
+++ b/packages/cli/tests/commands/template/fixtures/custom-commands/expected/typescript/build.dev.ts
@@ -1,6 +1,10 @@
import { Template } from 'e2b'
import { template } from './template'
-await Template.build(template, {
- alias: 'custom-app-dev',
-})
+async function main() {
+ await Template.build(template, {
+ alias: 'custom-app-dev',
+ });
+}
+
+main().catch(console.error);
diff --git a/packages/cli/tests/commands/template/fixtures/custom-commands/expected/typescript/build.prod.ts b/packages/cli/tests/commands/template/fixtures/custom-commands/expected/typescript/build.prod.ts
index 72bad203a..66b3c4b92 100644
--- a/packages/cli/tests/commands/template/fixtures/custom-commands/expected/typescript/build.prod.ts
+++ b/packages/cli/tests/commands/template/fixtures/custom-commands/expected/typescript/build.prod.ts
@@ -1,6 +1,10 @@
import { Template } from 'e2b'
import { template } from './template'
-await Template.build(template, {
- alias: 'custom-app',
-})
+async function main() {
+ await Template.build(template, {
+ alias: 'custom-app',
+ });
+}
+
+main().catch(console.error);
diff --git a/packages/cli/tests/commands/template/fixtures/minimal-dockerfile/expected/python-sync/build_dev.py b/packages/cli/tests/commands/template/fixtures/minimal-dockerfile/expected/python-sync/build_dev.py
index eacec0859..2efce7de8 100644
--- a/packages/cli/tests/commands/template/fixtures/minimal-dockerfile/expected/python-sync/build_dev.py
+++ b/packages/cli/tests/commands/template/fixtures/minimal-dockerfile/expected/python-sync/build_dev.py
@@ -2,7 +2,8 @@ from e2b import Template
from template import template
-Template.build(
- template,
- alias="minimal-template-dev",
-)
+if __name__ == "__main__":
+ Template.build(
+ template,
+ alias="minimal-template-dev",
+ )
diff --git a/packages/cli/tests/commands/template/fixtures/minimal-dockerfile/expected/python-sync/build_prod.py b/packages/cli/tests/commands/template/fixtures/minimal-dockerfile/expected/python-sync/build_prod.py
index bb3c4e266..dc1652343 100644
--- a/packages/cli/tests/commands/template/fixtures/minimal-dockerfile/expected/python-sync/build_prod.py
+++ b/packages/cli/tests/commands/template/fixtures/minimal-dockerfile/expected/python-sync/build_prod.py
@@ -2,7 +2,8 @@ from e2b import Template
from template import template
-Template.build(
- template,
- alias="minimal-template",
-)
+if __name__ == "__main__":
+ Template.build(
+ template,
+ alias="minimal-template",
+ )
diff --git a/packages/cli/tests/commands/template/fixtures/minimal-dockerfile/expected/typescript/build.dev.ts b/packages/cli/tests/commands/template/fixtures/minimal-dockerfile/expected/typescript/build.dev.ts
index 372e8f0a0..35c519ef3 100644
--- a/packages/cli/tests/commands/template/fixtures/minimal-dockerfile/expected/typescript/build.dev.ts
+++ b/packages/cli/tests/commands/template/fixtures/minimal-dockerfile/expected/typescript/build.dev.ts
@@ -1,6 +1,10 @@
import { Template } from 'e2b'
import { template } from './template'
-await Template.build(template, {
- alias: 'minimal-template-dev',
-})
+async function main() {
+ await Template.build(template, {
+ alias: 'minimal-template-dev',
+ });
+}
+
+main().catch(console.error);
diff --git a/packages/cli/tests/commands/template/fixtures/minimal-dockerfile/expected/typescript/build.prod.ts b/packages/cli/tests/commands/template/fixtures/minimal-dockerfile/expected/typescript/build.prod.ts
index 2e89a7304..10c082c34 100644
--- a/packages/cli/tests/commands/template/fixtures/minimal-dockerfile/expected/typescript/build.prod.ts
+++ b/packages/cli/tests/commands/template/fixtures/minimal-dockerfile/expected/typescript/build.prod.ts
@@ -1,6 +1,10 @@
import { Template } from 'e2b'
import { template } from './template'
-await Template.build(template, {
- alias: 'minimal-template',
-})
+async function main() {
+ await Template.build(template, {
+ alias: 'minimal-template',
+ });
+}
+
+main().catch(console.error);
diff --git a/packages/cli/tests/commands/template/fixtures/multi-stage/expected/python-sync/build_dev.py b/packages/cli/tests/commands/template/fixtures/multi-stage/expected/python-sync/build_dev.py
index 4391a4e04..f9bbb9570 100644
--- a/packages/cli/tests/commands/template/fixtures/multi-stage/expected/python-sync/build_dev.py
+++ b/packages/cli/tests/commands/template/fixtures/multi-stage/expected/python-sync/build_dev.py
@@ -2,7 +2,8 @@ from e2b import Template
from template import template
-Template.build(
- template,
- alias="multi-stage-dev",
-)
+if __name__ == "__main__":
+ Template.build(
+ template,
+ alias="multi-stage-dev",
+ )
diff --git a/packages/cli/tests/commands/template/fixtures/multi-stage/expected/python-sync/build_prod.py b/packages/cli/tests/commands/template/fixtures/multi-stage/expected/python-sync/build_prod.py
index 1800c952e..6eabffd16 100644
--- a/packages/cli/tests/commands/template/fixtures/multi-stage/expected/python-sync/build_prod.py
+++ b/packages/cli/tests/commands/template/fixtures/multi-stage/expected/python-sync/build_prod.py
@@ -2,7 +2,8 @@ from e2b import Template
from template import template
-Template.build(
- template,
- alias="multi-stage",
-)
+if __name__ == "__main__":
+ Template.build(
+ template,
+ alias="multi-stage",
+ )
diff --git a/packages/cli/tests/commands/template/fixtures/multi-stage/expected/typescript/build.dev.ts b/packages/cli/tests/commands/template/fixtures/multi-stage/expected/typescript/build.dev.ts
index 3df826a71..7592e07b7 100644
--- a/packages/cli/tests/commands/template/fixtures/multi-stage/expected/typescript/build.dev.ts
+++ b/packages/cli/tests/commands/template/fixtures/multi-stage/expected/typescript/build.dev.ts
@@ -1,6 +1,10 @@
import { Template } from 'e2b'
import { template } from './template'
-await Template.build(template, {
- alias: 'multi-stage-dev',
-})
+async function main() {
+ await Template.build(template, {
+ alias: 'multi-stage-dev',
+ });
+}
+
+main().catch(console.error);
diff --git a/packages/cli/tests/commands/template/fixtures/multi-stage/expected/typescript/build.prod.ts b/packages/cli/tests/commands/template/fixtures/multi-stage/expected/typescript/build.prod.ts
index 3c7f5d344..63451d27e 100644
--- a/packages/cli/tests/commands/template/fixtures/multi-stage/expected/typescript/build.prod.ts
+++ b/packages/cli/tests/commands/template/fixtures/multi-stage/expected/typescript/build.prod.ts
@@ -1,6 +1,10 @@
import { Template } from 'e2b'
import { template } from './template'
-await Template.build(template, {
- alias: 'multi-stage',
-})
+async function main() {
+ await Template.build(template, {
+ alias: 'multi-stage',
+ });
+}
+
+main().catch(console.error);
diff --git a/packages/cli/tests/commands/template/fixtures/multiple-env/expected/python-sync/build_dev.py b/packages/cli/tests/commands/template/fixtures/multiple-env/expected/python-sync/build_dev.py
index d16de7f26..5e21966c2 100644
--- a/packages/cli/tests/commands/template/fixtures/multiple-env/expected/python-sync/build_dev.py
+++ b/packages/cli/tests/commands/template/fixtures/multiple-env/expected/python-sync/build_dev.py
@@ -2,7 +2,8 @@ from e2b import Template
from template import template
-Template.build(
- template,
- alias="env-test-dev",
-)
+if __name__ == "__main__":
+ Template.build(
+ template,
+ alias="env-test-dev",
+ )
diff --git a/packages/cli/tests/commands/template/fixtures/multiple-env/expected/python-sync/build_prod.py b/packages/cli/tests/commands/template/fixtures/multiple-env/expected/python-sync/build_prod.py
index a7296253a..34147e0b5 100644
--- a/packages/cli/tests/commands/template/fixtures/multiple-env/expected/python-sync/build_prod.py
+++ b/packages/cli/tests/commands/template/fixtures/multiple-env/expected/python-sync/build_prod.py
@@ -2,7 +2,8 @@ from e2b import Template
from template import template
-Template.build(
- template,
- alias="env-test",
-)
+if __name__ == "__main__":
+ Template.build(
+ template,
+ alias="env-test",
+ )
diff --git a/packages/cli/tests/commands/template/fixtures/multiple-env/expected/typescript/build.dev.ts b/packages/cli/tests/commands/template/fixtures/multiple-env/expected/typescript/build.dev.ts
index 034e0ab12..47d283178 100644
--- a/packages/cli/tests/commands/template/fixtures/multiple-env/expected/typescript/build.dev.ts
+++ b/packages/cli/tests/commands/template/fixtures/multiple-env/expected/typescript/build.dev.ts
@@ -1,6 +1,10 @@
import { Template } from 'e2b'
import { template } from './template'
-await Template.build(template, {
- alias: 'env-test-dev',
-})
+async function main() {
+ await Template.build(template, {
+ alias: 'env-test-dev',
+ });
+}
+
+main().catch(console.error);
diff --git a/packages/cli/tests/commands/template/fixtures/multiple-env/expected/typescript/build.prod.ts b/packages/cli/tests/commands/template/fixtures/multiple-env/expected/typescript/build.prod.ts
index 1c4ce6d30..d8fc65ccf 100644
--- a/packages/cli/tests/commands/template/fixtures/multiple-env/expected/typescript/build.prod.ts
+++ b/packages/cli/tests/commands/template/fixtures/multiple-env/expected/typescript/build.prod.ts
@@ -1,6 +1,10 @@
import { Template } from 'e2b'
import { template } from './template'
-await Template.build(template, {
- alias: 'env-test',
-})
+async function main() {
+ await Template.build(template, {
+ alias: 'env-test',
+ });
+}
+
+main().catch(console.error);
diff --git a/packages/cli/tests/commands/template/fixtures/start-cmd/expected/python-sync/build_dev.py b/packages/cli/tests/commands/template/fixtures/start-cmd/expected/python-sync/build_dev.py
index a4d66efc6..692e7bb81 100644
--- a/packages/cli/tests/commands/template/fixtures/start-cmd/expected/python-sync/build_dev.py
+++ b/packages/cli/tests/commands/template/fixtures/start-cmd/expected/python-sync/build_dev.py
@@ -2,9 +2,10 @@ from e2b import Template
from template import template
-Template.build(
- template,
- alias="start-cmd-dev",
- cpu_count=2,
- memory_mb=1024,
-)
+if __name__ == "__main__":
+ Template.build(
+ template,
+ alias="start-cmd-dev",
+ cpu_count=2,
+ memory_mb=1024,
+ )
diff --git a/packages/cli/tests/commands/template/fixtures/start-cmd/expected/python-sync/build_prod.py b/packages/cli/tests/commands/template/fixtures/start-cmd/expected/python-sync/build_prod.py
index 65fc1b46c..f6c1b5358 100644
--- a/packages/cli/tests/commands/template/fixtures/start-cmd/expected/python-sync/build_prod.py
+++ b/packages/cli/tests/commands/template/fixtures/start-cmd/expected/python-sync/build_prod.py
@@ -2,9 +2,10 @@ from e2b import Template
from template import template
-Template.build(
- template,
- alias="start-cmd",
- cpu_count=2,
- memory_mb=1024,
-)
+if __name__ == "__main__":
+ Template.build(
+ template,
+ alias="start-cmd",
+ cpu_count=2,
+ memory_mb=1024,
+ )
diff --git a/packages/cli/tests/commands/template/fixtures/start-cmd/expected/typescript/build.dev.ts b/packages/cli/tests/commands/template/fixtures/start-cmd/expected/typescript/build.dev.ts
index 152ed103a..ad6fa939f 100644
--- a/packages/cli/tests/commands/template/fixtures/start-cmd/expected/typescript/build.dev.ts
+++ b/packages/cli/tests/commands/template/fixtures/start-cmd/expected/typescript/build.dev.ts
@@ -1,8 +1,12 @@
import { Template } from 'e2b'
import { template } from './template'
-await Template.build(template, {
- alias: 'start-cmd-dev',
- cpuCount: 2,
- memoryMB: 1024,
-})
+async function main() {
+ await Template.build(template, {
+ alias: 'start-cmd-dev',
+ cpuCount: 2,
+ memoryMB: 1024,
+ });
+}
+
+main().catch(console.error);
diff --git a/packages/cli/tests/commands/template/fixtures/start-cmd/expected/typescript/build.prod.ts b/packages/cli/tests/commands/template/fixtures/start-cmd/expected/typescript/build.prod.ts
index cee2b7d0d..0d98fc8c1 100644
--- a/packages/cli/tests/commands/template/fixtures/start-cmd/expected/typescript/build.prod.ts
+++ b/packages/cli/tests/commands/template/fixtures/start-cmd/expected/typescript/build.prod.ts
@@ -1,8 +1,12 @@
import { Template } from 'e2b'
import { template } from './template'
-await Template.build(template, {
- alias: 'start-cmd',
- cpuCount: 2,
- memoryMB: 1024,
-})
+async function main() {
+ await Template.build(template, {
+ alias: 'start-cmd',
+ cpuCount: 2,
+ memoryMB: 1024,
+ });
+}
+
+main().catch(console.error);