Skip to content

Commit 0941b23

Browse files
authored
[Device Update] Release of Device Update for IoT Hub SDK for JavaScript (Azure#14066)
* Initial commit * update package.json * Add first sample * Format * Add simple sample * Update samples metadata * Formatting * Enalbe build and execute samples scripts * UPDATE LOCK * update ci * update scripts * update test * don't throw * Update readme * Fix readmes * Update types destination * Update package * Update credential scope * Add changelog * Update package.json * Skip lint * Update dependencies * Fix readme * fix tables broken references * Update release date
1 parent abec491 commit 0941b23

35 files changed

+7621
-39
lines changed

common/config/rush/pnpm-lock.yaml

Lines changed: 61 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dataplane.code-workspace

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,10 @@
243243
{
244244
"name": "attestation",
245245
"path": "sdk/attestation/attestation"
246+
},
247+
{
248+
"name": "iot-device-update",
249+
"path": "sdk/deviceupdate/iot-device-update"
246250
}
247251
],
248252
"settings": {

rush.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -656,6 +656,11 @@
656656
"packageName": "@azure/mixedreality-authentication",
657657
"projectFolder": "sdk/mixedreality/mixedreality-authentication",
658658
"versionPolicyName": "client"
659+
},
660+
{
661+
"packageName": "@azure/iot-device-update",
662+
"projectFolder": "sdk/deviceupdate/iot-device-update",
663+
"versionPolicyName": "client"
659664
}
660665
]
661666
}

sdk/deviceupdate/ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file.
2+
3+
trigger:
4+
branches:
5+
include:
6+
- master
7+
- main
8+
- release/*
9+
- hotfix/*
10+
paths:
11+
include:
12+
- sdk/deviceupdate/
13+
14+
pr:
15+
branches:
16+
include:
17+
- master
18+
- main
19+
- feature/*
20+
- release/*
21+
- hotfix/*
22+
paths:
23+
include:
24+
- sdk/deviceupdate/
25+
26+
extends:
27+
template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml
28+
parameters:
29+
ServiceDirectory: deviceupdate
30+
IncludeRelease: false
31+
Artifacts:
32+
- name: azure-iot-device-update
33+
safeName: azureiotdeviceupdate
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Release History
2+
3+
## 1.0.0-beta.1 (2021-03-04)
4+
5+
- Initial Release
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2021 Microsoft
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Azure Device Update for IoT Hub client library for JavaScript
2+
3+
The library provides access to the Device Update for IoT Hub service that enables customers to publish updates for their IoT devices to the cloud, and then deploy these updates to their devices (approve updates to groups of devices managed and provisioned in IoT Hub).
4+
5+
[Source code](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk) | [Product documentation](https://docs.microsoft.com/azure/iot-hub-device-update/understand-device-update)
6+
7+
## Getting started
8+
9+
### Currently supported environments
10+
11+
- Node.js version 8.x.x or higher
12+
13+
### Prerequisites
14+
15+
- Microsoft Azure Subscription: To call Microsoft Azure services, you need to create an [Azure subscription](https://azure.microsoft.com/free/)
16+
- Device Update for IoT Hub instance
17+
- Azure IoT Hub instance
18+
19+
### Install the `@azure/iot-device-update` package
20+
21+
Install the Azure Device Update for IoT Hub client library for JavaScript with `npm`:
22+
23+
```bash
24+
npm install @azure/iot-device-update
25+
```
26+
27+
## Key concepts
28+
29+
Device Update for IoT Hub is a managed service that enables you to deploy over-the-air updates for your IoT devices. The client library has three main components:
30+
31+
- **Updates**: update management (import, enumerate, delete, etc.)
32+
- **Devices**: device management (enumerate devices and retrieve device properties)
33+
- **Deployments**: deployment management (start and monitor update deployments to a set of devices)
34+
35+
You can learn more about Device Update for IoT Hub by visiting [Device Update for IoT Hub](https://github.com/azure/iot-hub-device-update).
36+
37+
## Examples
38+
39+
You can familiarize yourself with different APIs using [Samples](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/deviceupdate/iot-device-update/samples).
40+
41+
## Troubleshooting
42+
43+
### Logging
44+
45+
Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
46+
47+
```javascript
48+
import { setLogLevel } from "@azure/logger";
49+
50+
setLogLevel("info");
51+
```
52+
53+
For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/core/logger).
54+
55+
## Next steps
56+
57+
Get started with our [Device Update for IoT Hub samples](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/deviceupdate/iot-device-update/samples)
58+
59+
## Contributing
60+
61+
If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/master/CONTRIBUTING.md) to learn more about how to build and test the code.
62+
63+
## Related projects
64+
65+
- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
66+
67+
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fdeviceupdate%2Fiot-device-update%2FREADME.png)
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3+
"mainEntryPointFilePath": "types/index.d.ts",
4+
"docModel": { "enabled": true },
5+
"apiReport": { "enabled": true, "reportFolder": "./review" },
6+
"dtsRollup": {
7+
"enabled": true,
8+
"untrimmedFilePath": "",
9+
"publicTrimmedFilePath": "./types/iot-device-update.d.ts"
10+
},
11+
"messages": {
12+
"tsdocMessageReporting": { "default": { "logLevel": "none" } },
13+
"extractorMessageReporting": {
14+
"ae-missing-release-tag": { "logLevel": "none" },
15+
"ae-unresolved-link": { "logLevel": "none" }
16+
}
17+
}
18+
}
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
{
2+
"name": "@azure/iot-device-update",
3+
"author": "Microsoft Corporation",
4+
"sdk-type": "client",
5+
"description": "Device Update for IoT Hub is an Azure service that enables customers to publish update for their IoT devices to the cloud, and then deploy that update to their devices (approve updates to groups of devices managed and provisioned in IoT Hub). It leverages the proven security and reliability of the Windows Update platform, optimized for IoT devices. It works globally and knows when and how to update devices, enabling customers to focus on their business goals and let Device Update for IoT Hub handle the updates.",
6+
"version": "1.0.0-beta.1",
7+
"dependencies": {
8+
"@azure/core-http": "^1.2.0",
9+
"@azure/core-paging": "^1.1.1",
10+
"@azure/core-tracing": "1.0.0-preview.10",
11+
"@opentelemetry/api": "^0.10.2",
12+
"tslib": "^2.0.0"
13+
},
14+
"keywords": [
15+
"node",
16+
"azure",
17+
"typescript",
18+
"browser",
19+
"isomorphic",
20+
"cloud"
21+
],
22+
"license": "MIT",
23+
"main": "./dist/index.js",
24+
"module": "./dist-esm/index.js",
25+
"types": "./types/iot-device-update.d.ts",
26+
"devDependencies": {
27+
"@azure/dev-tool": "^1.0.0",
28+
"@azure/eslint-plugin-azure-sdk": "^3.0.0",
29+
"@azure/identity": "^1.1.0",
30+
"@microsoft/api-extractor": "7.7.11",
31+
"@types/node": "^8.0.0",
32+
"@types/uuid": "^8.0.0",
33+
"cross-env": "^7.0.2",
34+
"dotenv": "^8.2.0",
35+
"eslint": "^7.15.0",
36+
"mkdirp": "^1.0.4",
37+
"prettier": "^1.16.4",
38+
"rimraf": "^3.0.0",
39+
"rollup-plugin-node-resolve": "^3.4.0",
40+
"rollup-plugin-sourcemaps": "^0.4.2",
41+
"rollup": "^1.16.3",
42+
"source-map-support": "^0.5.9",
43+
"typedoc": "0.15.2",
44+
"typescript": "4.1.2",
45+
"uglify-js": "^3.4.9",
46+
"uuid": "^8.3.0"
47+
},
48+
"homepage": "https://github.com/Azure/azure-sdk-for-js",
49+
"repository": "github:Azure/azure-sdk-for-js",
50+
"bugs": {
51+
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
52+
},
53+
"files": [
54+
"dist/",
55+
"dist-esm/src/",
56+
"types/iot-device-update.d.ts",
57+
"README.md",
58+
"LICENSE"
59+
],
60+
"//metadata": {
61+
"constantPaths": [
62+
{
63+
"path": "src/deviceUpdateClientContext.ts",
64+
"prefix": "packageVersion"
65+
}
66+
]
67+
},
68+
"engines": {
69+
"node": ">=8.0.0"
70+
},
71+
"//sampleConfiguration": {
72+
"skipFolder": true
73+
},
74+
"scripts": {
75+
"audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit",
76+
"build:browser": "tsc -p . && cross-env ONLY_BROWSER=true rollup -c 2>&1",
77+
"build:debug": "tsc -p . && rollup -c 2>&1 && api-extractor run --local",
78+
"build:node": "tsc -p . && cross-env ONLY_NODE=true rollup -c 2>&1",
79+
"build:samples": "dev-tool samples prep && cd dist-samples && tsc -p .",
80+
"build:test": "echo skip",
81+
"build": "tsc -p . && rollup -c 2>&1 && api-extractor run --local",
82+
"check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"",
83+
"clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log",
84+
"docs": "typedoc --excludePrivate --excludeNotExported --excludeExternals --stripInternal --mode file --out ./dist/docs ./src",
85+
"execute:samples": "npm run build:samples && dev-tool samples run dist-samples/javascript dist-samples/typescript/dist/dist-samples/typescript/src/",
86+
"extract-api": "api-extractor run --local",
87+
"format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"",
88+
"integration-test:browser": "echo skip",
89+
"integration-test:node": "echo skip",
90+
"integration-test": "echo skip",
91+
"lint:fix": "echo skip",
92+
"lint": "echo skip",
93+
"pack": "npm pack 2>&1",
94+
"prebuild": "npm run clean",
95+
"test:browser": "echo skip",
96+
"test:node": "echo skip",
97+
"test": "echo skip",
98+
"unit-test:browser": "echo skip",
99+
"unit-test:node": "echo skip",
100+
"unit-test": "echo skip"
101+
},
102+
"sideEffects": false,
103+
"autoPublish": false
104+
}

0 commit comments

Comments
 (0)