Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR @azure/arm-servicebus] ServiceBus : Swagger Split and Added PrivateEndPointConnection API #1513

Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
127 commits
Select commit Hold shift + click to select a range
1c6afa4
Increment package version after release of azure-cosmos (#10913)
azure-sdk Aug 28, 2020
ed7b03c
[Anomaly Detector] Fix missing types in package (#10916)
joheredi Aug 28, 2020
5c4a952
[service-bus] Allow initLink() and closeLink() to lock, preventing re…
richardpark-msft Aug 28, 2020
83c1da1
[Tables] Implement PagableAsyncIterators for listEnitites and listTab…
joheredi Aug 29, 2020
970ff62
Allow CI Analyze when there are lint errors (#10920)
joheredi Aug 29, 2020
e9967a0
Add foundations for restructuring eng/common directory (#10284)
chidozieononiwu Aug 31, 2020
8ba3ef3
[Service Bus] Values for props on the message only supports some type…
HarshaNalluru Aug 31, 2020
09164ea
release automation with latest codegen (#10954)
dw511214992 Sep 1, 2020
2794060
Update Blob SAS generation sample documents. Fixed #7676 (#10956)
XiaoningLiu Sep 1, 2020
f57a7c0
[Tables] Add tracing pipelines (#10941)
joheredi Sep 1, 2020
4e46bc1
[Identity] Separated the tests into internal and public (#10337)
sadasant Sep 1, 2020
fb2a92e
Increment package version after release of azure-ai-anomaly-detector …
azure-sdk Sep 1, 2020
55b6b28
[Identity] Sovereign Clouds don't support the VSCode credential (#10942)
sadasant Sep 1, 2020
b3a823a
[Monitor] Release 1.0.0-preview.5 (#10947)
markwolff Sep 1, 2020
036e1bf
Azure Digitaltwins SDK - API/Architectural board review (#10560)
Sep 1, 2020
38bf23b
Increment version for monitor releases (#10970)
azure-sdk Sep 1, 2020
b4c49f8
[Tables] Update README (#10964)
joheredi Sep 1, 2020
a8c2325
Sync eng/common directory with azure-sdk-tools repository for Tools P…
azure-sdk Sep 1, 2020
0f9a460
Sync eng/common directory with azure-sdk-tools repository for Tools P…
azure-sdk Sep 2, 2020
74be8b5
Increment version for keyvault releases (#10591)
azure-sdk Sep 2, 2020
cd0b0c7
Sync eng/common directory with azure-sdk-tools repository for Tools P…
azure-sdk Sep 2, 2020
23a43b7
[Service Bus] API Review Feedback Part 2 (#10765)
HarshaNalluru Sep 2, 2020
94df910
[Service Bus] Followup: Changelog for #10625 (#10759)
HarshaNalluru Sep 2, 2020
5e08bfd
[Monitor] rename folder name to match package name (#10974)
markwolff Sep 2, 2020
991d099
[ESLint Plugin] Linter accepts alpha and beta versions (#10986)
deyaaeldeen Sep 2, 2020
786b7a4
Enable digitaltwins ci (#10985)
praveenkuttappan Sep 2, 2020
aababde
Update codeowners file for Azure Template (#10966)
chidozieononiwu Sep 2, 2020
5275153
[Key Vault Admin] Regenerated the generated files (#10991)
sadasant Sep 2, 2020
3e6eb21
[Service Bus] Use subQueue for deadLetterReceiver (#10766)
ramya-rao-a Sep 2, 2020
5981971
[Service Bus] Avoid using dotnet links for status codes (#10700)
ramya-rao-a Sep 2, 2020
dac205c
[Event Hubs] Note that on retryable errors, processClose will not be …
ramya-rao-a Sep 2, 2020
d221d89
[Key Vault] Identifier parser feedback after 9642 (#10736)
sadasant Sep 2, 2020
f7eceff
[Core] Update changelog date for Sep. 2020 release (#10972)
jeremymeng Sep 2, 2020
e29d03c
[ESLint Plugin] Accepts correct alpha versions (#10998)
deyaaeldeen Sep 3, 2020
0d853e9
[Monitor] Add functional tests (#10915)
markwolff Sep 3, 2020
b4582fe
[Text Analytics] Regeneration with the updated Swagger v3.1.0-preview…
deyaaeldeen Sep 3, 2020
4fd6237
Sync eng/common directory with azure-sdk-tools repository for Tools P…
azure-sdk Sep 3, 2020
2ffbee9
Change prerelease versioning (#10975)
weshaggard Sep 3, 2020
e2d960f
Release arm datafactory (#10823)
dw511214992 Sep 3, 2020
c67557b
Increment version for core releases (#10999)
azure-sdk Sep 3, 2020
4f9c688
[storage][avro] add support for aborter and browser (#10062)
ljian3377 Sep 3, 2020
c94cc0a
[storage-blob] fix uploadStream to support 4GB blockSize (#10650)
ljian3377 Sep 3, 2020
33ffbb3
[Key Vault Admin] No LROs on the generated code for now (#11008)
sadasant Sep 3, 2020
fcca834
[Service Bus] Add AMQPAnnotatedMessage to the ReceivedMessage (#10957)
HarshaNalluru Sep 3, 2020
43bb11a
[service-bus, event-hubs] Allowing for a SAS key to be directly speci…
richardpark-msft Sep 3, 2020
5d98de8
Fix broken links (#11016)
praveenkuttappan Sep 3, 2020
6890af0
[Event Hubs] Prep for 5.3.0 release (#10996)
ramya-rao-a Sep 3, 2020
0376980
Ensure smoke tests initialization outputs exception message (#10971)
damirault Sep 3, 2020
c2739be
[Identity] Subject name/issuer (SNI) auth for identity (#10808)
Sep 3, 2020
dcae3ac
[Identity] App Services MSI API version upgrade (#10661)
sadasant Sep 3, 2020
95cbd38
chore(digitaltwins): update changelog (#11017)
Sep 3, 2020
620c354
[schema-registry] Implement avro-based serializer (#10890)
nguerrera Sep 3, 2020
cce70bb
[Identity] MSAL integration for interactive browser and device code (…
Sep 3, 2020
5874c7a
Sync eng/common directory with azure-sdk-tools for PR 955 (#11019)
azure-sdk Sep 3, 2020
aecc4cb
[service-bus] changelog update (#11021)
richardpark-msft Sep 3, 2020
c47352b
[Monitor] add monitor to dataplane workspace (#10914)
markwolff Sep 3, 2020
530072c
[event-hubs, eventhubs-checkpointstore-blob] Fixing samples and readm…
richardpark-msft Sep 4, 2020
ad50e91
[Text Analysis] Add a link to opinion mining sample to README (#11022)
deyaaeldeen Sep 4, 2020
fdb1160
[Service Bus] Rename ServiceBusManagementClient to ServiceBusAdminist…
ramya-rao-a Sep 4, 2020
0b61d68
[storage-file-datalake]Upload stream fix (#11005)
ljian3377 Sep 4, 2020
fddb3da
make credential in newPipeline's parameters optional (#10868)
ljian3377 Sep 4, 2020
0f8d2df
add tier option for upload (#10867)
ljian3377 Sep 4, 2020
6970aea
[storage] Quick query follow-up (#10854)
ljian3377 Sep 4, 2020
b68bf12
[storage][stg73] Changefeed follow-up (#10827)
ljian3377 Sep 4, 2020
6aea513
Release sdk 696 (#10720)
shawncx Sep 4, 2020
34ddd02
[storage][blob] Storage/feature/conditional tags (#10215)
ljian3377 Sep 4, 2020
5c7d58e
[Tables] Fix Shared Key auth and update Readme (#10988)
joheredi Sep 4, 2020
7212df4
Sync eng/common directory with azure-sdk-tools repository for Tools P…
azure-sdk Sep 4, 2020
d32c763
[Key Vautl Admin] Recordings (#11042)
sadasant Sep 4, 2020
ab6907c
[Key Vault Admin] Convenience layer - KeyVaultAccessControlClient (#1…
sadasant Sep 4, 2020
3d569fb
Sync eng/common directory with azure-sdk-tools repository for Tools P…
azure-sdk Sep 4, 2020
50eb8a8
Rename package to "digital-twins" (#11045)
Sep 4, 2020
8393abf
[core-http] Treat '=' in query parameter values as valid (#11020)
jeremymeng Sep 4, 2020
8c42ffa
[Tables] Change prerelease tag (#11047)
ellismg Sep 4, 2020
ac742c3
[Tables] make PartitionKey and RowKey camel case (#10990)
joheredi Sep 4, 2020
50c713e
Update Language Settings File (#11048)
chidozieononiwu Sep 4, 2020
60138d1
Sync eng/common directory with azure-sdk-tools repository (#11054)
azure-sdk Sep 4, 2020
89c6f1b
[Tables] Tables serialization fixes (#11052)
joheredi Sep 4, 2020
1dc72f5
[Event Grid] Initial Track 2 Client (#10059)
ellismg Sep 5, 2020
bdf1846
Sync eng/common directory with azure-sdk-tools repository for Tools P…
azure-sdk Sep 6, 2020
89faf37
[storage][STG73] prepare for release (#11006)
ljian3377 Sep 7, 2020
8c2cf0b
StreamToString() does not corrupt images anymore. (#10166)
AlexSpelt Sep 7, 2020
823ca07
[Service Bus] Add ServiceBus prefix to ReceivedMessage (#11026)
ramya-rao-a Sep 8, 2020
2ccd804
[Event Hubs] Add examples in jsdocs (#10769)
ramya-rao-a Sep 8, 2020
b38e575
Bump the template version for JS (#11049)
sima-zhu Sep 8, 2020
258fe8d
[Event Hub] Prettying (#11092)
deyaaeldeen Sep 8, 2020
9e0562d
[event-hubs/core-amqp] Updating changelogs for release date (#11106)
richardpark-msft Sep 8, 2020
72b06ce
[Tables] prettying (#11104)
deyaaeldeen Sep 8, 2020
6a9a3cd
[core-http] Update changelog for 1.1.8 release (#11099)
jeremymeng Sep 8, 2020
4277865
[Event Grid] Add code owner (#11109)
deyaaeldeen Sep 8, 2020
773f258
[event-hubs, service-bus] reference latest version of core-amqp that …
richardpark-msft Sep 8, 2020
970efb8
[Service Bus] Prettying (#11098)
deyaaeldeen Sep 8, 2020
4b60329
Update changelog (#11111)
joheredi Sep 8, 2020
99f5319
[Service Bus] Throw error when entityPath in connection string does n…
ramya-rao-a Sep 8, 2020
dd45b4e
[Event Grid] Add Samples (#11115)
ellismg Sep 8, 2020
df177be
Increment package version after release of azure-event-hubs (#11119)
azure-sdk Sep 8, 2020
f0d4941
[schema registry] set release date and update README (#11116)
nguerrera Sep 8, 2020
e1337a9
fix test failure (#11122)
HarshaNalluru Sep 9, 2020
06690c3
Add release date (#11125)
joheredi Sep 9, 2020
0447242
Increment package version after release of azure-digital-twins (#11124)
azure-sdk Sep 9, 2020
6899ec4
Disable shallow git clone (#11123)
praveenkuttappan Sep 9, 2020
d670bde
[App Configuration] Prettying (#11085)
deyaaeldeen Sep 9, 2020
734954a
[Sample] Typescript samples for ai-anomaly-detector (#10979)
guinao Sep 9, 2020
d22f549
[Sample] Javascript sample for ai-anomaly-detector (#10934)
guinao Sep 9, 2020
fbe69a8
[Text Analytics] Prettying (#11079)
deyaaeldeen Sep 9, 2020
09a68c7
[Search] Prettying (#11096)
deyaaeldeen Sep 9, 2020
b40f918
[Schema Registery] prettying (#11094)
deyaaeldeen Sep 9, 2020
43e00ad
[Identity] Prettying (#11082)
deyaaeldeen Sep 9, 2020
977a5c6
[Service Bus] Added EnableExpress property (#10984)
mohsin-mehmood Sep 9, 2020
b9d972d
[Event Grid] Prettying (#11090)
deyaaeldeen Sep 9, 2020
529670e
Validate connection config to ensure entityPath is not stringified un…
HarshaNalluru Sep 9, 2020
ccf6bea
Increment package version after release of azure-data-tables (#11130)
azure-sdk Sep 9, 2020
dac8fcd
[service-bus] Logging updates (#11058)
richardpark-msft Sep 9, 2020
64bfa9f
Add parameters to function (#11131)
chidozieononiwu Sep 9, 2020
040bed1
Fix readme, version and useragent (#11151)
joheredi Sep 9, 2020
57eee18
Increment package version after release of azure-eventgrid (#11156)
azure-sdk Sep 9, 2020
5801548
[Service Bus] fix assert in browser (#11153)
HarshaNalluru Sep 9, 2020
3c5a739
[Key Vault Admin] Convenience layer - KeyVaultBackupClient (#11009)
sadasant Sep 9, 2020
ae68966
Increment version for storage releases (#11137)
azure-sdk Sep 9, 2020
46acc01
Increment package version after release of azure-storage-blob-changef…
azure-sdk Sep 9, 2020
95ab21b
Increment package version after release of azure-core-http (#11121)
azure-sdk Sep 9, 2020
6828e87
Increment package version after release of azure-identity (#11120)
azure-sdk Sep 9, 2020
2670279
[Service Bus] Browser bundling (#11160)
HarshaNalluru Sep 9, 2020
9c191d1
[Storage] Fix file datalake build warning. (#11143)
jiacfan Sep 10, 2020
4c70947
fix README.md (#11165)
ljian3377 Sep 10, 2020
58e908a
[storage] improve datalake and changefeed samples (#11164)
ljian3377 Sep 10, 2020
740f027
Generated from 5892437243b833a710498e997b26c22454362cf6
Sep 10, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[storage] improve datalake and changefeed samples (Azure#11164)
* improve datalake and changefeed samples

* fix samples to work with dev-tool

Co-authored-by: Lin Jian <ljian3377@gmail.com>
  • Loading branch information
ljian3377 and Lin Jian authored Sep 10, 2020
commit 58e908a600f03f6988a22389d91a34475f2af3d1
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ urlFragment: storage-blob-changefeed-javascript

# Azure Storage Blob client library samples for JavaScript

These sample programs show how to use the JavaScript client libraries for Azure Storage Blobs in some common scenarios.
These sample programs show how to use the JavaScript client libraries for Azure Storage Blobs Change Feed in some common scenarios.

| **File Name** | **Description** |
| ------------------- | --------------------------------------------------------------------------- |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "azure-storage-blob-changefeed-samples-js",
"private": true,
"version": "0.1.0",
"description": "Azure Storage Blob Change Feed client library samples for JavaScript",
"engine": {
"node": ">=8.0.0"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Azure/azure-sdk-for-js.git"
},
"keywords": [
"Azure",
"Storage",
"Blob",
"Change Feed",
"Node.js",
"JavaScript"
],
"author": "Microsoft Corporation",
"license": "MIT",
"bugs": {
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js#readme",
"sideEffects": false,
"dependencies": {
"@azure/storage-blob": "latest",
"@azure/storage-blob-changefeed": "latest",
"dotenv": "^8.2.0"
},
"devDependencies": {
"rimraf": "^3.0.0"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Used in most samples. Retrieve these values from a storage account in the Azure Portal.
ACCOUNT_NAME=<storage-account-name>
ACCOUNT_KEY=<storage-account-key>
17 changes: 0 additions & 17 deletions sdk/storage/storage-blob-changefeed/samples/typescript/sample.env
Original file line number Diff line number Diff line change
@@ -1,20 +1,3 @@
# Used in most samples. Retrieve these values from a storage account in the Azure Portal.
ACCOUNT_NAME=<storage-account-name>
ACCOUNT_KEY=<storage-account-key>

# Used for withConnString
STORAGE_CONNECTION_STRING=<storage-account-connection-string>

# Used for the advanced and anonymousCred tests. Create a SAS token for a storage account in the Azure Portal.
ACCOUNT_SAS=<shared-access-signature>

# Used to authenticate using Azure AD as a service principal for role-based authentication.
#
# See the documentation for `EnvironmentCredential` at the following link:
# https://docs.microsoft.com/javascript/api/@azure/identity/environmentcredential
AZURE_TENANT_ID=<AD tenant id or name>
AZURE_CLIENT_ID=<ID of the user/service principal to authenticate as>
AZURE_CLIENT_SECRET=<client secret used to authenticate to Azure AD>

# To run the proxyAuth sample, set up an HTTP proxy and enter your information:
# HTTP_PROXY=http://localhost:3128
4 changes: 0 additions & 4 deletions sdk/storage/storage-blob/samples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ npm init -y
npm install @azure/storage-blob
```

### Running Samples

Also, change `"../.."` to `"@azure/storage-blob"` in the samples in order to import the published package instead of using source code.

## Get account credentials of your storage account

- In the [Azure Portal](https://portal.azure.com), go to **Dashboard > Storage > _your-storage-account_**.
Expand Down
2 changes: 1 addition & 1 deletion sdk/storage/storage-blob/samples/javascript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "azure-storage-blob-samples-js",
"private": true,
"version": "0.1.0",
"description": "Azure Storage Blob client library samples for TypeScript",
"description": "Azure Storage Blob client library samples for JavaScript",
"engine": {
"node": ">=8.0.0"
},
Expand Down
8 changes: 5 additions & 3 deletions sdk/storage/storage-file-datalake/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,16 @@
"build:autorest": "autorest ./swagger/README.md --typescript --use=@microsoft.azure/autorest.typescript@5.0.1",
"build:es6": "tsc -p tsconfig.json",
"build:nodebrowser": "rollup -c 2>&1",
"build:js-samples": "npm run clean && npm run build:es6 && cross-env ONLY_NODE=true rollup -c 2>&1",
"build:ts-samples": "npm run clean && cd samples && tsc -p . ",
"build:samples": "npm run clean && npm run build:es6 && cross-env ONLY_NODE=true rollup -c 2>&1 && npm run build:prep-samples",
"build:prep-samples": "dev-tool samples prep && cd dist-samples && tsc",
"build:test": "npm run build:es6 && rollup -c rollup.test.config.js 2>&1",
"build:types": "downlevel-dts typings/latest typings/3.1",
"build": "npm run build:es6 && npm run build:nodebrowser && api-extractor run --local && npm run build:types",
"check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"",
"clean": "rimraf dist dist-esm dist-test typings temp dist-browser/*.js* dist-browser/*.zip statistics.html coverage coverage-browser .nyc_output *.tgz *.log test*.xml TEST*.xml",
"clean:samples": "rimraf samples/javascript/node_modules samples/typescript/node_modules samples/typescript/dist samples/typescript/package-lock.json samples/javascript/package-lock.json",
"extract-api": "tsc -p . && api-extractor run --local",
"execute:samples": "echo skipped until samples automation ready",
"execute:samples": "npm run build:samples && dev-tool samples run dist-samples/javascript dist-samples/typescript/dist/storage-file-datalake/dist-samples/typescript/src/",
"format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"",
"integration-test:browser": "karma start --single-run",
"integration-test:node": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --full-trace -t 120000 dist-esm/storage-file-datalake/test/*.spec.js dist-esm/storage-file-datalake/test/node/*.spec.js",
Expand Down Expand Up @@ -106,6 +107,7 @@
"tslib": "^2.0.0"
},
"devDependencies": {
"@azure/dev-tool": "^1.0.0",
"@azure/identity": "^1.1.0",
"@azure/test-utils-recorder": "^1.0.0",
"@microsoft/api-extractor": "7.7.11",
Expand Down
4 changes: 0 additions & 4 deletions sdk/storage/storage-file-datalake/samples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ npm init -y
npm install @azure/storage-file-datalake
```

### Running Samples

Also, change `"../.."` to `"@azure/storage-file-datalake"` in the samples in order to import the published package instead of using source code.

## Get account credentials of your storage account

- In the [Azure Portal](https://portal.azure.com), go to **Dashboard > Storage > _your-storage-account_**.
Expand Down
56 changes: 56 additions & 0 deletions sdk/storage/storage-file-datalake/samples/javascript/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
page_type: sample
languages:
- javascript
products:
- azure
- azure-storage
urlFragment: storage-file-datalake-javascript
---

# Azure Data Lake Storage client library samples for JavaScript

These sample programs show how to use the JavaScript client libraries for Azure Data Lake Storage in some common scenarios.

| **File Name** | **Description** |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| [basic.js][basic] | authenticate with the service using an account name & key; create and delete filesystem; create and download a file, list paths |

## Prerequisites

The sample are compatible with Node.js >= 8.0.0, except for the samples that use the async `for await` syntax, which require Node.js >= 10.0.0.

You need [an Azure subscription][freesub] and [an Azure Storage account][azstorage] to run these sample programs. Samples retrieve credentials to access the storage account from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function.

## Setup

To run the samples using the published version of the package:

1. Install the dependencies using `npm`:

```bash
npm install
```

2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically.

3. Run whichever samples you like:

```bash
node basic.js
```

Alternatively, run a single sample with the correct environment variables set (step 3 is not required if you do this), for example (cross-platform):

```bash
npx cross-env ACCOUNT_NAME="<account name>" ACCOUNT_KEY="<account key>" node basic.js
```

## Next Steps

Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients.

[basic]: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/storage/storage-file-datalake/samples/javascript/basic.js
[apiref]: https://docs.microsoft.com/javascript/api/@azure/storage-file-datalake
[azstorage]: https://docs.microsoft.com/azure/storage/common/storage-account-overview
[freesub]: https://azure.microsoft.com/free/
16 changes: 7 additions & 9 deletions sdk/storage/storage-file-datalake/samples/javascript/basic.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
Setup: Enter your storage account name and shared key in main()
*/

const { DataLakeServiceClient, StorageSharedKeyCredential } = require("../.."); // Change to "@azure/storage-file-datalake" in your package
const { DataLakeServiceClient, StorageSharedKeyCredential } = require("@azure/storage-file-datalake");

// Load the .env file if it exists
require("dotenv").config();

async function main() {
// Enter your storage account name and shared key
Expand Down Expand Up @@ -95,11 +98,6 @@ async function streamToBuffer(readableStream) {
});
}

// An async method returns a Promise object, which is compatible with then().catch() coding style.
main()
.then(() => {
console.log("Successfully executed sample.");
})
.catch((err) => {
console.log(err.message);
});
main().catch((err) => {
console.error("Error running sample:", err.message);
});
36 changes: 36 additions & 0 deletions sdk/storage/storage-file-datalake/samples/javascript/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "azure-storage-file-datalake-samples-js",
"private": true,
"version": "0.1.0",
"description": "Azure Data Lake Storage client library samples for JavaScript",
"engine": {
"node": ">=8.0.0"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Azure/azure-sdk-for-js.git"
},
"keywords": [
"Azure",
"Storage",
"ADLS",
"DFS",
"datalake",
"Node.js",
"JavaScript"
],
"author": "Microsoft Corporation",
"license": "MIT",
"bugs": {
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js#readme",
"sideEffects": false,
"dependencies": {
"@azure/storage-file-datalake": "latest",
"dotenv": "^8.2.0"
},
"devDependencies": {
"rimraf": "^3.0.0"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Used in most samples. Retrieve these values from a storage account in the Azure Portal.
ACCOUNT_NAME=<storage-account-name>
ACCOUNT_KEY=<storage-account-key>
17 changes: 0 additions & 17 deletions sdk/storage/storage-file-datalake/samples/package.json

This file was deleted.

20 changes: 8 additions & 12 deletions sdk/storage/storage-file-datalake/samples/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"module": "commonjs"
},
"include": [
"**/*.ts"
],
"exclude": [
"../node_modules",
"../typings/**",
]
}
"extends": "../tsconfig.json",
"compilerOptions": {
"module": "commonjs",
"outDir": "typescript/dist"
},
"include": ["typescript/src/**.ts"],
"exclude": ["typescript/*.json", "**/node_modules/", "../node_modules", "../typings"]
}
69 changes: 69 additions & 0 deletions sdk/storage/storage-file-datalake/samples/typescript/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
page_type: sample
languages:
- typescript
products:
- azure
- azure-storage
urlFragment: storage-file-datalake-typescript
---

# Azure Data Lake Storage client library samples for TypeScript

These sample programs show how to use the TypeScript client libraries for Azure Data Lake Storage in some common scenarios.

| **File Name** | **Description** |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| [basic.ts][basic] | authenticate with the service using an account name & key; create and delete filesystem; create and download a file, list paths |

## Prerequisites

The samples are compatible with Node.js >= 8.0.0, except for the samples that use the async `for await` syntax, which require a Node.js >= 10.0.0.

Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using

```bash
npm install -g typescript
```

You need [an Azure subscription][freesub] and [an Azure Storage account][azstorage] to run these sample programs. Samples retrieve credentials to access the storage account from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function.

## Setup

To run the samples using the published version of the package:

1. Install the dependencies using `npm`:

```bash
npm install
```

2. Compile the samples

```bash
npm run build
```

3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically.

4. Run whichever samples you like:

```bash
node dist/basic.js
```

Alternatively, run a single sample with the correct environment variables set (step 3 is not required if you do this), for example (cross-platform):

```bash
npx cross-env ACCOUNT_NAME="<account name>" ACCOUNT_KEY="<account key>" node dist/basic.js
```

## Next Steps

Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients.

[basic]: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/storage/storage-file-datalake/samples/typescript/src/basic.ts
[apiref]: https://docs.microsoft.com/javascript/api/@azure/storage-file-datalake
[azstorage]: https://docs.microsoft.com/azure/storage/common/storage-account-overview
[freesub]: https://azure.microsoft.com/free/
[typescript]: https://www.typescriptlang.org/docs/home.html
Loading