Merged PR 936: azure storage to require not import for build fix
azure storage to require not import for build fix Related work items: #7948
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import { v4 as uuidv4 } from "uuid";
|
import { v4 as uuidv4 } from "uuid";
|
||||||
import {
|
const {
|
||||||
ContainerClient,
|
ContainerClient,
|
||||||
BlockBlobClient,
|
BlockBlobClient,
|
||||||
BlobServiceClient,
|
BlobServiceClient,
|
||||||
@@ -7,7 +7,7 @@ import {
|
|||||||
ContainerSASPermissions,
|
ContainerSASPermissions,
|
||||||
generateBlobSASQueryParameters,
|
generateBlobSASQueryParameters,
|
||||||
SASProtocol,
|
SASProtocol,
|
||||||
} from "@azure/storage-blob";
|
} = require("@azure/storage-blob");
|
||||||
import { DefaultAzureCredential } from "@azure/identity";
|
import { DefaultAzureCredential } from "@azure/identity";
|
||||||
import { consoleLogger, conLog, hashAPIPath } from ".";
|
import { consoleLogger, conLog, hashAPIPath } from ".";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@azure/identity": "^2.0.5",
|
"@azure/identity": "^2.0.5",
|
||||||
"@azure/storage-blob": "^12.10.0",
|
"@azure/storage-blob": "^12.12.0",
|
||||||
"@googlemaps/react-wrapper": "^1.1.24",
|
"@googlemaps/react-wrapper": "^1.1.24",
|
||||||
"@magic-sdk/admin": "^1.4.0",
|
"@magic-sdk/admin": "^1.4.0",
|
||||||
"@next-auth/prisma-adapter": "^1.0.4",
|
"@next-auth/prisma-adapter": "^1.0.4",
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
var queryUrl =
|
var queryUrl =
|
||||||
"accounts?$count=true&$filter=pinswg_isalocalplanningauthorityaccount eq 846040000&$select=name&$orderby=name asc";
|
"accounts?$count=true&$filter=pinswg_isalocalplanningauthorityaccount eq 846040000&$select=name&$orderby=name asc";
|
||||||
|
|
||||||
console.log(WEBAPI_URL + queryUrl + hashAPIPath(queryUrl));
|
//console.log(WEBAPI_URL + queryUrl + hashAPIPath(queryUrl));
|
||||||
return axios
|
return axios
|
||||||
.get(
|
.get(
|
||||||
WEBAPI_URL + queryUrl + hashAPIPath(queryUrl),
|
WEBAPI_URL + queryUrl + hashAPIPath(queryUrl),
|
||||||
|
|||||||
+22
-7
@@ -81,6 +81,26 @@ const reducer = (state = {}, action) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const migrations = {
|
||||||
|
1: (state) => {
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
2: (state) => {
|
||||||
|
delete state["formData"];
|
||||||
|
delete state["govGateway"];
|
||||||
|
const newStateObj = {
|
||||||
|
...state,
|
||||||
|
"currentView": {},
|
||||||
|
"searchResultsObj": {},
|
||||||
|
};
|
||||||
|
|
||||||
|
console.info("v2 schema migration:" + JSON.stringify(newStateObj));
|
||||||
|
return newStateObj;
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
// BINDING MIDDLEWARE
|
// BINDING MIDDLEWARE
|
||||||
const bindMiddleware = (middleware) => {
|
const bindMiddleware = (middleware) => {
|
||||||
if (process.env.NODE_ENV !== "production") {
|
if (process.env.NODE_ENV !== "production") {
|
||||||
@@ -107,9 +127,7 @@ const makeStore = ({ isServer }) => {
|
|||||||
key: "acp",
|
key: "acp",
|
||||||
whitelist: [
|
whitelist: [
|
||||||
"currentView",
|
"currentView",
|
||||||
// "search",
|
|
||||||
"searchResultsObj",
|
"searchResultsObj",
|
||||||
//"formData",
|
|
||||||
"appealType",
|
"appealType",
|
||||||
"LPAData",
|
"LPAData",
|
||||||
"accountDetails",
|
"accountDetails",
|
||||||
@@ -119,13 +137,10 @@ const makeStore = ({ isServer }) => {
|
|||||||
"watchedCases",
|
"watchedCases",
|
||||||
"form",
|
"form",
|
||||||
],
|
],
|
||||||
version: 1.4,
|
version: 2,
|
||||||
storage: storage,
|
storage: storage,
|
||||||
stateReconciler: autoMergeLevel2, // if needed, use a safer storage
|
stateReconciler: autoMergeLevel2, // if needed, use a safer storage
|
||||||
migrate: (state) => {
|
migrate: createMigrate(migrations, { debug: true }),
|
||||||
console.log("Migration Running!");
|
|
||||||
return Promise.resolve(state);
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const persistedReducer = persistReducer(persistConfig, reducer); // Create a new reducer with our existing reducer
|
const persistedReducer = persistReducer(persistConfig, reducer); // Create a new reducer with our existing reducer
|
||||||
|
|||||||
Reference in New Issue
Block a user