@epic-web/workshop-utils 6.59.0 → 6.60.0

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.
@@ -4895,6 +4895,21 @@ export declare function getWorkshopInstructions({ request, }?: {
4895
4895
  readonly file: string;
4896
4896
  readonly relativePath: "exercises";
4897
4897
  }>;
4898
+ export declare function getExamplesInstructions({ request, }?: {
4899
+ request?: Request;
4900
+ }): Promise<{
4901
+ readonly compiled: {
4902
+ readonly status: "success";
4903
+ readonly code: string;
4904
+ readonly title: string | null;
4905
+ readonly epicVideoEmbeds: Array<string>;
4906
+ } | {
4907
+ readonly status: "error";
4908
+ readonly error: string;
4909
+ };
4910
+ readonly file: string;
4911
+ readonly relativePath: "examples/README.mdx";
4912
+ }>;
4898
4913
  export declare function getWorkshopFinished({ request, }?: {
4899
4914
  request?: Request;
4900
4915
  }): Promise<{
@@ -1219,6 +1219,18 @@ export async function getWorkshopInstructions({ request, } = {}) {
1219
1219
  });
1220
1220
  return { compiled, file: readmeFilepath, relativePath: 'exercises' };
1221
1221
  }
1222
+ export async function getExamplesInstructions({ request, } = {}) {
1223
+ const readmeFilepath = path.join(getWorkshopRoot(), 'examples', 'README.mdx');
1224
+ const compiled = await compileMdx(readmeFilepath, { request }).then((r) => ({ ...r, status: 'success' }), (e) => {
1225
+ console.error(`There was an error compiling the examples README.mdx`, readmeFilepath, e);
1226
+ return { status: 'error', error: getErrorMessage(e) };
1227
+ });
1228
+ return {
1229
+ compiled,
1230
+ file: readmeFilepath,
1231
+ relativePath: 'examples/README.mdx',
1232
+ };
1233
+ }
1222
1234
  export async function getWorkshopFinished({ request, } = {}) {
1223
1235
  const finishedFilepath = path.join(getWorkshopRoot(), 'exercises', 'FINISHED.mdx');
1224
1236
  const compiled = await compileMdx(finishedFilepath, { request }).then((r) => ({ ...r, status: 'success' }), (e) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epic-web/workshop-utils",
3
- "version": "6.59.0",
3
+ "version": "6.60.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },