diff --git a/sdk/eventhub/eventhubs-checkpointstore-blob/package.json b/sdk/eventhub/eventhubs-checkpointstore-blob/package.json index 8620d0641cf7..0cd840933fa7 100644 --- a/sdk/eventhub/eventhubs-checkpointstore-blob/package.json +++ b/sdk/eventhub/eventhubs-checkpointstore-blob/package.json @@ -34,7 +34,7 @@ "audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit", "build:browser": "tsc -p . && cross-env ONLY_BROWSER=true rollup -c 2>&1", "build:node": "tsc -p . && cross-env ONLY_NODE=true rollup -c 2>&1", - "build:samples": "echo Skipped.", + "build:samples": "dev-tool samples prep && cd dist-samples && tsc", "build:test:browser": "tsc -p . && cross-env ONLY_BROWSER=true rollup -c rollup.test.config.js 2>&1", "build:test:node": "tsc -p . && cross-env ONLY_NODE=true rollup -c rollup.test.config.js 2>&1", "build:test": "npm run build:test:node", @@ -66,6 +66,7 @@ "tslib": "^2.0.0" }, "devDependencies": { + "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@microsoft/api-extractor": "7.7.11", "@rollup/plugin-commonjs": "11.0.2", diff --git a/sdk/eventhub/eventhubs-checkpointstore-blob/samples/typescript/package.json b/sdk/eventhub/eventhubs-checkpointstore-blob/samples/typescript/package.json index 8c27da943454..91ceacf59baa 100644 --- a/sdk/eventhub/eventhubs-checkpointstore-blob/samples/typescript/package.json +++ b/sdk/eventhub/eventhubs-checkpointstore-blob/samples/typescript/package.json @@ -29,7 +29,7 @@ }, "dependencies": { "@azure/event-hubs": "^5.0.2", - "@azure/eventhubs-checkpointstore-blob": "^1.0.0", + "@azure/eventhubs-checkpointstore-blob": "latest", "@azure/storage-blob": "^12.1.1", "dotenv": "^8.2.0", "tslib": "^1.9.3" diff --git a/sdk/eventhub/eventhubs-checkpointstore-blob/samples/typescript/src/receiveEventsUsingCheckpointStore.ts b/sdk/eventhub/eventhubs-checkpointstore-blob/samples/typescript/src/receiveEventsUsingCheckpointStore.ts index d5fc5ac9fcf2..c3c7b5d285dd 100644 --- a/sdk/eventhub/eventhubs-checkpointstore-blob/samples/typescript/src/receiveEventsUsingCheckpointStore.ts +++ b/sdk/eventhub/eventhubs-checkpointstore-blob/samples/typescript/src/receiveEventsUsingCheckpointStore.ts @@ -27,7 +27,7 @@ const storageConnectionString = ""; const containerName = ""; const consumerGroup = ""; -async function main() { +export async function main() { // this client will be used by our eventhubs-checkpointstore-blob, which // persists any checkpoints from this session in Azure Storage const containerClient = new ContainerClient(storageConnectionString, containerName); @@ -74,7 +74,7 @@ async function main() { ); }, processError: async (err, context) => { - console.log(`Error : ${err}`); + console.log(`Error on partition "${context.partitionId}": ${err}`); } }); diff --git a/sdk/eventhub/eventhubs-checkpointstore-blob/samples/typescript/src/receiveEventsWithApiSpecificStorage.ts b/sdk/eventhub/eventhubs-checkpointstore-blob/samples/typescript/src/receiveEventsWithApiSpecificStorage.ts index ae81b5f8e607..be66ce61473f 100644 --- a/sdk/eventhub/eventhubs-checkpointstore-blob/samples/typescript/src/receiveEventsWithApiSpecificStorage.ts +++ b/sdk/eventhub/eventhubs-checkpointstore-blob/samples/typescript/src/receiveEventsWithApiSpecificStorage.ts @@ -35,7 +35,7 @@ const storageContainerUrl = const storageAccountName = process.env["STORAGE_ACCOUNT_NAME"] || ""; const storageAccountKey = process.env["STORAGE_ACCOUNT_KEY"] || ""; -async function main() { +export async function main() { // The `containerClient` will be used by our eventhubs-checkpointstore-blob, which // persists any checkpoints from this session in Azure Storage. const storageCredential = new StorageSharedKeyCredential(storageAccountName, storageAccountKey); @@ -78,7 +78,7 @@ async function main() { ); }, processError: async (err, context) => { - console.log(`Error : ${err}`); + console.log(`Error on partition "${context.partitionId}": ${err}`); } });