@azure/storage-queue 12.28.0-beta.1 → 12.28.1-alpha.20250925.1
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/dist/browser/AccountSASPermissions.js +32 -34
- package/dist/browser/AccountSASPermissions.js.map +1 -1
- package/dist/browser/AccountSASResourceTypes.js +12 -14
- package/dist/browser/AccountSASResourceTypes.js.map +1 -1
- package/dist/browser/AccountSASServices.js +16 -18
- package/dist/browser/AccountSASServices.js.map +1 -1
- package/dist/browser/AccountSASSignatureValues.d.ts +1 -1
- package/dist/browser/AccountSASSignatureValues.d.ts.map +1 -1
- package/dist/browser/AccountSASSignatureValues.js.map +1 -1
- package/dist/browser/Pipeline.d.ts +2 -3
- package/dist/browser/Pipeline.d.ts.map +1 -1
- package/dist/browser/Pipeline.js +28 -19
- package/dist/browser/Pipeline.js.map +1 -1
- package/dist/browser/QueueClient.d.ts +2 -2
- package/dist/browser/QueueClient.d.ts.map +1 -1
- package/dist/browser/QueueClient.js +52 -15
- package/dist/browser/QueueClient.js.map +1 -1
- package/dist/browser/QueueSASPermissions.js +16 -18
- package/dist/browser/QueueSASPermissions.js.map +1 -1
- package/dist/browser/QueueSASSignatureValues.d.ts +1 -1
- package/dist/browser/QueueSASSignatureValues.d.ts.map +1 -1
- package/dist/browser/QueueSASSignatureValues.js.map +1 -1
- package/dist/browser/QueueServiceClient.d.ts +2 -2
- package/dist/browser/QueueServiceClient.d.ts.map +1 -1
- package/dist/browser/QueueServiceClient.js +50 -46
- package/dist/browser/QueueServiceClient.js.map +1 -1
- package/dist/browser/SASQueryParameters.js +49 -0
- package/dist/browser/SASQueryParameters.js.map +1 -1
- package/dist/browser/StorageClient.d.ts +2 -2
- package/dist/browser/StorageClient.d.ts.map +1 -1
- package/dist/browser/StorageClient.js +23 -0
- package/dist/browser/StorageClient.js.map +1 -1
- package/dist/browser/StorageContextClient.js +1 -1
- package/dist/browser/StorageContextClient.js.map +1 -1
- package/dist/browser/generated/src/operations/messageId.js +1 -0
- package/dist/browser/generated/src/operations/messageId.js.map +1 -1
- package/dist/browser/generated/src/operations/messages.js +1 -0
- package/dist/browser/generated/src/operations/messages.js.map +1 -1
- package/dist/browser/generated/src/operations/queue.js +1 -0
- package/dist/browser/generated/src/operations/queue.js.map +1 -1
- package/dist/browser/generated/src/operations/service.js +1 -0
- package/dist/browser/generated/src/operations/service.js.map +1 -1
- package/dist/browser/generated/src/storageClient.js +14 -4
- package/dist/browser/generated/src/storageClient.js.map +1 -1
- package/dist/browser/index-browser.d.mts.map +1 -1
- package/dist/browser/index-browser.mjs.map +1 -1
- package/dist/browser/index.d.ts +1 -7
- package/dist/browser/index.js +1 -7
- package/dist/browser/utils/constants.d.ts.map +1 -1
- package/dist/browser/utils/constants.js +1 -1
- package/dist/browser/utils/constants.js.map +1 -1
- package/dist/browser/utils/utils.common.js +1 -2
- package/dist/browser/utils/utils.common.js.map +1 -1
- package/dist/commonjs/AccountSASPermissions.js +32 -34
- package/dist/commonjs/AccountSASPermissions.js.map +1 -1
- package/dist/commonjs/AccountSASResourceTypes.js +12 -14
- package/dist/commonjs/AccountSASResourceTypes.js.map +1 -1
- package/dist/commonjs/AccountSASServices.js +16 -18
- package/dist/commonjs/AccountSASServices.js.map +1 -1
- package/dist/commonjs/AccountSASSignatureValues.d.ts +1 -1
- package/dist/commonjs/AccountSASSignatureValues.d.ts.map +1 -1
- package/dist/commonjs/AccountSASSignatureValues.js.map +1 -1
- package/dist/commonjs/Pipeline.d.ts +2 -3
- package/dist/commonjs/Pipeline.d.ts.map +1 -1
- package/dist/commonjs/Pipeline.js +39 -30
- package/dist/commonjs/Pipeline.js.map +1 -1
- package/dist/commonjs/QueueClient.d.ts +2 -2
- package/dist/commonjs/QueueClient.d.ts.map +1 -1
- package/dist/commonjs/QueueClient.js +59 -22
- package/dist/commonjs/QueueClient.js.map +1 -1
- package/dist/commonjs/QueueSASPermissions.js +16 -18
- package/dist/commonjs/QueueSASPermissions.js.map +1 -1
- package/dist/commonjs/QueueSASSignatureValues.d.ts +1 -1
- package/dist/commonjs/QueueSASSignatureValues.d.ts.map +1 -1
- package/dist/commonjs/QueueSASSignatureValues.js.map +1 -1
- package/dist/commonjs/QueueServiceClient.d.ts +2 -2
- package/dist/commonjs/QueueServiceClient.d.ts.map +1 -1
- package/dist/commonjs/QueueServiceClient.js +57 -53
- package/dist/commonjs/QueueServiceClient.js.map +1 -1
- package/dist/commonjs/SASQueryParameters.js +49 -0
- package/dist/commonjs/SASQueryParameters.js.map +1 -1
- package/dist/commonjs/StorageClient.d.ts +2 -2
- package/dist/commonjs/StorageClient.d.ts.map +1 -1
- package/dist/commonjs/StorageClient.js +23 -0
- package/dist/commonjs/StorageClient.js.map +1 -1
- package/dist/commonjs/StorageContextClient.js +1 -1
- package/dist/commonjs/StorageContextClient.js.map +1 -1
- package/dist/commonjs/generated/src/operations/messageId.js +1 -0
- package/dist/commonjs/generated/src/operations/messageId.js.map +1 -1
- package/dist/commonjs/generated/src/operations/messages.js +1 -0
- package/dist/commonjs/generated/src/operations/messages.js.map +1 -1
- package/dist/commonjs/generated/src/operations/queue.js +1 -0
- package/dist/commonjs/generated/src/operations/queue.js.map +1 -1
- package/dist/commonjs/generated/src/operations/service.js +1 -0
- package/dist/commonjs/generated/src/operations/service.js.map +1 -1
- package/dist/commonjs/generated/src/storageClient.js +14 -4
- package/dist/commonjs/generated/src/storageClient.js.map +1 -1
- package/dist/commonjs/index.d.ts +1 -9
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +13 -19
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +11 -11
- package/dist/commonjs/utils/constants.d.ts.map +1 -1
- package/dist/commonjs/utils/constants.js +1 -1
- package/dist/commonjs/utils/constants.js.map +1 -1
- package/dist/commonjs/utils/utils.common.js +1 -2
- package/dist/commonjs/utils/utils.common.js.map +1 -1
- package/dist/esm/AccountSASPermissions.js +32 -34
- package/dist/esm/AccountSASPermissions.js.map +1 -1
- package/dist/esm/AccountSASResourceTypes.js +12 -14
- package/dist/esm/AccountSASResourceTypes.js.map +1 -1
- package/dist/esm/AccountSASServices.js +16 -18
- package/dist/esm/AccountSASServices.js.map +1 -1
- package/dist/esm/AccountSASSignatureValues.d.ts +1 -1
- package/dist/esm/AccountSASSignatureValues.d.ts.map +1 -1
- package/dist/esm/AccountSASSignatureValues.js.map +1 -1
- package/dist/esm/Pipeline.d.ts +2 -3
- package/dist/esm/Pipeline.d.ts.map +1 -1
- package/dist/esm/Pipeline.js +28 -19
- package/dist/esm/Pipeline.js.map +1 -1
- package/dist/esm/QueueClient.d.ts +2 -2
- package/dist/esm/QueueClient.d.ts.map +1 -1
- package/dist/esm/QueueClient.js +52 -15
- package/dist/esm/QueueClient.js.map +1 -1
- package/dist/esm/QueueSASPermissions.js +16 -18
- package/dist/esm/QueueSASPermissions.js.map +1 -1
- package/dist/esm/QueueSASSignatureValues.d.ts +1 -1
- package/dist/esm/QueueSASSignatureValues.d.ts.map +1 -1
- package/dist/esm/QueueSASSignatureValues.js.map +1 -1
- package/dist/esm/QueueServiceClient.d.ts +2 -2
- package/dist/esm/QueueServiceClient.d.ts.map +1 -1
- package/dist/esm/QueueServiceClient.js +50 -46
- package/dist/esm/QueueServiceClient.js.map +1 -1
- package/dist/esm/SASQueryParameters.js +49 -0
- package/dist/esm/SASQueryParameters.js.map +1 -1
- package/dist/esm/StorageClient.d.ts +2 -2
- package/dist/esm/StorageClient.d.ts.map +1 -1
- package/dist/esm/StorageClient.js +23 -0
- package/dist/esm/StorageClient.js.map +1 -1
- package/dist/esm/StorageContextClient.js +1 -1
- package/dist/esm/StorageContextClient.js.map +1 -1
- package/dist/esm/generated/src/operations/messageId.js +1 -0
- package/dist/esm/generated/src/operations/messageId.js.map +1 -1
- package/dist/esm/generated/src/operations/messages.js +1 -0
- package/dist/esm/generated/src/operations/messages.js.map +1 -1
- package/dist/esm/generated/src/operations/queue.js +1 -0
- package/dist/esm/generated/src/operations/queue.js.map +1 -1
- package/dist/esm/generated/src/operations/service.js +1 -0
- package/dist/esm/generated/src/operations/service.js.map +1 -1
- package/dist/esm/generated/src/storageClient.js +14 -4
- package/dist/esm/generated/src/storageClient.js.map +1 -1
- package/dist/esm/index.d.ts +1 -9
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -9
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/utils/constants.d.ts.map +1 -1
- package/dist/esm/utils/constants.js +1 -1
- package/dist/esm/utils/constants.js.map +1 -1
- package/dist/esm/utils/utils.common.js +1 -2
- package/dist/esm/utils/utils.common.js.map +1 -1
- package/dist/react-native/AccountSASPermissions.js +32 -34
- package/dist/react-native/AccountSASPermissions.js.map +1 -1
- package/dist/react-native/AccountSASResourceTypes.js +12 -14
- package/dist/react-native/AccountSASResourceTypes.js.map +1 -1
- package/dist/react-native/AccountSASServices.js +16 -18
- package/dist/react-native/AccountSASServices.js.map +1 -1
- package/dist/react-native/AccountSASSignatureValues.d.ts +1 -1
- package/dist/react-native/AccountSASSignatureValues.d.ts.map +1 -1
- package/dist/react-native/AccountSASSignatureValues.js.map +1 -1
- package/dist/react-native/Pipeline.d.ts +2 -3
- package/dist/react-native/Pipeline.d.ts.map +1 -1
- package/dist/react-native/Pipeline.js +28 -19
- package/dist/react-native/Pipeline.js.map +1 -1
- package/dist/react-native/QueueClient.d.ts +2 -2
- package/dist/react-native/QueueClient.d.ts.map +1 -1
- package/dist/react-native/QueueClient.js +52 -15
- package/dist/react-native/QueueClient.js.map +1 -1
- package/dist/react-native/QueueSASPermissions.js +16 -18
- package/dist/react-native/QueueSASPermissions.js.map +1 -1
- package/dist/react-native/QueueSASSignatureValues.d.ts +1 -1
- package/dist/react-native/QueueSASSignatureValues.d.ts.map +1 -1
- package/dist/react-native/QueueSASSignatureValues.js.map +1 -1
- package/dist/react-native/QueueServiceClient.d.ts +2 -2
- package/dist/react-native/QueueServiceClient.d.ts.map +1 -1
- package/dist/react-native/QueueServiceClient.js +50 -46
- package/dist/react-native/QueueServiceClient.js.map +1 -1
- package/dist/react-native/SASQueryParameters.js +49 -0
- package/dist/react-native/SASQueryParameters.js.map +1 -1
- package/dist/react-native/StorageClient.d.ts +2 -2
- package/dist/react-native/StorageClient.d.ts.map +1 -1
- package/dist/react-native/StorageClient.js +23 -0
- package/dist/react-native/StorageClient.js.map +1 -1
- package/dist/react-native/StorageContextClient.js +1 -1
- package/dist/react-native/StorageContextClient.js.map +1 -1
- package/dist/react-native/generated/src/operations/messageId.js +1 -0
- package/dist/react-native/generated/src/operations/messageId.js.map +1 -1
- package/dist/react-native/generated/src/operations/messages.js +1 -0
- package/dist/react-native/generated/src/operations/messages.js.map +1 -1
- package/dist/react-native/generated/src/operations/queue.js +1 -0
- package/dist/react-native/generated/src/operations/queue.js.map +1 -1
- package/dist/react-native/generated/src/operations/service.js +1 -0
- package/dist/react-native/generated/src/operations/service.js.map +1 -1
- package/dist/react-native/generated/src/storageClient.js +14 -4
- package/dist/react-native/generated/src/storageClient.js.map +1 -1
- package/dist/react-native/index.d.ts +1 -9
- package/dist/react-native/index.d.ts.map +1 -1
- package/dist/react-native/index.js +1 -9
- package/dist/react-native/index.js.map +1 -1
- package/dist/react-native/utils/constants.d.ts.map +1 -1
- package/dist/react-native/utils/constants.js +1 -1
- package/dist/react-native/utils/constants.js.map +1 -1
- package/dist/react-native/utils/utils.common.js +1 -2
- package/dist/react-native/utils/utils.common.js.map +1 -1
- package/package.json +37 -39
|
@@ -10,40 +10,6 @@
|
|
|
10
10
|
* the order of the permissions is particular and this class guarantees correctness.
|
|
11
11
|
*/
|
|
12
12
|
export class AccountSASPermissions {
|
|
13
|
-
constructor() {
|
|
14
|
-
/**
|
|
15
|
-
* Permission to read resources granted.
|
|
16
|
-
*/
|
|
17
|
-
this.read = false;
|
|
18
|
-
/**
|
|
19
|
-
* Permission to write resources granted.
|
|
20
|
-
*/
|
|
21
|
-
this.write = false;
|
|
22
|
-
/**
|
|
23
|
-
* Permission to delete queues and messages granted.
|
|
24
|
-
*/
|
|
25
|
-
this.delete = false;
|
|
26
|
-
/**
|
|
27
|
-
* Permission to list queues granted.
|
|
28
|
-
*/
|
|
29
|
-
this.list = false;
|
|
30
|
-
/**
|
|
31
|
-
* Permission to add messages, table entities, and append to blobs granted.
|
|
32
|
-
*/
|
|
33
|
-
this.add = false;
|
|
34
|
-
/**
|
|
35
|
-
* Permission to create queues, blobs and files granted.
|
|
36
|
-
*/
|
|
37
|
-
this.create = false;
|
|
38
|
-
/**
|
|
39
|
-
* Permissions to update messages and table entities granted.
|
|
40
|
-
*/
|
|
41
|
-
this.update = false;
|
|
42
|
-
/**
|
|
43
|
-
* Permission to get and delete messages granted.
|
|
44
|
-
*/
|
|
45
|
-
this.process = false;
|
|
46
|
-
}
|
|
47
13
|
/**
|
|
48
14
|
* Parse initializes the AccountSASPermissions fields from a string.
|
|
49
15
|
*
|
|
@@ -83,6 +49,38 @@ export class AccountSASPermissions {
|
|
|
83
49
|
}
|
|
84
50
|
return accountSASPermissions;
|
|
85
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* Permission to read resources granted.
|
|
54
|
+
*/
|
|
55
|
+
read = false;
|
|
56
|
+
/**
|
|
57
|
+
* Permission to write resources granted.
|
|
58
|
+
*/
|
|
59
|
+
write = false;
|
|
60
|
+
/**
|
|
61
|
+
* Permission to delete queues and messages granted.
|
|
62
|
+
*/
|
|
63
|
+
delete = false;
|
|
64
|
+
/**
|
|
65
|
+
* Permission to list queues granted.
|
|
66
|
+
*/
|
|
67
|
+
list = false;
|
|
68
|
+
/**
|
|
69
|
+
* Permission to add messages, table entities, and append to blobs granted.
|
|
70
|
+
*/
|
|
71
|
+
add = false;
|
|
72
|
+
/**
|
|
73
|
+
* Permission to create queues, blobs and files granted.
|
|
74
|
+
*/
|
|
75
|
+
create = false;
|
|
76
|
+
/**
|
|
77
|
+
* Permissions to update messages and table entities granted.
|
|
78
|
+
*/
|
|
79
|
+
update = false;
|
|
80
|
+
/**
|
|
81
|
+
* Permission to get and delete messages granted.
|
|
82
|
+
*/
|
|
83
|
+
process = false;
|
|
86
84
|
/**
|
|
87
85
|
* Produces the SAS permissions string for an Azure Storage account.
|
|
88
86
|
* Call this method to set AccountSASSignatureValues Permissions field.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountSASPermissions.js","sourceRoot":"","sources":["../../src/AccountSASPermissions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;;;GAQG;AACH,MAAM,OAAO,qBAAqB;
|
|
1
|
+
{"version":3,"file":"AccountSASPermissions.js","sourceRoot":"","sources":["../../src/AccountSASPermissions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;;;GAQG;AACH,MAAM,OAAO,qBAAqB;IAChC;;;;OAIG;IACI,MAAM,CAAC,KAAK,CAAC,WAAmB;QACrC,MAAM,qBAAqB,GAAG,IAAI,qBAAqB,EAAE,CAAC;QAE1D,KAAK,MAAM,CAAC,IAAI,WAAW,EAAE,CAAC;YAC5B,QAAQ,CAAC,EAAE,CAAC;gBACV,KAAK,GAAG;oBACN,qBAAqB,CAAC,IAAI,GAAG,IAAI,CAAC;oBAClC,MAAM;gBACR,KAAK,GAAG;oBACN,qBAAqB,CAAC,KAAK,GAAG,IAAI,CAAC;oBACnC,MAAM;gBACR,KAAK,GAAG;oBACN,qBAAqB,CAAC,MAAM,GAAG,IAAI,CAAC;oBACpC,MAAM;gBACR,KAAK,GAAG;oBACN,qBAAqB,CAAC,IAAI,GAAG,IAAI,CAAC;oBAClC,MAAM;gBACR,KAAK,GAAG;oBACN,qBAAqB,CAAC,GAAG,GAAG,IAAI,CAAC;oBACjC,MAAM;gBACR,KAAK,GAAG;oBACN,qBAAqB,CAAC,MAAM,GAAG,IAAI,CAAC;oBACpC,MAAM;gBACR,KAAK,GAAG;oBACN,qBAAqB,CAAC,MAAM,GAAG,IAAI,CAAC;oBACpC,MA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,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,OAAO,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC9B,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * This is a helper class to construct a string representing the permissions granted by an AccountSAS. Setting a value\n * to true means that any SAS which uses these permissions will grant permissions for that operation. Once all the\n * values are set, this should be serialized with toString and set as the permissions field on an\n * {@link AccountSASSignatureValues} object. It is possible to construct the permissions string without this class, but\n * the order of the permissions is particular and this class guarantees correctness.\n */\nexport class AccountSASPermissions {\n /**\n * Parse initializes the AccountSASPermissions fields from a string.\n *\n * @param permissions -\n */\n public static parse(permissions: string): AccountSASPermissions {\n const accountSASPermissions = new AccountSASPermissions();\n\n for (const c of permissions) {\n switch (c) {\n case \"r\":\n accountSASPermissions.read = true;\n break;\n case \"w\":\n accountSASPermissions.write = true;\n break;\n case \"d\":\n accountSASPermissions.delete = true;\n break;\n case \"l\":\n accountSASPermissions.list = true;\n break;\n case \"a\":\n accountSASPermissions.add = true;\n break;\n case \"c\":\n accountSASPermissions.create = true;\n break;\n case \"u\":\n accountSASPermissions.update = true;\n break;\n case \"p\":\n accountSASPermissions.process = true;\n break;\n default:\n throw new RangeError(`Invalid permission character: ${c}`);\n }\n }\n\n return accountSASPermissions;\n }\n\n /**\n * Permission to read resources granted.\n */\n public read: boolean = false;\n\n /**\n * Permission to write resources granted.\n */\n public write: boolean = false;\n\n /**\n * Permission to delete queues and messages granted.\n */\n public delete: boolean = false;\n\n /**\n * Permission to list queues granted.\n */\n public list: boolean = false;\n\n /**\n * Permission to add messages, table entities, and append to blobs granted.\n */\n public add: boolean = false;\n\n /**\n * Permission to create queues, blobs and files granted.\n */\n public create: boolean = false;\n\n /**\n * Permissions to update messages and table entities granted.\n */\n public update: boolean = false;\n\n /**\n * Permission to get and delete messages granted.\n */\n public process: boolean = false;\n\n /**\n * Produces the SAS permissions string for an Azure Storage account.\n * Call this method to set AccountSASSignatureValues Permissions field.\n *\n * Using this method will guarantee the resource types are in\n * an order accepted by the service.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas\n *\n */\n public toString(): string {\n // The order of the characters should be as specified here to ensure correctness:\n // https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas\n // Use a string array instead of string concatenating += operator for performance\n const permissions: string[] = [];\n if (this.read) {\n permissions.push(\"r\");\n }\n if (this.write) {\n permissions.push(\"w\");\n }\n if (this.delete) {\n permissions.push(\"d\");\n }\n if (this.list) {\n permissions.push(\"l\");\n }\n if (this.add) {\n permissions.push(\"a\");\n }\n if (this.create) {\n permissions.push(\"c\");\n }\n if (this.update) {\n permissions.push(\"u\");\n }\n if (this.process) {\n permissions.push(\"p\");\n }\n return permissions.join(\"\");\n }\n}\n"]}
|
|
@@ -10,20 +10,6 @@
|
|
|
10
10
|
* the order of the resources is particular and this class guarantees correctness.
|
|
11
11
|
*/
|
|
12
12
|
export class AccountSASResourceTypes {
|
|
13
|
-
constructor() {
|
|
14
|
-
/**
|
|
15
|
-
* Permission to access service level APIs granted.
|
|
16
|
-
*/
|
|
17
|
-
this.service = false;
|
|
18
|
-
/**
|
|
19
|
-
* Permission to access container level APIs (Blob Containers, Tables, Queues, File Shares) granted.
|
|
20
|
-
*/
|
|
21
|
-
this.container = false;
|
|
22
|
-
/**
|
|
23
|
-
* Permission to access object level APIs (Blobs, Table Entities, Queue Messages, Files) granted.
|
|
24
|
-
*/
|
|
25
|
-
this.object = false;
|
|
26
|
-
}
|
|
27
13
|
/**
|
|
28
14
|
* Creates an {@link AccountSASResourceTypes} from the specified resource types string. This method will throw an
|
|
29
15
|
* Error if it encounters a character that does not correspond to a valid resource type.
|
|
@@ -49,6 +35,18 @@ export class AccountSASResourceTypes {
|
|
|
49
35
|
}
|
|
50
36
|
return accountSASResourceTypes;
|
|
51
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Permission to access service level APIs granted.
|
|
40
|
+
*/
|
|
41
|
+
service = false;
|
|
42
|
+
/**
|
|
43
|
+
* Permission to access container level APIs (Blob Containers, Tables, Queues, File Shares) granted.
|
|
44
|
+
*/
|
|
45
|
+
container = false;
|
|
46
|
+
/**
|
|
47
|
+
* Permission to access object level APIs (Blobs, Table Entities, Queue Messages, Files) granted.
|
|
48
|
+
*/
|
|
49
|
+
object = false;
|
|
52
50
|
/**
|
|
53
51
|
* Converts the given resource types to a string.
|
|
54
52
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountSASResourceTypes.js","sourceRoot":"","sources":["../../src/AccountSASResourceTypes.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;;;GAQG;AACH,MAAM,OAAO,uBAAuB;
|
|
1
|
+
{"version":3,"file":"AccountSASResourceTypes.js","sourceRoot":"","sources":["../../src/AccountSASResourceTypes.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;;;GAQG;AACH,MAAM,OAAO,uBAAuB;IAClC;;;;;OAKG;IACI,MAAM,CAAC,KAAK,CAAC,aAAqB;QACvC,MAAM,uBAAuB,GAAG,IAAI,uBAAuB,EAAE,CAAC;QAE9D,KAAK,MAAM,CAAC,IAAI,aAAa,EAAE,CAAC;YAC9B,QAAQ,CAAC,EAAE,CAAC;gBACV,KAAK,GAAG;oBACN,uBAAuB,CAAC,OAAO,GAAG,IAAI,CAAC;oBACvC,MAAM;gBACR,KAAK,GAAG;oBACN,uBAAuB,CAAC,SAAS,GAAG,IAAI,CAAC;oBACzC,MAAM;gBACR,KAAK,GAAG;oBACN,uBAAuB,CAAC,MAAM,GAAG,IAAI,CAAC;oBACtC,MAAM;gBACR;oBACE,MAAM,IAAI,UAAU,CAAC,0BAA0B,CAAC,EAAE,CAAC,CAAC;YACxD,CAAC;QACH,CAAC;QAED,OAAO,uBAAuB,CAAC;IACjC,CAAC;IAED;;OAEG;IACI,OAAO,GAAY,KAAK,CAAC;IAEhC;;OAEG;IACI,SAAS,GAAY,KAAK,CAAC;IAElC;;OAEG;IACI,MAAM,GAAY,KAAK,CAAC;IAE/B;;;;;OAKG;IACI,QAAQ;QACb,MAAM,aAAa,GAAa,EAAE,CAAC;QACnC,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC1B,CAAC;QACD,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACnB,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC1B,CAAC;QACD,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC1B,CAAC;QACD,OAAO,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAChC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * This is a helper class to construct a string representing the resources accessible by an AccountSAS. Setting a value\n * to true means that any SAS which uses these permissions will grant access to that resource type. Once all the\n * values are set, this should be serialized with toString and set as the resources field on an\n * {@link AccountSASSignatureValues} object. It is possible to construct the resources string without this class, but\n * the order of the resources is particular and this class guarantees correctness.\n */\nexport class AccountSASResourceTypes {\n /**\n * Creates an {@link AccountSASResourceTypes} from the specified resource types string. This method will throw an\n * Error if it encounters a character that does not correspond to a valid resource type.\n *\n * @param resourceTypes -\n */\n public static parse(resourceTypes: string): AccountSASResourceTypes {\n const accountSASResourceTypes = new AccountSASResourceTypes();\n\n for (const c of resourceTypes) {\n switch (c) {\n case \"s\":\n accountSASResourceTypes.service = true;\n break;\n case \"c\":\n accountSASResourceTypes.container = true;\n break;\n case \"o\":\n accountSASResourceTypes.object = true;\n break;\n default:\n throw new RangeError(`Invalid resource type: ${c}`);\n }\n }\n\n return accountSASResourceTypes;\n }\n\n /**\n * Permission to access service level APIs granted.\n */\n public service: boolean = false;\n\n /**\n * Permission to access container level APIs (Blob Containers, Tables, Queues, File Shares) granted.\n */\n public container: boolean = false;\n\n /**\n * Permission to access object level APIs (Blobs, Table Entities, Queue Messages, Files) granted.\n */\n public object: boolean = false;\n\n /**\n * Converts the given resource types to a string.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas\n *\n */\n public toString(): string {\n const resourceTypes: string[] = [];\n if (this.service) {\n resourceTypes.push(\"s\");\n }\n if (this.container) {\n resourceTypes.push(\"c\");\n }\n if (this.object) {\n resourceTypes.push(\"o\");\n }\n return resourceTypes.join(\"\");\n }\n}\n"]}
|
|
@@ -10,24 +10,6 @@
|
|
|
10
10
|
* the order of the services is particular and this class guarantees correctness.
|
|
11
11
|
*/
|
|
12
12
|
export class AccountSASServices {
|
|
13
|
-
constructor() {
|
|
14
|
-
/**
|
|
15
|
-
* Permission to access blob resources granted.
|
|
16
|
-
*/
|
|
17
|
-
this.blob = false;
|
|
18
|
-
/**
|
|
19
|
-
* Permission to access file resources granted.
|
|
20
|
-
*/
|
|
21
|
-
this.file = false;
|
|
22
|
-
/**
|
|
23
|
-
* Permission to access queue resources granted.
|
|
24
|
-
*/
|
|
25
|
-
this.queue = false;
|
|
26
|
-
/**
|
|
27
|
-
* Permission to access table resources granted.
|
|
28
|
-
*/
|
|
29
|
-
this.table = false;
|
|
30
|
-
}
|
|
31
13
|
/**
|
|
32
14
|
* Creates an {@link AccountSASServices} from the specified services string. This method will throw an
|
|
33
15
|
* Error if it encounters a character that does not correspond to a valid service.
|
|
@@ -56,6 +38,22 @@ export class AccountSASServices {
|
|
|
56
38
|
}
|
|
57
39
|
return accountSASServices;
|
|
58
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* Permission to access blob resources granted.
|
|
43
|
+
*/
|
|
44
|
+
blob = false;
|
|
45
|
+
/**
|
|
46
|
+
* Permission to access file resources granted.
|
|
47
|
+
*/
|
|
48
|
+
file = false;
|
|
49
|
+
/**
|
|
50
|
+
* Permission to access queue resources granted.
|
|
51
|
+
*/
|
|
52
|
+
queue = false;
|
|
53
|
+
/**
|
|
54
|
+
* Permission to access table resources granted.
|
|
55
|
+
*/
|
|
56
|
+
table = false;
|
|
59
57
|
/**
|
|
60
58
|
* Converts the given services to a string.
|
|
61
59
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountSASServices.js","sourceRoot":"","sources":["../../src/AccountSASServices.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;;;GAQG;AACH,MAAM,OAAO,kBAAkB;
|
|
1
|
+
{"version":3,"file":"AccountSASServices.js","sourceRoot":"","sources":["../../src/AccountSASServices.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;;;GAQG;AACH,MAAM,OAAO,kBAAkB;IAC7B;;;;;OAKG;IACI,MAAM,CAAC,KAAK,CAAC,QAAgB;QAClC,MAAM,kBAAkB,GAAG,IAAI,kBAAkB,EAAE,CAAC;QAEpD,KAAK,MAAM,CAAC,IAAI,QAAQ,EAAE,CAAC;YACzB,QAAQ,CAAC,EAAE,CAAC;gBACV,KAAK,GAAG;oBACN,kBAAkB,CAAC,IAAI,GAAG,IAAI,CAAC;oBAC/B,MAAM;gBACR,KAAK,GAAG;oBACN,kBAAkB,CAAC,IAAI,GAAG,IAAI,CAAC;oBAC/B,MAAM;gBACR,KAAK,GAAG;oBACN,kBAAkB,CAAC,KAAK,GAAG,IAAI,CAAC;oBAChC,MAAM;gBACR,KAAK,GAAG;oBACN,kBAAkB,CAAC,KAAK,GAAG,IAAI,CAAC;oBAChC,MAAM;gBACR;oBACE,MAAM,IAAI,UAAU,CAAC,8BAA8B,CAAC,EAAE,CAAC,CAAC;YAC5D,CAAC;QACH,CAAC;QAED,OAAO,kBAAkB,CAAC;IAC5B,CAAC;IAED;;OAEG;IACI,IAAI,GAAY,KAAK,CAAC;IAE7B;;OAEG;IACI,IAAI,GAAY,KAAK,CAAC;IAE7B;;OAEG;IACI,KAAK,GAAY,KAAK,CAAC;IAE9B;;OAEG;IACI,KAAK,GAAY,KAAK,CAAC;IAE9B;;;OAGG;IACI,QAAQ;QACb,MAAM,QAAQ,GAAa,EAAE,CAAC;QAC9B,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACrB,CAAC;QACD,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACrB,CAAC;QACD,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACrB,CAAC;QACD,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACrB,CAAC;QACD,OAAO,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC3B,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * This is a helper class to construct a string representing the services accessible by an AccountSAS. Setting a value\n * to true means that any SAS which uses these permissions will grant access to that service. Once all the\n * values are set, this should be serialized with toString and set as the services field on an\n * {@link AccountSASSignatureValues} object. It is possible to construct the services string without this class, but\n * the order of the services is particular and this class guarantees correctness.\n */\nexport class AccountSASServices {\n /**\n * Creates an {@link AccountSASServices} from the specified services string. This method will throw an\n * Error if it encounters a character that does not correspond to a valid service.\n *\n * @param services -\n */\n public static parse(services: string): AccountSASServices {\n const accountSASServices = new AccountSASServices();\n\n for (const c of services) {\n switch (c) {\n case \"b\":\n accountSASServices.blob = true;\n break;\n case \"f\":\n accountSASServices.file = true;\n break;\n case \"q\":\n accountSASServices.queue = true;\n break;\n case \"t\":\n accountSASServices.table = true;\n break;\n default:\n throw new RangeError(`Invalid service character: ${c}`);\n }\n }\n\n return accountSASServices;\n }\n\n /**\n * Permission to access blob resources granted.\n */\n public blob: boolean = false;\n\n /**\n * Permission to access file resources granted.\n */\n public file: boolean = false;\n\n /**\n * Permission to access queue resources granted.\n */\n public queue: boolean = false;\n\n /**\n * Permission to access table resources granted.\n */\n public table: boolean = false;\n\n /**\n * Converts the given services to a string.\n *\n */\n public toString(): string {\n const services: string[] = [];\n if (this.blob) {\n services.push(\"b\");\n }\n if (this.table) {\n services.push(\"t\");\n }\n if (this.queue) {\n services.push(\"q\");\n }\n if (this.file) {\n services.push(\"f\");\n }\n return services.join(\"\");\n }\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AccountSASPermissions } from "./AccountSASPermissions.js";
|
|
2
|
-
import type { StorageSharedKeyCredential } from "@azure/storage-
|
|
2
|
+
import type { StorageSharedKeyCredential } from "@azure/storage-common";
|
|
3
3
|
import type { SasIPRange } from "./SasIPRange.js";
|
|
4
4
|
import type { SASProtocol } from "./SASQueryParameters.js";
|
|
5
5
|
import { SASQueryParameters } from "./SASQueryParameters.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountSASSignatureValues.d.ts","sourceRoot":"","sources":["../../src/AccountSASSignatureValues.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAGnE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"AccountSASSignatureValues.d.ts","sourceRoot":"","sources":["../../src/AccountSASSignatureValues.ts"],"names":[],"mappings":"AA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,CAAC,OAAO,CAClC;QACD,YAAY,EAAE,YAAY;KAC3B,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { AccountSASPermissions } from \"./AccountSASPermissions.js\";\nimport { AccountSASResourceTypes } from \"./AccountSASResourceTypes.js\";\nimport { AccountSASServices } from \"./AccountSASServices.js\";\nimport type { StorageSharedKeyCredential } from \"@azure/storage-
|
|
1
|
+
{"version":3,"file":"AccountSASSignatureValues.js","sourceRoot":"","sources":["../../src/AccountSASSignatureValues.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG7D,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AA8D/D;;;;;;;;;;GAUG;AACH,MAAM,UAAU,iCAAiC,CAC/C,yBAAoD,EACpD,mBAA+C;IAE/C,OAAO,yCAAyC,CAAC,yBAAyB,EAAE,mBAAmB,CAAC;SAC7F,kBAAkB,CAAC;AACxB,CAAC;AAED,MAAM,UAAU,yCAAyC,CACvD,yBAAoD,EACpD,mBAA+C;IAE/C,MAAM,OAAO,GAAG,yBAAyB,CAAC,OAAO;QAC/C,CAAC,CAAC,yBAAyB,CAAC,OAAO;QACnC,CAAC,CAAC,eAAe,CAAC;IAEpB,MAAM,iBAAiB,GAAG,qBAAqB,CAAC,KAAK,CACnD,yBAAyB,CAAC,WAAW,CAAC,QAAQ,EAAE,CACjD,CAAC,QAAQ,EAAE,CAAC;IACb,M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,CAAC,EAAE;YAC3F,yBAAyB,CAAC,QAAQ,CAAC,CAAC,CAAC,yBAAyB,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;YAC5E,OAAO;YACP,EAAE,EAAE,uDAAuD;SAC5D,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACf,CAAC;IAED,MAAM,SAAS,GAAW,mBAAmB,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC;IAE9E,OAAO;QACL,kBAAkB,EAAE,IAAI,kBAAkB,CACxC,OAAO,EACP,SAAS,EACT,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACnB,yBAAyB,CAAC,QAAQ,EAClC,yBAAyB,CAAC,QAAQ,EAClC,yBAAyB,CAAC,SAAS,EACnC,yBAAyB,CAAC,OAAO,CAClC;QACD,YAAY,EAAE,YAAY;KAC3B,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { AccountSASPermissions } from \"./AccountSASPermissions.js\";\nimport { AccountSASResourceTypes } from \"./AccountSASResourceTypes.js\";\nimport { AccountSASServices } from \"./AccountSASServices.js\";\nimport type { StorageSharedKeyCredential } from \"@azure/storage-common\";\nimport type { SasIPRange } from \"./SasIPRange.js\";\nimport { ipRangeToString } from \"./SasIPRange.js\";\nimport type { SASProtocol } from \"./SASQueryParameters.js\";\nimport { SASQueryParameters } from \"./SASQueryParameters.js\";\nimport { SERVICE_VERSION } from \"./utils/constants.js\";\nimport { truncatedISO8061Date } from \"./utils/utils.common.js\";\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * AccountSASSignatureValues is used to generate a Shared Access Signature (SAS) for an Azure Storage account. Once\n * all the values here are set appropriately, call generateSASQueryParameters() to obtain a representation of the SAS\n * which can actually be applied to queue urls. Note: that both this class and {@link SASQueryParameters} exist because\n * the former is mutable and a logical representation while the latter is immutable and used to generate actual REST\n * requests.\n *\n * @see https://learn.microsoft.com/azure/storage/common/storage-dotnet-shared-access-signature-part-1\n * for more conceptual information on SAS\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas\n * for descriptions of the parameters, including which are required\n */\nexport interface AccountSASSignatureValues {\n /**\n * If not provided, this defaults to the service version targeted by this version of the library.\n */\n version?: string;\n\n /**\n * Optional. SAS protocols allowed.\n */\n protocol?: SASProtocol;\n\n /**\n * Optional. When the SAS will take effect.\n */\n startsOn?: Date;\n\n /**\n * The time after which the SAS will no longer work.\n */\n expiresOn: Date;\n\n /**\n * Specifies which operations the SAS user may perform. Please refer to {@link AccountSASPermissions} for help\n * constructing the permissions string.\n */\n permissions: AccountSASPermissions;\n\n /**\n * Optional. IP range allowed.\n */\n ipRange?: SasIPRange;\n\n /**\n * The values that indicate the services accessible with this SAS. Please refer to {@link AccountSASServices} to\n * construct this value.\n */\n services: string;\n\n /**\n * The values that indicate the resource types accessible with this SAS. Please refer\n * to {@link AccountSASResourceTypes} to construct this value.\n */\n resourceTypes: string;\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Generates a {@link SASQueryParameters} object which contains all SAS query parameters needed to make an actual\n * REST request.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas\n *\n * @param accountSASSignatureValues - SAS Signature values of the account\n * @param sharedKeyCredential - Shared key credential.\n */\nexport function generateAccountSASQueryParameters(\n accountSASSignatureValues: AccountSASSignatureValues,\n sharedKeyCredential: StorageSharedKeyCredential,\n): SASQueryParameters {\n return generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential)\n .sasQueryParameters;\n}\n\nexport function generateAccountSASQueryParametersInternal(\n accountSASSignatureValues: AccountSASSignatureValues,\n sharedKeyCredential: StorageSharedKeyCredential,\n): { sasQueryParameters: SASQueryParameters; stringToSign: string } {\n const version = accountSASSignatureValues.version\n ? accountSASSignatureValues.version\n : SERVICE_VERSION;\n\n const parsedPermissions = AccountSASPermissions.parse(\n accountSASSignatureValues.permissions.toString(),\n ).toString();\n const parsedServices = AccountSASServices.parse(accountSASSignatureValues.services).toString();\n const parsedResourceTypes = AccountSASResourceTypes.parse(\n accountSASSignatureValues.resourceTypes,\n ).toString();\n\n let stringToSign: string;\n\n if (version >= \"2020-12-06\") {\n stringToSign = [\n sharedKeyCredential.accountName,\n parsedPermissions,\n parsedServices,\n parsedResourceTypes,\n accountSASSignatureValues.startsOn\n ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false)\n : \"\",\n truncatedISO8061Date(accountSASSignatureValues.expiresOn, false),\n accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : \"\",\n accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : \"\",\n version,\n \"\", // Reserved for encryption scope\n \"\", // Account SAS requires an additional newline character\n ].join(\"\\n\");\n } else {\n stringToSign = [\n sharedKeyCredential.accountName,\n parsedPermissions,\n parsedServices,\n parsedResourceTypes,\n accountSASSignatureValues.startsOn\n ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false)\n : \"\",\n truncatedISO8061Date(accountSASSignatureValues.expiresOn, false),\n accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : \"\",\n accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : \"\",\n version,\n \"\", // Account SAS requires an additional newline character\n ].join(\"\\n\");\n }\n\n const signature: string = sharedKeyCredential.computeHMACSHA256(stringToSign);\n\n return {\n sasQueryParameters: new SASQueryParameters(\n version,\n signature,\n parsedPermissions,\n parsedServices,\n parsedResourceTypes,\n accountSASSignatureValues.protocol,\n accountSASSignatureValues.startsOn,\n accountSASSignatureValues.expiresOn,\n accountSASSignatureValues.ipRange,\n ),\n stringToSign: stringToSign,\n };\n}\n"]}
|
|
@@ -3,9 +3,8 @@ import { CompatResponse as HttpOperationResponse, RequestPolicy as IHttpClient,
|
|
|
3
3
|
import type { ProxySettings as ProxyOptions, UserAgentPolicyOptions as UserAgentOptions } from "@azure/core-rest-pipeline";
|
|
4
4
|
import { RequestBodyType as HttpRequestBody } from "@azure/core-rest-pipeline";
|
|
5
5
|
import type { TokenCredential } from "@azure/core-auth";
|
|
6
|
-
import type { StorageRetryOptions } from "@azure/storage-
|
|
7
|
-
import { StorageSharedKeyCredential } from "@azure/storage-
|
|
8
|
-
import { AnonymousCredential } from "@azure/storage-blob";
|
|
6
|
+
import type { StorageRetryOptions } from "@azure/storage-common";
|
|
7
|
+
import { StorageSharedKeyCredential, AnonymousCredential } from "@azure/storage-common";
|
|
9
8
|
import { StorageOAuthScopes } from "./utils/constants.js";
|
|
10
9
|
export { StorageOAuthScopes, IHttpClient, HttpHeaders, HttpRequestBody, HttpOperationResponse, WebResource, RequestPolicyFactory, RequestPolicy, RequestPolicyOptions, };
|
|
11
10
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pipeline.d.ts","sourceRoot":"","sources":["../../src/Pipeline.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,gBAAgB,EAChB,4BAA4B,EAE7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,cAAc,IAAI,qBAAqB,EACvC,aAAa,IAAI,WAAW,EAC5B,eAAe,IAAI,WAAW,EAC9B,aAAa,EACb,oBAAoB,EACpB,wBAAwB,IAAI,oBAAoB,EAChD,eAAe,IAAI,WAAW,EAG/B,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACV,aAAa,IAAI,YAAY,EAC7B,sBAAsB,IAAI,gBAAgB,EAI3C,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,eAAe,IAAI,eAAe,EAGnC,MAAM,2BAA2B,CAAC;AAGnC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAIxD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Pipeline.d.ts","sourceRoot":"","sources":["../../src/Pipeline.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,gBAAgB,EAChB,4BA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
|
|
3
|
-
import { __rest } from "tslib";
|
|
4
3
|
import { convertHttpClient, createRequestPolicyFactoryPolicy, } from "@azure/core-http-compat";
|
|
5
4
|
import { bearerTokenAuthenticationPolicy, decompressResponsePolicyName, } from "@azure/core-rest-pipeline";
|
|
6
5
|
import { authorizeRequestOnTenantChallenge, createClientPipeline } from "@azure/core-client";
|
|
7
6
|
import { parseXML, stringifyXML } from "@azure/core-xml";
|
|
8
7
|
import { isTokenCredential } from "@azure/core-auth";
|
|
9
8
|
import { logger } from "./log.js";
|
|
10
|
-
import { StorageRetryPolicyFactory } from "@azure/storage-
|
|
11
|
-
import { StorageSharedKeyCredential } from "@azure/storage-blob";
|
|
12
|
-
import { AnonymousCredential } from "@azure/storage-blob";
|
|
9
|
+
import { StorageRetryPolicyFactory, StorageSharedKeyCredential, AnonymousCredential, getCachedDefaultHttpClient, storageBrowserPolicy, storageRetryPolicy, storageSharedKeyCredentialPolicy, StorageBrowserPolicyFactory, storageCorrectContentLengthPolicy, storageRequestFailureDetailsParserPolicy, } from "@azure/storage-common";
|
|
13
10
|
import { StorageOAuthScopes, StorageQueueLoggingAllowedHeaderNames, StorageQueueLoggingAllowedQueryParameters, SDK_VERSION, } from "./utils/constants.js";
|
|
14
|
-
import { getCachedDefaultHttpClient, storageRequestFailureDetailsParserPolicy, } from "@azure/storage-common";
|
|
15
|
-
import { storageBrowserPolicy } from "@azure/storage-blob";
|
|
16
|
-
import { storageRetryPolicy } from "@azure/storage-blob";
|
|
17
|
-
import { storageSharedKeyCredentialPolicy } from "@azure/storage-blob";
|
|
18
|
-
import { StorageBrowserPolicyFactory } from "@azure/storage-blob";
|
|
19
|
-
import { storageCorrectContentLengthPolicy } from "@azure/storage-blob";
|
|
20
11
|
// Export following interfaces and types for customers who want to implement their
|
|
21
12
|
// own RequestPolicy or HTTPClient
|
|
22
13
|
export { StorageOAuthScopes, };
|
|
@@ -43,6 +34,14 @@ export function isPipelineLike(pipeline) {
|
|
|
43
34
|
* customized Pipeline.
|
|
44
35
|
*/
|
|
45
36
|
export class Pipeline {
|
|
37
|
+
/**
|
|
38
|
+
* A list of chained request policy factories.
|
|
39
|
+
*/
|
|
40
|
+
factories;
|
|
41
|
+
/**
|
|
42
|
+
* Configures pipeline logger and HTTP client.
|
|
43
|
+
*/
|
|
44
|
+
options;
|
|
46
45
|
/**
|
|
47
46
|
* Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface.
|
|
48
47
|
*
|
|
@@ -107,8 +106,7 @@ function processDownlevelPipeline(pipeline) {
|
|
|
107
106
|
return undefined;
|
|
108
107
|
}
|
|
109
108
|
export function getCoreClientOptions(pipeline) {
|
|
110
|
-
|
|
111
|
-
const _b = pipeline.options, { httpClient: v1Client } = _b, restOptions = __rest(_b, ["httpClient"]);
|
|
109
|
+
const { httpClient: v1Client, ...restOptions } = pipeline.options;
|
|
112
110
|
let httpClient = pipeline._coreHttpClient;
|
|
113
111
|
if (!httpClient) {
|
|
114
112
|
httpClient = v1Client ? convertHttpClient(v1Client) : getCachedDefaultHttpClient();
|
|
@@ -120,13 +118,17 @@ export function getCoreClientOptions(pipeline) {
|
|
|
120
118
|
const userAgentPrefix = restOptions.userAgentOptions && restOptions.userAgentOptions.userAgentPrefix
|
|
121
119
|
? `${restOptions.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
122
120
|
: `${packageDetails}`;
|
|
123
|
-
corePipeline = createClientPipeline(
|
|
121
|
+
corePipeline = createClientPipeline({
|
|
122
|
+
...restOptions,
|
|
123
|
+
loggingOptions: {
|
|
124
124
|
additionalAllowedHeaderNames: StorageQueueLoggingAllowedHeaderNames,
|
|
125
125
|
additionalAllowedQueryParameters: StorageQueueLoggingAllowedQueryParameters,
|
|
126
126
|
logger: logger.info,
|
|
127
|
-
},
|
|
127
|
+
},
|
|
128
|
+
userAgentOptions: {
|
|
128
129
|
userAgentPrefix,
|
|
129
|
-
},
|
|
130
|
+
},
|
|
131
|
+
serializationOptions: {
|
|
130
132
|
stringifyXML,
|
|
131
133
|
serializerOptions: {
|
|
132
134
|
xml: {
|
|
@@ -135,7 +137,8 @@ export function getCoreClientOptions(pipeline) {
|
|
|
135
137
|
xmlCharKey: "#",
|
|
136
138
|
},
|
|
137
139
|
},
|
|
138
|
-
},
|
|
140
|
+
},
|
|
141
|
+
deserializationOptions: {
|
|
139
142
|
parseXML,
|
|
140
143
|
serializerOptions: {
|
|
141
144
|
xml: {
|
|
@@ -144,7 +147,8 @@ export function getCoreClientOptions(pipeline) {
|
|
|
144
147
|
xmlCharKey: "#",
|
|
145
148
|
},
|
|
146
149
|
},
|
|
147
|
-
}
|
|
150
|
+
},
|
|
151
|
+
});
|
|
148
152
|
corePipeline.removePolicy({ phase: "Retry" });
|
|
149
153
|
corePipeline.removePolicy({ name: decompressResponsePolicyName });
|
|
150
154
|
corePipeline.addPolicy(storageCorrectContentLengthPolicy());
|
|
@@ -159,7 +163,7 @@ export function getCoreClientOptions(pipeline) {
|
|
|
159
163
|
if (isTokenCredential(credential)) {
|
|
160
164
|
corePipeline.addPolicy(bearerTokenAuthenticationPolicy({
|
|
161
165
|
credential,
|
|
162
|
-
scopes:
|
|
166
|
+
scopes: restOptions.audience ?? StorageOAuthScopes,
|
|
163
167
|
challengeCallbacks: { authorizeRequestOnChallenge: authorizeRequestOnTenantChallenge },
|
|
164
168
|
}), { phase: "Sign" });
|
|
165
169
|
}
|
|
@@ -171,7 +175,12 @@ export function getCoreClientOptions(pipeline) {
|
|
|
171
175
|
}
|
|
172
176
|
pipeline._corePipeline = corePipeline;
|
|
173
177
|
}
|
|
174
|
-
return
|
|
178
|
+
return {
|
|
179
|
+
...restOptions,
|
|
180
|
+
allowInsecureConnection: true,
|
|
181
|
+
httpClient,
|
|
182
|
+
pipeline: corePipeline,
|
|
183
|
+
};
|
|
175
184
|
}
|
|
176
185
|
export function getCredentialFromPipeline(pipeline) {
|
|
177
186
|
// see if we squirreled one away on the type itself
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"P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iBAAiB;QACjB,uBAAuB;KACxB,CAAC;IAEF,MAAM,cAAc,GAAgB;QAClC,WAAW,EAAE,KAAK,EAAE,OAAoB,EAAE,EAAE;YAC1C,OAAO;gBACL,OAAO;gBACP,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE;gBAChC,MAAM,EAAE,GAAG;aACZ,CAAC;QACJ,CAAC;KACF,CAAC;IACF,MAAM,wBAAwB,GAAyB;QACrD,GAAG,CAAC,SAA+B,EAAE,QAAgB;YACnD,gBAAgB;QAClB,CAAC;QACD,SAAS,CAAC,SAA+B;YACvC,OAAO,KAAK,CAAC;QACf,CAAC;KACF,CAAC;IACF,MAAM,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,wBAAwB,CAAC,CAAC;IAChF,MAAM,UAAU,GAAG,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC;IACnD,6EAA6E;IAC7E,OAAO,aAAa,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,EAAE;QAC5C,OAAO,UAAU,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;IAChD,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n KeepAliveOptions,\n ExtendedServiceClientOptions,\n HttpPipelineLogLevel,\n} from \"@azure/core-http-compat\";\nimport {\n CompatResponse as HttpOperationResponse,\n RequestPolicy as IHttpClient,\n HttpHeadersLike as HttpHeaders,\n RequestPolicy,\n RequestPolicyFactory,\n RequestPolicyOptionsLike as RequestPolicyOptions,\n WebResourceLike as WebResource,\n convertHttpClient,\n createRequestPolicyFactoryPolicy,\n} from \"@azure/core-http-compat\";\nimport type {\n ProxySettings as ProxyOptions,\n UserAgentPolicyOptions as UserAgentOptions,\n Pipeline as CorePipeline,\n PipelinePolicy,\n HttpClient,\n} from \"@azure/core-rest-pipeline\";\nimport {\n RequestBodyType as HttpRequestBody,\n bearerTokenAuthenticationPolicy,\n decompressResponsePolicyName,\n} from \"@azure/core-rest-pipeline\";\nimport { authorizeRequestOnTenantChallenge, createClientPipeline } from \"@azure/core-client\";\nimport { parseXML, stringifyXML } from \"@azure/core-xml\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\n\nimport { logger } from \"./log.js\";\nimport type { StorageRetryOptions } from \"@azure/storage-blob\";\nimport { StorageRetryPolicyFactory } from \"@azure/storage-blob\";\nimport { StorageSharedKeyCredential } from \"@azure/storage-blob\";\nimport { AnonymousCredential } from \"@azure/storage-blob\";\nimport {\n StorageOAuthScopes,\n StorageQueueLoggingAllowedHeaderNames,\n StorageQueueLoggingAllowedQueryParameters,\n SDK_VERSION,\n} from \"./utils/constants.js\";\nimport {\n getCachedDefaultHttpClient,\n storageRequestFailureDetailsParserPolicy,\n} from \"@azure/storage-common\";\nimport { storageBrowserPolicy } from \"@azure/storage-blob\";\nimport { storageRetryPolicy } from \"@azure/storage-blob\";\nimport { storageSharedKeyCredentialPolicy } from \"@azure/storage-blob\";\nimport { StorageBrowserPolicyFactory } from \"@azure/storage-blob\";\nimport { storageCorrectContentLengthPolicy } from \"@azure/storage-blob\";\n\n// Export following interfaces and types for customers who want to implement their\n// own RequestPolicy or HTTPClient\nexport {\n StorageOAuthScopes,\n IHttpClient,\n HttpHeaders,\n HttpRequestBody,\n HttpOperationResponse,\n WebResource,\n RequestPolicyFactory,\n RequestPolicy,\n RequestPolicyOptions,\n};\n\n/**\n * A subset of `@azure/core-http` ServiceClientOptions\n */\nexport interface ServiceClientOptions {\n /**\n * Optional. Configures the HTTP client to send requests and receive responses.\n */\n httpClient?: IHttpClient;\n /**\n * Optional. Overrides the default policy factories.\n */\n requestPolicyFactories?:\n | RequestPolicyFactory[]\n | ((defaultRequestPolicyFactories: RequestPolicyFactory[]) => void | RequestPolicyFactory[]);\n}\n\n/**\n * Option interface for Pipeline constructor.\n */\nexport interface PipelineOptions {\n /**\n * Optional. Configures the HTTP client to send requests and receive responses.\n */\n httpClient?: IHttpClient;\n}\n\n/**\n * An interface for the {@link Pipeline} class containing HTTP request policies.\n * You can create a default Pipeline by calling {@link newPipeline}.\n * Or you can create a Pipeline with your own policies by the constructor of Pipeline.\n *\n * Refer to {@link newPipeline} and provided policies before implementing your\n * customized Pipeline.\n */\nexport interface PipelineLike {\n /**\n * A list of chained request policy factories.\n */\n readonly factories: RequestPolicyFactory[];\n /**\n * Configures pipeline logger and HTTP client.\n */\n readonly options: PipelineOptions;\n /**\n * Transfer Pipeline object to ServiceClientOptions object which is required by\n * ServiceClient constructor.\n *\n * @returns The ServiceClientOptions object from this Pipeline.\n */\n toServiceClientOptions(): ServiceClientOptions;\n}\n\n/**\n * A helper to decide if a given argument satisfies the Pipeline contract\n * @param pipeline - An argument that may be a Pipeline\n * @returns true when the argument satisfies the Pipeline contract\n */\nexport function isPipelineLike(pipeline: unknown): pipeline is PipelineLike {\n if (!pipeline || typeof pipeline !== \"object\") {\n return false;\n }\n\n const castPipeline = pipeline as PipelineLike;\n\n return (\n Array.isArray(castPipeline.factories) &&\n typeof castPipeline.options === \"object\" &&\n typeof castPipeline.toServiceClientOptions === \"function\"\n );\n}\n\n/**\n * A Pipeline class containing HTTP request policies.\n * You can create a default Pipeline by calling {@link newPipeline}.\n * Or you can create a Pipeline with your own policies by the constructor of Pipeline.\n *\n * Refer to {@link newPipeline} and provided policies before implementing your\n * customized Pipeline.\n */\nexport class Pipeline implements PipelineLike {\n /**\n * A list of chained request policy factories.\n */\n public readonly factories: RequestPolicyFactory[];\n /**\n * Configures pipeline logger and HTTP client.\n */\n public readonly options: PipelineOptions;\n\n /**\n * Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface.\n *\n * @param factories -\n * @param options -\n */\n constructor(factories: RequestPolicyFactory[], options: PipelineOptions = {}) {\n this.factories = factories;\n this.options = options;\n }\n\n /**\n * Transfer Pipeline object to ServiceClientOptions object which is required by\n * ServiceClient constructor.\n *\n * @returns The ServiceClientOptions object from this Pipeline.\n */\n public toServiceClientOptions(): ServiceClientOptions {\n return {\n httpClient: this.options.httpClient,\n requestPolicyFactories: this.factories,\n };\n }\n}\n\n/**\n * Options interface for the {@link newPipeline} function.\n */\nexport interface StoragePipelineOptions {\n /**\n * Options to configure a proxy for outgoing requests.\n */\n proxyOptions?: ProxyOptions;\n /**\n * Options for adding user agent details to outgoing requests.\n */\n userAgentOptions?: UserAgentOptions;\n /**\n * Configures the built-in retry policy behavior.\n */\n retryOptions?: StorageRetryOptions;\n /**\n * Keep alive configurations. Default keep-alive is enabled.\n */\n keepAliveOptions?: KeepAliveOptions;\n /**\n * Configures the HTTP client to send requests and receive responses.\n */\n httpClient?: IHttpClient;\n /**\n * The audience used to retrieve an AAD token.\n * By default, audience 'https://storage.azure.com/.default' will be used.\n */\n audience?: string;\n}\n\n/**\n * Creates a new Pipeline object with Credential provided.\n *\n * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n * @param pipelineOptions - Optional. Options.\n * @returns A new Pipeline object.\n */\nexport function newPipeline(\n credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential,\n pipelineOptions: StoragePipelineOptions = {},\n): Pipeline {\n if (!credential) {\n credential = new AnonymousCredential();\n }\n const pipeline = new Pipeline([], pipelineOptions);\n (pipeline as any)._credential = credential;\n return pipeline;\n}\n\nfunction processDownlevelPipeline(\n pipeline: PipelineLike,\n): { wrappedPolicies: PipelinePolicy; afterRetry: boolean } | undefined {\n const knownFactoryFunctions = [\n isAnonymousCredential,\n isStorageSharedKeyCredential,\n isCoreHttpBearerTokenFactory,\n isStorageBrowserPolicyFactory,\n isStorageRetryPolicyFactory,\n isStorageTelemetryPolicyFactory,\n isCoreHttpPolicyFactory,\n ];\n if (pipeline.factories.length) {\n const novelFactories = pipeline.factories.filter((factory) => {\n return !knownFactoryFunctions.some((knownFactory) => knownFactory(factory));\n });\n if (novelFactories.length) {\n const hasInjector = novelFactories.some((factory) => isInjectorPolicyFactory(factory));\n // if there are any left over, wrap in a requestPolicyFactoryPolicy\n return {\n wrappedPolicies: createRequestPolicyFactoryPolicy(novelFactories),\n afterRetry: hasInjector,\n };\n }\n }\n return undefined;\n}\n\nexport function getCoreClientOptions(pipeline: PipelineLike): ExtendedServiceClientOptions {\n const { httpClient: v1Client, ...restOptions } = pipeline.options as StoragePipelineOptions;\n\n let httpClient: HttpClient = (pipeline as any)._coreHttpClient;\n if (!httpClient) {\n httpClient = v1Client ? convertHttpClient(v1Client) : getCachedDefaultHttpClient();\n (pipeline as any)._coreHttpClient = httpClient;\n }\n\n let corePipeline: CorePipeline = (pipeline as any)._corePipeline;\n if (!corePipeline) {\n const packageDetails = `azsdk-js-azure-storage-blob/${SDK_VERSION}`;\n const userAgentPrefix =\n restOptions.userAgentOptions && restOptions.userAgentOptions.userAgentPrefix\n ? `${restOptions.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n corePipeline = createClientPipeline({\n ...restOptions,\n loggingOptions: {\n additionalAllowedHeaderNames: StorageQueueLoggingAllowedHeaderNames,\n additionalAllowedQueryParameters: StorageQueueLoggingAllowedQueryParameters,\n logger: logger.info,\n },\n userAgentOptions: {\n userAgentPrefix,\n },\n serializationOptions: {\n stringifyXML,\n serializerOptions: {\n xml: {\n // Use customized XML char key of \"#\" so we can deserialize metadata\n // with \"_\" key\n xmlCharKey: \"#\",\n },\n },\n },\n deserializationOptions: {\n parseXML,\n serializerOptions: {\n xml: {\n // Use customized XML char key of \"#\" so we can deserialize metadata\n // with \"_\" key\n xmlCharKey: \"#\",\n },\n },\n },\n });\n corePipeline.removePolicy({ phase: \"Retry\" });\n corePipeline.removePolicy({ name: decompressResponsePolicyName });\n corePipeline.addPolicy(storageCorrectContentLengthPolicy());\n corePipeline.addPolicy(storageRetryPolicy(restOptions.retryOptions), { phase: \"Retry\" });\n corePipeline.addPolicy(storageRequestFailureDetailsParserPolicy());\n corePipeline.addPolicy(storageBrowserPolicy());\n const downlevelResults = processDownlevelPipeline(pipeline);\n if (downlevelResults) {\n corePipeline.addPolicy(\n downlevelResults.wrappedPolicies,\n downlevelResults.afterRetry ? { afterPhase: \"Retry\" } : undefined,\n );\n }\n const credential = getCredentialFromPipeline(pipeline);\n if (isTokenCredential(credential)) {\n corePipeline.addPolicy(\n bearerTokenAuthenticationPolicy({\n credential,\n scopes: restOptions.audience ?? StorageOAuthScopes,\n challengeCallbacks: { authorizeRequestOnChallenge: authorizeRequestOnTenantChallenge },\n }),\n { phase: \"Sign\" },\n );\n } else if (credential instanceof StorageSharedKeyCredential) {\n corePipeline.addPolicy(\n storageSharedKeyCredentialPolicy({\n accountName: credential.accountName,\n accountKey: (credential as any).accountKey,\n }),\n { phase: \"Sign\" },\n );\n }\n (pipeline as any)._corePipeline = corePipeline;\n }\n return {\n ...restOptions,\n allowInsecureConnection: true,\n httpClient,\n pipeline: corePipeline,\n };\n}\n\nexport function getCredentialFromPipeline(\n pipeline: PipelineLike,\n): StorageSharedKeyCredential | AnonymousCredential | TokenCredential {\n // see if we squirreled one away on the type itself\n if ((pipeline as any)._credential) {\n return (pipeline as any)._credential;\n }\n // if it came from another package, loop over the factories and look for one like before\n let credential = new AnonymousCredential();\n for (const factory of pipeline.factories) {\n if (isTokenCredential((factory as any).credential)) {\n // Only works if the factory has been attached a \"credential\" property.\n // We do that in newPipeline() when using TokenCredential.\n credential = (factory as any).credential;\n } else if (isStorageSharedKeyCredential(factory)) {\n return factory;\n }\n }\n return credential;\n}\n\nfunction isStorageSharedKeyCredential(\n factory: RequestPolicyFactory,\n): factory is StorageSharedKeyCredential {\n if (factory instanceof StorageSharedKeyCredential) {\n return true;\n }\n return factory.constructor.name === \"StorageSharedKeyCredential\";\n}\n\nfunction isAnonymousCredential(factory: RequestPolicyFactory): factory is AnonymousCredential {\n if (factory instanceof AnonymousCredential) {\n return true;\n }\n return factory.constructor.name === \"AnonymousCredential\";\n}\n\nfunction isCoreHttpBearerTokenFactory(factory: RequestPolicyFactory): boolean {\n return isTokenCredential((factory as any).credential);\n}\n\nfunction isStorageBrowserPolicyFactory(\n factory: RequestPolicyFactory,\n): factory is StorageBrowserPolicyFactory {\n if (factory instanceof StorageBrowserPolicyFactory) {\n return true;\n }\n return factory.constructor.name === \"StorageBrowserPolicyFactory\";\n}\n\nfunction isStorageRetryPolicyFactory(\n factory: RequestPolicyFactory,\n): factory is StorageRetryPolicyFactory {\n if (factory instanceof StorageRetryPolicyFactory) {\n return true;\n }\n return factory.constructor.name === \"StorageRetryPolicyFactory\";\n}\n\nfunction isStorageTelemetryPolicyFactory(factory: RequestPolicyFactory): boolean {\n return factory.constructor.name === \"TelemetryPolicyFactory\";\n}\n\nfunction isInjectorPolicyFactory(factory: RequestPolicyFactory): boolean {\n return factory.constructor.name === \"InjectorPolicyFactory\";\n}\n\nfunction isCoreHttpPolicyFactory(factory: RequestPolicyFactory): boolean {\n const knownPolicies = [\n \"GenerateClientRequestIdPolicy\",\n \"TracingPolicy\",\n \"LogPolicy\",\n \"ProxyPolicy\",\n \"DisableResponseDecompressionPolicy\",\n \"KeepAlivePolicy\",\n \"DeserializationPolicy\",\n ];\n\n const mockHttpClient: IHttpClient = {\n sendRequest: async (request: WebResource) => {\n return {\n request,\n headers: request.headers.clone(),\n status: 500,\n };\n },\n };\n const mockRequestPolicyOptions: RequestPolicyOptions = {\n log(_logLevel: HttpPipelineLogLevel, _message: string): void {\n /* do nothing */\n },\n shouldLog(_logLevel: HttpPipelineLogLevel): boolean {\n return false;\n },\n };\n const policyInstance = factory.create(mockHttpClient, mockRequestPolicyOptions);\n const policyName = policyInstance.constructor.name;\n // bundlers sometimes add a custom suffix to the class name to make it unique\n return knownPolicies.some((knownPolicyName) => {\n return policyName.startsWith(knownPolicyName);\n });\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Pipeline.js","sourceRoot":"","sources":["../../src/Pipeline.ts"],"names":[],"mappings":"AAAA,uCAAuC;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ACnD,gBAAgB;QAClB,CAAC;QACD,SAAS,CAAC,SAA+B;YACvC,OAAO,KAAK,CAAC;QACf,CAAC;KACF,CAAC;IACF,MAAM,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,wBAAwB,CAAC,CAAC;IAChF,MAAM,UAAU,GAAG,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC;IACnD,6EAA6E;IAC7E,OAAO,aAAa,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,EAAE;QAC5C,OAAO,UAAU,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;IAChD,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n KeepAliveOptions,\n ExtendedServiceClientOptions,\n HttpPipelineLogLevel,\n} from \"@azure/core-http-compat\";\nimport {\n CompatResponse as HttpOperationResponse,\n RequestPolicy as IHttpClient,\n HttpHeadersLike as HttpHeaders,\n RequestPolicy,\n RequestPolicyFactory,\n RequestPolicyOptionsLike as RequestPolicyOptions,\n WebResourceLike as WebResource,\n convertHttpClient,\n createRequestPolicyFactoryPolicy,\n} from \"@azure/core-http-compat\";\nimport type {\n ProxySettings as ProxyOptions,\n UserAgentPolicyOptions as UserAgentOptions,\n Pipeline as CorePipeline,\n PipelinePolicy,\n HttpClient,\n} from \"@azure/core-rest-pipeline\";\nimport {\n RequestBodyType as HttpRequestBody,\n bearerTokenAuthenticationPolicy,\n decompressResponsePolicyName,\n} from \"@azure/core-rest-pipeline\";\nimport { authorizeRequestOnTenantChallenge, createClientPipeline } from \"@azure/core-client\";\nimport { parseXML, stringifyXML } from \"@azure/core-xml\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\n\nimport { logger } from \"./log.js\";\nimport type { StorageRetryOptions } from \"@azure/storage-common\";\nimport {\n StorageRetryPolicyFactory,\n StorageSharedKeyCredential,\n AnonymousCredential,\n getCachedDefaultHttpClient,\n storageBrowserPolicy,\n storageRetryPolicy,\n storageSharedKeyCredentialPolicy,\n StorageBrowserPolicyFactory,\n storageCorrectContentLengthPolicy,\n storageRequestFailureDetailsParserPolicy,\n} from \"@azure/storage-common\";\nimport {\n StorageOAuthScopes,\n StorageQueueLoggingAllowedHeaderNames,\n StorageQueueLoggingAllowedQueryParameters,\n SDK_VERSION,\n} from \"./utils/constants.js\";\n\n// Export following interfaces and types for customers who want to implement their\n// own RequestPolicy or HTTPClient\nexport {\n StorageOAuthScopes,\n IHttpClient,\n HttpHeaders,\n HttpRequestBody,\n HttpOperationResponse,\n WebResource,\n RequestPolicyFactory,\n RequestPolicy,\n RequestPolicyOptions,\n};\n\n/**\n * A subset of `@azure/core-http` ServiceClientOptions\n */\nexport interface ServiceClientOptions {\n /**\n * Optional. Configures the HTTP client to send requests and receive responses.\n */\n httpClient?: IHttpClient;\n /**\n * Optional. Overrides the default policy factories.\n */\n requestPolicyFactories?:\n | RequestPolicyFactory[]\n | ((defaultRequestPolicyFactories: RequestPolicyFactory[]) => void | RequestPolicyFactory[]);\n}\n\n/**\n * Option interface for Pipeline constructor.\n */\nexport interface PipelineOptions {\n /**\n * Optional. Configures the HTTP client to send requests and receive responses.\n */\n httpClient?: IHttpClient;\n}\n\n/**\n * An interface for the {@link Pipeline} class containing HTTP request policies.\n * You can create a default Pipeline by calling {@link newPipeline}.\n * Or you can create a Pipeline with your own policies by the constructor of Pipeline.\n *\n * Refer to {@link newPipeline} and provided policies before implementing your\n * customized Pipeline.\n */\nexport interface PipelineLike {\n /**\n * A list of chained request policy factories.\n */\n readonly factories: RequestPolicyFactory[];\n /**\n * Configures pipeline logger and HTTP client.\n */\n readonly options: PipelineOptions;\n /**\n * Transfer Pipeline object to ServiceClientOptions object which is required by\n * ServiceClient constructor.\n *\n * @returns The ServiceClientOptions object from this Pipeline.\n */\n toServiceClientOptions(): ServiceClientOptions;\n}\n\n/**\n * A helper to decide if a given argument satisfies the Pipeline contract\n * @param pipeline - An argument that may be a Pipeline\n * @returns true when the argument satisfies the Pipeline contract\n */\nexport function isPipelineLike(pipeline: unknown): pipeline is PipelineLike {\n if (!pipeline || typeof pipeline !== \"object\") {\n return false;\n }\n\n const castPipeline = pipeline as PipelineLike;\n\n return (\n Array.isArray(castPipeline.factories) &&\n typeof castPipeline.options === \"object\" &&\n typeof castPipeline.toServiceClientOptions === \"function\"\n );\n}\n\n/**\n * A Pipeline class containing HTTP request policies.\n * You can create a default Pipeline by calling {@link newPipeline}.\n * Or you can create a Pipeline with your own policies by the constructor of Pipeline.\n *\n * Refer to {@link newPipeline} and provided policies before implementing your\n * customized Pipeline.\n */\nexport class Pipeline implements PipelineLike {\n /**\n * A list of chained request policy factories.\n */\n public readonly factories: RequestPolicyFactory[];\n /**\n * Configures pipeline logger and HTTP client.\n */\n public readonly options: PipelineOptions;\n\n /**\n * Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface.\n *\n * @param factories -\n * @param options -\n */\n constructor(factories: RequestPolicyFactory[], options: PipelineOptions = {}) {\n this.factories = factories;\n this.options = options;\n }\n\n /**\n * Transfer Pipeline object to ServiceClientOptions object which is required by\n * ServiceClient constructor.\n *\n * @returns The ServiceClientOptions object from this Pipeline.\n */\n public toServiceClientOptions(): ServiceClientOptions {\n return {\n httpClient: this.options.httpClient,\n requestPolicyFactories: this.factories,\n };\n }\n}\n\n/**\n * Options interface for the {@link newPipeline} function.\n */\nexport interface StoragePipelineOptions {\n /**\n * Options to configure a proxy for outgoing requests.\n */\n proxyOptions?: ProxyOptions;\n /**\n * Options for adding user agent details to outgoing requests.\n */\n userAgentOptions?: UserAgentOptions;\n /**\n * Configures the built-in retry policy behavior.\n */\n retryOptions?: StorageRetryOptions;\n /**\n * Keep alive configurations. Default keep-alive is enabled.\n */\n keepAliveOptions?: KeepAliveOptions;\n /**\n * Configures the HTTP client to send requests and receive responses.\n */\n httpClient?: IHttpClient;\n /**\n * The audience used to retrieve an AAD token.\n * By default, audience 'https://storage.azure.com/.default' will be used.\n */\n audience?: string;\n}\n\n/**\n * Creates a new Pipeline object with Credential provided.\n *\n * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n * @param pipelineOptions - Optional. Options.\n * @returns A new Pipeline object.\n */\nexport function newPipeline(\n credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential,\n pipelineOptions: StoragePipelineOptions = {},\n): Pipeline {\n if (!credential) {\n credential = new AnonymousCredential();\n }\n const pipeline = new Pipeline([], pipelineOptions);\n (pipeline as any)._credential = credential;\n return pipeline;\n}\n\nfunction processDownlevelPipeline(\n pipeline: PipelineLike,\n): { wrappedPolicies: PipelinePolicy; afterRetry: boolean } | undefined {\n const knownFactoryFunctions = [\n isAnonymousCredential,\n isStorageSharedKeyCredential,\n isCoreHttpBearerTokenFactory,\n isStorageBrowserPolicyFactory,\n isStorageRetryPolicyFactory,\n isStorageTelemetryPolicyFactory,\n isCoreHttpPolicyFactory,\n ];\n if (pipeline.factories.length) {\n const novelFactories = pipeline.factories.filter((factory) => {\n return !knownFactoryFunctions.some((knownFactory) => knownFactory(factory));\n });\n if (novelFactories.length) {\n const hasInjector = novelFactories.some((factory) => isInjectorPolicyFactory(factory));\n // if there are any left over, wrap in a requestPolicyFactoryPolicy\n return {\n wrappedPolicies: createRequestPolicyFactoryPolicy(novelFactories),\n afterRetry: hasInjector,\n };\n }\n }\n return undefined;\n}\n\nexport function getCoreClientOptions(pipeline: PipelineLike): ExtendedServiceClientOptions {\n const { httpClient: v1Client, ...restOptions } = pipeline.options as StoragePipelineOptions;\n\n let httpClient: HttpClient = (pipeline as any)._coreHttpClient;\n if (!httpClient) {\n httpClient = v1Client ? convertHttpClient(v1Client) : getCachedDefaultHttpClient();\n (pipeline as any)._coreHttpClient = httpClient;\n }\n\n let corePipeline: CorePipeline = (pipeline as any)._corePipeline;\n if (!corePipeline) {\n const packageDetails = `azsdk-js-azure-storage-blob/${SDK_VERSION}`;\n const userAgentPrefix =\n restOptions.userAgentOptions && restOptions.userAgentOptions.userAgentPrefix\n ? `${restOptions.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n corePipeline = createClientPipeline({\n ...restOptions,\n loggingOptions: {\n additionalAllowedHeaderNames: StorageQueueLoggingAllowedHeaderNames,\n additionalAllowedQueryParameters: StorageQueueLoggingAllowedQueryParameters,\n logger: logger.info,\n },\n userAgentOptions: {\n userAgentPrefix,\n },\n serializationOptions: {\n stringifyXML,\n serializerOptions: {\n xml: {\n // Use customized XML char key of \"#\" so we can deserialize metadata\n // with \"_\" key\n xmlCharKey: \"#\",\n },\n },\n },\n deserializationOptions: {\n parseXML,\n serializerOptions: {\n xml: {\n // Use customized XML char key of \"#\" so we can deserialize metadata\n // with \"_\" key\n xmlCharKey: \"#\",\n },\n },\n },\n });\n corePipeline.removePolicy({ phase: \"Retry\" });\n corePipeline.removePolicy({ name: decompressResponsePolicyName });\n corePipeline.addPolicy(storageCorrectContentLengthPolicy());\n corePipeline.addPolicy(storageRetryPolicy(restOptions.retryOptions), { phase: \"Retry\" });\n corePipeline.addPolicy(storageRequestFailureDetailsParserPolicy());\n corePipeline.addPolicy(storageBrowserPolicy());\n const downlevelResults = processDownlevelPipeline(pipeline);\n if (downlevelResults) {\n corePipeline.addPolicy(\n downlevelResults.wrappedPolicies,\n downlevelResults.afterRetry ? { afterPhase: \"Retry\" } : undefined,\n );\n }\n const credential = getCredentialFromPipeline(pipeline);\n if (isTokenCredential(credential)) {\n corePipeline.addPolicy(\n bearerTokenAuthenticationPolicy({\n credential,\n scopes: restOptions.audience ?? StorageOAuthScopes,\n challengeCallbacks: { authorizeRequestOnChallenge: authorizeRequestOnTenantChallenge },\n }),\n { phase: \"Sign\" },\n );\n } else if (credential instanceof StorageSharedKeyCredential) {\n corePipeline.addPolicy(\n storageSharedKeyCredentialPolicy({\n accountName: credential.accountName,\n accountKey: (credential as any).accountKey,\n }),\n { phase: \"Sign\" },\n );\n }\n (pipeline as any)._corePipeline = corePipeline;\n }\n return {\n ...restOptions,\n allowInsecureConnection: true,\n httpClient,\n pipeline: corePipeline,\n };\n}\n\nexport function getCredentialFromPipeline(\n pipeline: PipelineLike,\n): StorageSharedKeyCredential | AnonymousCredential | TokenCredential {\n // see if we squirreled one away on the type itself\n if ((pipeline as any)._credential) {\n return (pipeline as any)._credential;\n }\n // if it came from another package, loop over the factories and look for one like before\n let credential = new AnonymousCredential();\n for (const factory of pipeline.factories) {\n if (isTokenCredential((factory as any).credential)) {\n // Only works if the factory has been attached a \"credential\" property.\n // We do that in newPipeline() when using TokenCredential.\n credential = (factory as any).credential;\n } else if (isStorageSharedKeyCredential(factory)) {\n return factory;\n }\n }\n return credential;\n}\n\nfunction isStorageSharedKeyCredential(\n factory: RequestPolicyFactory,\n): factory is StorageSharedKeyCredential {\n if (factory instanceof StorageSharedKeyCredential) {\n return true;\n }\n return factory.constructor.name === \"StorageSharedKeyCredential\";\n}\n\nfunction isAnonymousCredential(factory: RequestPolicyFactory): factory is AnonymousCredential {\n if (factory instanceof AnonymousCredential) {\n return true;\n }\n return factory.constructor.name === \"AnonymousCredential\";\n}\n\nfunction isCoreHttpBearerTokenFactory(factory: RequestPolicyFactory): boolean {\n return isTokenCredential((factory as any).credential);\n}\n\nfunction isStorageBrowserPolicyFactory(\n factory: RequestPolicyFactory,\n): factory is StorageBrowserPolicyFactory {\n if (factory instanceof StorageBrowserPolicyFactory) {\n return true;\n }\n return factory.constructor.name === \"StorageBrowserPolicyFactory\";\n}\n\nfunction isStorageRetryPolicyFactory(\n factory: RequestPolicyFactory,\n): factory is StorageRetryPolicyFactory {\n if (factory instanceof StorageRetryPolicyFactory) {\n return true;\n }\n return factory.constructor.name === \"StorageRetryPolicyFactory\";\n}\n\nfunction isStorageTelemetryPolicyFactory(factory: RequestPolicyFactory): boolean {\n return factory.constructor.name === \"TelemetryPolicyFactory\";\n}\n\nfunction isInjectorPolicyFactory(factory: RequestPolicyFactory): boolean {\n return factory.constructor.name === \"InjectorPolicyFactory\";\n}\n\nfunction isCoreHttpPolicyFactory(factory: RequestPolicyFactory): boolean {\n const knownPolicies = [\n \"GenerateClientRequestIdPolicy\",\n \"TracingPolicy\",\n \"LogPolicy\",\n \"ProxyPolicy\",\n \"DisableResponseDecompressionPolicy\",\n \"KeepAlivePolicy\",\n \"DeserializationPolicy\",\n ];\n\n const mockHttpClient: IHttpClient = {\n sendRequest: async (request: WebResource) => {\n return {\n request,\n headers: request.headers.clone(),\n status: 500,\n };\n },\n };\n const mockRequestPolicyOptions: RequestPolicyOptions = {\n log(_logLevel: HttpPipelineLogLevel, _message: string): void {\n /* do nothing */\n },\n shouldLog(_logLevel: HttpPipelineLogLevel): boolean {\n return false;\n },\n };\n const policyInstance = factory.create(mockHttpClient, mockRequestPolicyOptions);\n const policyName = policyInstance.constructor.name;\n // bundlers sometimes add a custom suffix to the class name to make it unique\n return knownPolicies.some((knownPolicyName) => {\n return policyName.startsWith(knownPolicyName);\n });\n}\n"]}
|
|
@@ -5,8 +5,8 @@ import type { StoragePipelineOptions, Pipeline } from "./Pipeline.js";
|
|
|
5
5
|
import type { CommonOptions } from "./StorageClient.js";
|
|
6
6
|
import { StorageClient } from "./StorageClient.js";
|
|
7
7
|
import type { WithResponse } from "./utils/utils.common.js";
|
|
8
|
-
import { StorageSharedKeyCredential } from "@azure/storage-
|
|
9
|
-
import { AnonymousCredential } from "@azure/storage-
|
|
8
|
+
import { StorageSharedKeyCredential } from "@azure/storage-common";
|
|
9
|
+
import { AnonymousCredential } from "@azure/storage-common";
|
|
10
10
|
import type { Metadata } from "./models.js";
|
|
11
11
|
import type { SasIPRange } from "./SasIPRange.js";
|
|
12
12
|
import type { QueueSASPermissions } from "./QueueSASPermissions.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueueClient.d.ts","sourceRoot":"","sources":["../../src/QueueClient.ts"],"names":[],"mappings":"AAGA,OA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