@temporalio/create
Advanced tools
Comparing version 0.1.4 to 0.1.5
@@ -21,2 +21,3 @@ #!/usr/bin/env node | ||
'build.watch': 'tsc --build --watch src/worker/tsconfig.json', | ||
start: 'node lib/worker', | ||
}, | ||
@@ -144,3 +145,3 @@ devDependencies: { | ||
await fs_extra_1.copyFile(path_1.default.join(sampleDir, 'worker.ts'), path_1.default.join(src, 'worker', 'index.ts')); | ||
await fs_extra_1.copyFile(path_1.default.join(sampleDir, 'client.ts'), path_1.default.join(src, 'worker', 'test.ts')); | ||
await fs_extra_1.copyFile(path_1.default.join(sampleDir, 'client.ts'), path_1.default.join(src, 'worker', 'schedule-workflow.ts')); | ||
await fs_extra_1.copyFile(path_1.default.join(sampleDir, 'activity.ts'), path_1.default.join(src, 'activities', 'greeter.ts')); | ||
@@ -147,0 +148,0 @@ await fs_extra_1.copyFile(path_1.default.join(sampleDir, 'workflow.ts'), path_1.default.join(src, 'workflows', 'example.ts')); |
{ | ||
"name": "@temporalio/create", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "Create a Temporal project from template", | ||
@@ -29,3 +29,3 @@ "main": "lib/index.js", | ||
}, | ||
"gitHead": "b8d396aed5f6cd390c2cafe6ea276e9cea366692" | ||
"gitHead": "cd169da9d8223a141bde5e1837a8ccf0d34911af" | ||
} |
@@ -5,9 +5,10 @@ // @@@SNIPSTART nodejs-hello-worker | ||
async function run() { | ||
// Automatically locate and register activities and workflows | ||
// Automatically locate and register Activities and Workflows relative to __dirname | ||
// (assuming package was bootstrapped with `npm init @temporalio`). | ||
// Worker connects to localhost by default and uses console error for logging. | ||
// Customize the worker by passing options a second parameter of `create()`. | ||
const worker = await Worker.create(__dirname); | ||
// Bind to the `tutorial` queue and start accepting tasks | ||
await worker.run('tutorial'); | ||
// Customize the Worker by passing more options to create(). | ||
// create() tries to connect to the server and will throw if a connection could not be established. | ||
const worker = await Worker.create({ workDir: __dirname, taskQueue: 'tutorial' }); | ||
// Start accepting tasks on the `tutorial` queue | ||
await worker.run(); | ||
} | ||
@@ -14,0 +15,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13096
288