@shopify/create-app
Version:
A CLI tool to create a new Shopify app.
31 lines (28 loc) • 939 B
JavaScript
import {
init_cjs_shims
} from "./chunk-3XNI6LP4.js";
// ../cli-kit/dist/private/node/context/deprecations-store.js
init_cjs_shims();
var deprecationsStore = {
nextDeprecationDate: void 0
};
function getNextDeprecationDate() {
return deprecationsStore.nextDeprecationDate;
}
function setNextDeprecationDate(dates) {
if (dates.length < 1)
return;
let earliestFutureDateTime = earliestDateTimeAfter(Date.now(), dates);
if (!earliestFutureDateTime)
return;
let nextDeprecationDate = getNextDeprecationDate();
(!nextDeprecationDate || earliestFutureDateTime < nextDeprecationDate.getTime()) && (deprecationsStore.nextDeprecationDate = new Date(earliestFutureDateTime));
}
function earliestDateTimeAfter(afterTime, dates) {
return dates.map((date) => date.getTime()).sort().find((time) => time > afterTime);
}
export {
getNextDeprecationDate,
setNextDeprecationDate
};
//# sourceMappingURL=chunk-MSED5ZFM.js.map