@beauraines/node-helpers 2.2.0 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,7 +2,11 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
- ## [2.2.0](https://github.com/beauraines/node-helpers/compare/v1.1.0...v2.2.0) (2023-03-01)
5
+ ## [2.4.0](https://github.com/beauraines/node-helpers/compare/v2.3.1...v2.4.0) (2023-03-05)
6
+
7
+ ### [2.3.1](https://github.com/beauraines/node-helpers/compare/v2.2.0...v2.3.1) (2023-03-02)
8
+
9
+ ## [2.2.0](https://github.com/beauraines/node-helpers/compare/v1.1.0...v2.2.0) (2023-03-02)
6
10
 
7
11
 
8
12
  ### Features
package/index.js CHANGED
@@ -12,3 +12,4 @@ module.exports = {
12
12
  helpers,
13
13
  jira
14
14
  }
15
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beauraines/node-helpers",
3
- "version": "2.2.0",
3
+ "version": "2.4.0",
4
4
  "description": "Collection of node helpers",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/azure.js CHANGED
@@ -93,6 +93,28 @@ class AzureStorage {
93
93
  }
94
94
  }
95
95
 
96
+ /**
97
+ * Gets a SAS token for the storage queue
98
+ * .
99
+ * @param {string} queueUrl The URL to the storage queue
100
+ * @param {object} options Should include `permissions: "raup"` or some combination thereof Any additional options supported. https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
101
+ */
102
+ getStorageQueueSignedURL(queueUrl,options) {
103
+
104
+ const queueClient = new QueueClient(
105
+ queueUrl,
106
+ new StorageSharedKeyCredential(this.storageAccountName, this.storageAccountKey)
107
+ )
108
+
109
+ options = {
110
+ startsOn: dayjs().toDate(),
111
+ ...options
112
+ }
113
+
114
+ return queueClient.generateSasUrl(options)
115
+
116
+ }
117
+
96
118
  /**
97
119
  * Generates a signed URL for the specified blob in the specified container. The signed URL will expire
98
120
  * after the class's `tokenExpiry` minutes, which defaults to 60 if not specified.