-
Notifications
You must be signed in to change notification settings - Fork 382
Sfi #2608
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
base: main
Are you sure you want to change the base?
Sfi #2608
Changes from all commits
146bc7d
19950ed
428de1c
95787c0
db39ce8
125fdd6
1bbca76
56e373e
e767c71
62b84a9
0066290
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,10 +20,10 @@ | |
| "vscode": "^1.39.0" | ||
| }, | ||
| "dependencies": { | ||
| "@azure/ms-rest-js": "^1.5.0", | ||
| "@azure/ms-rest-js": "^2.7.0", | ||
| "applicationinsights": "^2.9.6", | ||
| "args": "^5.0.1", | ||
| "axios": "^0.27.0", | ||
| "axios": "^0.30.0", | ||
| "etag": "^1.8.1", | ||
| "express": "^4.16.4", | ||
| "fs-extra": "^11.1.1", | ||
|
|
@@ -36,20 +36,21 @@ | |
| "rimraf": "^3.0.2", | ||
| "sequelize": "^6.31.0", | ||
| "stoppable": "^1.1.0", | ||
| "tedious": "^16.7.0", | ||
| "tedious": "^18.6.1", | ||
| "to-readable-stream": "^2.1.0", | ||
| "tslib": "^2.3.0", | ||
| "uri-templates": "^0.2.0", | ||
| "uuid": "^3.3.2", | ||
| "winston": "^3.1.0", | ||
| "xml2js": "^0.6.0" | ||
| "xml2js": "0.6.2" | ||
|
Comment on lines
36
to
+45
|
||
| }, | ||
| "devDependencies": { | ||
| "@azure/core-auth": "^1.3.2", | ||
| "@azure/core-rest-pipeline": "^1.2.0", | ||
| "@azure/data-tables": "^13.0.1", | ||
| "@azure/storage-blob": "^12.9.0", | ||
| "@azure/storage-queue": "^12.8.0", | ||
| "@azure/identity": "^4.2.1", | ||
| "@azure/storage-blob": "^12.28.0", | ||
| "@azure/storage-queue": "^12.27.0", | ||
| "@types/args": "^5.0.0", | ||
| "@types/async": "^3.0.1", | ||
| "@types/bluebird": "^3.5.27", | ||
|
|
@@ -73,7 +74,7 @@ | |
| "@typescript-eslint/eslint-plugin": "^5.54.1", | ||
| "@typescript-eslint/parser": "^5.54.1", | ||
| "autorest": "^3.6.0", | ||
| "azure-storage": "^2.10.3", | ||
| "azure-storage": "^2.10.7", | ||
| "cross-env": "^7.0.3", | ||
| "cross-var": "^1.1.0", | ||
| "eslint": "^8.35.0", | ||
|
|
@@ -330,6 +331,14 @@ | |
| "db:migrate:blob:metadata": "sequelize db:migrate --config migrations/blob/metadata/config/config.json --migrations-path migrations/blob/metadata/migrations", | ||
| "db:create:blob:metadata": "sequelize db:create --config migrations/blob/metadata/config/config.json --migrations-path migrations/blob/metadata/migrations" | ||
| }, | ||
| "overrides": { | ||
| "vsce": { "xml2js": "^0.5.0" }, | ||
| "azure-storage": { | ||
| "xml2js": "^0.5.0", | ||
| "form-data": "^2.5.4" | ||
| }, | ||
| "tough-cookie": "^4.1.3" | ||
| }, | ||
| "husky": {}, | ||
| "repository": { | ||
| "type": "git", | ||
|
|
@@ -350,4 +359,4 @@ | |
| "url": "https://github.com/azure/azurite/issues" | ||
| }, | ||
| "homepage": "https://github.com/azure/azurite#readme" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -13,7 +13,7 @@ export default class BlobSharedKeyAuthenticator implements IAuthenticator { | |||||||||
| public constructor( | ||||||||||
| private readonly dataStore: IAccountDataStore, | ||||||||||
| private readonly logger: ILogger | ||||||||||
| ) {} | ||||||||||
| ) { } | ||||||||||
|
|
||||||||||
| public async validate( | ||||||||||
| req: IRequest, | ||||||||||
|
|
@@ -77,8 +77,8 @@ export default class BlobSharedKeyAuthenticator implements IAuthenticator { | |||||||||
| const stringToSign: string = | ||||||||||
| [ | ||||||||||
| req.getMethod().toUpperCase(), | ||||||||||
| this.getHeaderValueToSign(req, HeaderConstants.CONTENT_ENCODING), | ||||||||||
| this.getHeaderValueToSign(req, HeaderConstants.CONTENT_LANGUAGE), | ||||||||||
| this.getHeaderValueToSign(req, HeaderConstants.CONTENT_ENCODING), | ||||||||||
|
Comment on lines
80
to
+81
|
||||||||||
| this.getHeaderValueToSign(req, HeaderConstants.CONTENT_LANGUAGE), | |
| this.getHeaderValueToSign(req, HeaderConstants.CONTENT_ENCODING), | |
| this.getHeaderValueToSign(req, HeaderConstants.CONTENT_ENCODING), | |
| this.getHeaderValueToSign(req, HeaderConstants.CONTENT_LANGUAGE), |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,8 +1,7 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| import { Writable } from "stream"; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| import { BlobBatchSubResponse } from "./BlobBatchSubResponse"; | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| export class SubResponseTextBodyStream extends Writable | ||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| export class SubResponseTextBodyStream extends Writable { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| private bodyText: string; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| public constructor( | ||||||||||||||||||||||||||||||||||||||||||||||||||
| private readonly subResponse: BlobBatchSubResponse) { | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -15,12 +14,13 @@ export class SubResponseTextBodyStream extends Writable | |||||||||||||||||||||||||||||||||||||||||||||||||
| callback(); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| public end(cb?: (() => void) | undefined): void; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| public end(chunk: any, cb?: (() => void) | undefined): void; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| public end(chunk: any, encoding: BufferEncoding, cb?: (() => void) | undefined): void; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| public end(chunk?: unknown, encoding?: unknown, cb?: unknown): void { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| public end(cb?: (() => void) | undefined): this; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| public end(chunk: any, cb?: (() => void) | undefined): this; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| public end(chunk: any, encoding: BufferEncoding, cb?: (() => void) | undefined): this; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| public end(chunk?: unknown, encoding?: unknown, cb?: unknown): this { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| if (chunk) this.bodyText += (chunk! as any).toString(); | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+17
to
21
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| this.subResponse.end(); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| return this; | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
21
to
+23
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| if (chunk) this.bodyText += (chunk! as any).toString(); | |
| this.subResponse.end(); | |
| return this; | |
| let finalChunk = chunk; | |
| let finalEncoding = encoding; | |
| let finalCallback = cb as (() => void) | undefined; | |
| if (typeof finalChunk === "function") { | |
| finalCallback = finalChunk as () => void; | |
| finalChunk = undefined; | |
| finalEncoding = undefined; | |
| } else if (typeof finalEncoding === "function") { | |
| finalCallback = finalEncoding as () => void; | |
| finalEncoding = undefined; | |
| } | |
| const wrappedCallback = () => { | |
| this.subResponse.end(); | |
| if (finalCallback) { | |
| finalCallback(); | |
| } | |
| }; | |
| return super.end(finalChunk as any, finalEncoding as any, wrappedCallback as any); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3113,12 +3113,8 @@ export default class LokiBlobMetadataStore | |
| return undefined; | ||
| } | ||
|
|
||
| if (obj instanceof Uint8Array) { | ||
| return obj; | ||
| } | ||
|
|
||
| if (obj.type === "Buffer") { | ||
| obj = obj.data; | ||
| if (obj instanceof Buffer) { | ||
| return new Uint8Array(obj); | ||
| } | ||
|
|
||
| const length = Object.keys(obj).length; | ||
|
Comment on lines
+3116
to
3120
|
||
|
|
@@ -3134,7 +3130,7 @@ export default class LokiBlobMetadataStore | |
| arr[i] = obj[i]; | ||
| } | ||
|
|
||
| return arr; | ||
| return new Uint8Array(arr); | ||
| } | ||
|
Comment on lines
3116
to
3134
|
||
|
|
||
| /** | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
package.jsonchanges dependency versions and addsoverrides, but this PR doesn’t include the correspondingpackage-lock.jsonupdate. Since the repo commitspackage-lock.json, please regenerate and commit the lockfile so CI and local installs resolve the same dependency graph.