This commit implements the core admin dashboard functionality including NextAuth authentication, Cloudflare D1 database integration with complete schema, and Cloudflare R2 file upload system for portfolio images. Features include artist management, appointment scheduling, and data migration capabilities.
39 lines
1.1 KiB
JavaScript
39 lines
1.1 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
Object.defineProperty(exports, "withCoalescedInvoke", {
|
|
enumerable: true,
|
|
get: function() {
|
|
return withCoalescedInvoke;
|
|
}
|
|
});
|
|
const globalInvokeCache = new Map();
|
|
function withCoalescedInvoke(func) {
|
|
return async function(key, args) {
|
|
const entry = globalInvokeCache.get(key);
|
|
if (entry) {
|
|
return entry.then((res)=>({
|
|
isOrigin: false,
|
|
value: res.value
|
|
}));
|
|
}
|
|
async function __wrapper() {
|
|
return await func.apply(undefined, args);
|
|
}
|
|
const future = __wrapper().then((res)=>{
|
|
globalInvokeCache.delete(key);
|
|
return {
|
|
isOrigin: true,
|
|
value: res
|
|
};
|
|
}).catch((err)=>{
|
|
globalInvokeCache.delete(key);
|
|
return Promise.reject(err);
|
|
});
|
|
globalInvokeCache.set(key, future);
|
|
return future;
|
|
};
|
|
}
|
|
|
|
//# sourceMappingURL=coalesced-function.js.map
|