@epic-web/workshop-app 4.25.2 → 4.25.3
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/build/server/index.js +17 -8
- package/build/server/index.js.map +1 -1
- package/package.json +3 -3
package/build/server/index.js
CHANGED
|
@@ -78,9 +78,9 @@ import * as Popover from "@radix-ui/react-popover";
|
|
|
78
78
|
import * as Tabs from "@radix-ui/react-tabs";
|
|
79
79
|
import * as Accordion from "@radix-ui/react-accordion";
|
|
80
80
|
import dayjs from "dayjs";
|
|
81
|
-
import "dayjs/plugin/relativeTime.js";
|
|
82
|
-
import "dayjs/plugin/timezone.js";
|
|
83
|
-
import "dayjs/plugin/utc.js";
|
|
81
|
+
import relativeTimePlugin from "dayjs/plugin/relativeTime.js";
|
|
82
|
+
import timeZonePlugin from "dayjs/plugin/timezone.js";
|
|
83
|
+
import utcPlugin from "dayjs/plugin/utc.js";
|
|
84
84
|
import AnsiToHTML from "ansi-to-html";
|
|
85
85
|
import { useEventSource } from "remix-utils/sse/react";
|
|
86
86
|
import { eventStream } from "remix-utils/sse/server";
|
|
@@ -1650,7 +1650,7 @@ async function waitForPortToBeAvailable(port2) {
|
|
|
1650
1650
|
console.error("Timed out waiting for the port to become available");
|
|
1651
1651
|
}
|
|
1652
1652
|
}
|
|
1653
|
-
let initialized = false;
|
|
1653
|
+
let initialized$1 = false;
|
|
1654
1654
|
const workshopRoot = process.env.EPICSHOP_CONTEXT_CWD = process.env.EPICSHOP_CONTEXT_CWD ?? process.cwd();
|
|
1655
1655
|
const playgroundAppNameInfoPath = path$1.join(
|
|
1656
1656
|
workshopRoot,
|
|
@@ -1784,8 +1784,8 @@ const modifiedTimes = remember(
|
|
|
1784
1784
|
);
|
|
1785
1785
|
function init() {
|
|
1786
1786
|
var _a2;
|
|
1787
|
-
if (initialized) return;
|
|
1788
|
-
initialized = true;
|
|
1787
|
+
if (initialized$1) return;
|
|
1788
|
+
initialized$1 = true;
|
|
1789
1789
|
const config = getWorkshopConfig();
|
|
1790
1790
|
process.env.EPICSHOP_GITHUB_REPO = config.githubRepo;
|
|
1791
1791
|
process.env.EPICSHOP_GITHUB_ROOT = config.githubRoot;
|
|
@@ -1923,7 +1923,7 @@ async function getApps({
|
|
|
1923
1923
|
request,
|
|
1924
1924
|
forceFresh
|
|
1925
1925
|
} = {}) {
|
|
1926
|
-
if (!initialized) init();
|
|
1926
|
+
if (!initialized$1) init();
|
|
1927
1927
|
const key = "apps";
|
|
1928
1928
|
const apps = await cachified({
|
|
1929
1929
|
key,
|
|
@@ -10704,6 +10704,15 @@ const SelectValue = React__default.forwardRef(
|
|
|
10704
10704
|
return /* @__PURE__ */ jsx(Select.Value, { ...props, ref: forwardedRef, children: props.value });
|
|
10705
10705
|
}
|
|
10706
10706
|
);
|
|
10707
|
+
let initialized = false;
|
|
10708
|
+
function getDayjs() {
|
|
10709
|
+
if (initialized) return dayjs;
|
|
10710
|
+
dayjs.extend(utcPlugin);
|
|
10711
|
+
dayjs.extend(timeZonePlugin);
|
|
10712
|
+
dayjs.extend(relativeTimePlugin);
|
|
10713
|
+
initialized = true;
|
|
10714
|
+
return dayjs;
|
|
10715
|
+
}
|
|
10707
10716
|
const EmojiDataSchema = z$1.union([
|
|
10708
10717
|
z$1.object({
|
|
10709
10718
|
emojiName: z$1.never().optional(),
|
|
@@ -10804,7 +10813,7 @@ async function fetchDiscordPosts({ request }) {
|
|
|
10804
10813
|
const hints = getHints(request);
|
|
10805
10814
|
return threadData.map((thread) => ({
|
|
10806
10815
|
...thread,
|
|
10807
|
-
lastUpdatedDisplay:
|
|
10816
|
+
lastUpdatedDisplay: getDayjs()(thread.lastUpdated).tz(hints.timeZone).fromNow()
|
|
10808
10817
|
}));
|
|
10809
10818
|
}
|
|
10810
10819
|
function DiscordChat() {
|