diff --git a/sdk/eventhub/event-hubs/api-extractor.json b/sdk/eventhub/event-hubs/api-extractor.json index 1fa3ee7ad8cf..2ca70ff36f68 100644 --- a/sdk/eventhub/event-hubs/api-extractor.json +++ b/sdk/eventhub/event-hubs/api-extractor.json @@ -10,6 +10,7 @@ }, "dtsRollup": { "enabled": true, + "untrimmedFilePath": "", "publicTrimmedFilePath": "./typings/event-hubs.d.ts" }, "messages": { diff --git a/sdk/eventhub/event-processor-host/api-extractor.json b/sdk/eventhub/event-processor-host/api-extractor.json index 45e9a4924bfd..bf37fc7fb26d 100644 --- a/sdk/eventhub/event-processor-host/api-extractor.json +++ b/sdk/eventhub/event-processor-host/api-extractor.json @@ -10,6 +10,7 @@ }, "dtsRollup": { "enabled": true, + "untrimmedFilePath": "", "publicTrimmedFilePath": "./typings/event-processor-host.d.ts" }, "messages": { diff --git a/sdk/servicebus/service-bus/api-extractor.json b/sdk/servicebus/service-bus/api-extractor.json index 72242ba29a56..1be336b52ab3 100644 --- a/sdk/servicebus/service-bus/api-extractor.json +++ b/sdk/servicebus/service-bus/api-extractor.json @@ -10,6 +10,7 @@ }, "dtsRollup": { "enabled": true, + "untrimmedFilePath": "", "publicTrimmedFilePath": "./typings/service-bus.d.ts" }, "messages": { diff --git a/sdk/storage/storage-blob/api-extractor.json b/sdk/storage/storage-blob/api-extractor.json index 30f66b365a76..5a0fde00d976 100644 --- a/sdk/storage/storage-blob/api-extractor.json +++ b/sdk/storage/storage-blob/api-extractor.json @@ -10,6 +10,7 @@ }, "dtsRollup": { "enabled": true, + "untrimmedFilePath": "", "publicTrimmedFilePath": "./typings/storage-blob.d.ts" }, "messages": { diff --git a/sdk/storage/storage-file/api-extractor.json b/sdk/storage/storage-file/api-extractor.json index b9d673c434af..a8c547de79fb 100644 --- a/sdk/storage/storage-file/api-extractor.json +++ b/sdk/storage/storage-file/api-extractor.json @@ -10,6 +10,7 @@ }, "dtsRollup": { "enabled": true, + "untrimmedFilePath": "", "publicTrimmedFilePath": "./typings/storage-file.d.ts" }, "messages": { diff --git a/sdk/storage/storage-queue/api-extractor.json b/sdk/storage/storage-queue/api-extractor.json index bd8273a363c4..e8123acc7358 100644 --- a/sdk/storage/storage-queue/api-extractor.json +++ b/sdk/storage/storage-queue/api-extractor.json @@ -10,6 +10,7 @@ }, "dtsRollup": { "enabled": true, + "untrimmedFilePath": "", "publicTrimmedFilePath": "./typings/storage-queue.d.ts" }, "messages": { diff --git a/sdk/template/template/api-extractor.json b/sdk/template/template/api-extractor.json new file mode 100644 index 000000000000..63b55b6f3ccf --- /dev/null +++ b/sdk/template/template/api-extractor.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + "mainEntryPointFilePath": "types/src/index.d.ts", + "docModel": { + "enabled": false + }, + "apiReport": { + "enabled": true, + "reportFolder": "./review" + }, + "dtsRollup": { + "enabled": true, + "untrimmedFilePath": "", + "publicTrimmedFilePath": "./types/azure-template.d.ts" + }, + "messages": { + "tsdocMessageReporting": { + "default": { + "logLevel": "none" + } + }, + "extractorMessageReporting": { + "ae-missing-release-tag": { + "logLevel": "none" + }, + "ae-unresolved-link": { + "logLevel": "none" + } + } + } +} diff --git a/sdk/template/template/package.json b/sdk/template/template/package.json index e5ffc8633e9d..f7a600f00968 100644 --- a/sdk/template/template/package.json +++ b/sdk/template/template/package.json @@ -9,16 +9,17 @@ "./dist/index.js": "./browser/index.js", "./dist-esm/src/print.js": "./dist-esm/src/print.browser.js" }, - "types": "dist-esm/index.d.ts", + "types": "types/azure-template.d.ts", "scripts": { "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": "cd samples && tsc -p .", "build:test": "tsc -p . && rollup -c rollup.test.config.js 2>&1", - "build": "tsc -p . && rollup -c 2>&1", + "build": "tsc -p . && rollup -c 2>&1 && api-extractor run --local", "check-format": "prettier --list-different --config ../../.prettierrc.json \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", "clean": "rimraf dist dist-esm test-dist types *.tgz *.log", + "extract-api": "tsc -p . && api-extractor run --local", "format": "prettier --write --config ../../.prettierrc.json \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", "integration-test:browser": "echo skipped", "integration-test:node": "echo skipped", @@ -39,7 +40,7 @@ "dist/", "dist-esm/src/", "src/", - "types/src" + "types/azure-template.d.ts" ], "repository": "github:Azure/azure-sdk-for-js", "keywords": [ @@ -63,6 +64,7 @@ "tslib": "^1.9.3" }, "devDependencies": { + "@microsoft/api-extractor": "^7.1.5", "@types/mocha": "^5.2.5", "@types/node": "^8.0.0", "@typescript-eslint/eslint-plugin": "^1.7.0", diff --git a/sdk/template/template/review/template.api.md b/sdk/template/template/review/template.api.md new file mode 100644 index 000000000000..dded12fcad14 --- /dev/null +++ b/sdk/template/template/review/template.api.md @@ -0,0 +1,21 @@ +## API Report File for "@azure/template" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import EventEmitter from 'events'; +import { URLBuilder } from '@azure/ms-rest-js'; + +// @public (undocumented) +export function createEventEmitter(): EventEmitter; + +// @public (undocumented) +export function (str: string): void; + +export { URLBuilder } + + +// (No @packageDocumentation comment for this package) + +```