@learnpack/learnpack 5.0.186 → 5.0.191
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/README.md +13 -13
- package/lib/commands/init.js +2 -2
- package/lib/commands/serve.d.ts +2 -1
- package/lib/commands/serve.js +9 -53
- package/lib/creatorDist/assets/index-Bnq3eZ3T.css +1 -1641
- package/lib/creatorDist/assets/index-CXaPa6wN.js +273 -0
- package/lib/creatorDist/index.html +1 -1
- package/lib/utils/rigoActions.d.ts +4 -4
- package/lib/utils/rigoActions.js +14 -8
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
- package/src/commands/init.ts +23 -15
- package/src/commands/serve.ts +36 -80
- package/src/creator/src/App.tsx +3 -2
- package/src/creator/src/components/FileUploader.tsx +87 -10
- package/src/creator/src/components/Login.tsx +24 -18
- package/src/creator/src/components/syllabus/SyllabusEditor.tsx +47 -34
- package/src/creator/src/utils/rigo.ts +7 -6
- package/src/creatorDist/assets/index-Bnq3eZ3T.css +1 -1641
- package/src/creatorDist/assets/index-CXaPa6wN.js +273 -0
- package/src/creatorDist/index.html +1 -1
- package/src/utils/rigoActions.ts +28 -14
- package/lib/creatorDist/assets/index-Cq3XE9_M.js +0 -35362
- package/src/creatorDist/assets/index-Cq3XE9_M.js +0 -35362
@@ -10,7 +10,7 @@
|
|
10
10
|
/>
|
11
11
|
|
12
12
|
<title>Learnpack Creator: Craft tutorials in seconds!</title>
|
13
|
-
<script type="module" crossorigin src="/creator/assets/index-
|
13
|
+
<script type="module" crossorigin src="/creator/assets/index-CXaPa6wN.js"></script>
|
14
14
|
<link rel="stylesheet" crossorigin href="/creator/assets/index-Bnq3eZ3T.css">
|
15
15
|
</head>
|
16
16
|
<body>
|
package/src/utils/rigoActions.ts
CHANGED
@@ -17,15 +17,17 @@ type TCreateReadmeInputs = {
|
|
17
17
|
|
18
18
|
export const createReadme = async (
|
19
19
|
token: string,
|
20
|
-
inputs: TCreateReadmeInputs
|
20
|
+
inputs: TCreateReadmeInputs,
|
21
|
+
purpose: string
|
21
22
|
) => {
|
22
23
|
try {
|
23
24
|
const response = await axios.post(
|
24
25
|
`${RIGOBOT_HOST}/v1/prompting/completion/423/`,
|
25
26
|
{
|
26
27
|
inputs,
|
27
|
-
include_purpose_objective:
|
28
|
+
include_purpose_objective: true,
|
28
29
|
execute_async: false,
|
30
|
+
purpose_slug: purpose,
|
29
31
|
},
|
30
32
|
{
|
31
33
|
headers: {
|
@@ -222,11 +224,17 @@ type TCreateCodingReadmeInputs = {
|
|
222
224
|
}
|
223
225
|
export const createCodingReadme = async (
|
224
226
|
token: string,
|
225
|
-
inputs: TCreateCodingReadmeInputs
|
227
|
+
inputs: TCreateCodingReadmeInputs,
|
228
|
+
purpose: string
|
226
229
|
) => {
|
227
230
|
const response = await axios.post(
|
228
231
|
`${RIGOBOT_HOST}/v1/prompting/completion/489/`,
|
229
|
-
{
|
232
|
+
{
|
233
|
+
inputs,
|
234
|
+
include_purpose_objective: true,
|
235
|
+
purpose_slug: purpose,
|
236
|
+
execute_async: false,
|
237
|
+
},
|
230
238
|
{
|
231
239
|
headers: {
|
232
240
|
"Content-Type": "application/json",
|
@@ -249,7 +257,8 @@ type TReadmeCreatorInputs = {
|
|
249
257
|
|
250
258
|
export const readmeCreator = async (
|
251
259
|
token: string,
|
252
|
-
inputs: TReadmeCreatorInputs
|
260
|
+
inputs: TReadmeCreatorInputs,
|
261
|
+
purpose: string
|
253
262
|
) => {
|
254
263
|
if (inputs.kind === "quiz" || inputs.kind === "read") {
|
255
264
|
const createReadmeInputs: TCreateReadmeInputs = {
|
@@ -260,17 +269,21 @@ export const readmeCreator = async (
|
|
260
269
|
include_quiz: inputs.kind === "quiz" ? "true" : "false",
|
261
270
|
lesson_description: inputs.lesson_description,
|
262
271
|
}
|
263
|
-
return createReadme(token, createReadmeInputs)
|
272
|
+
return createReadme(token, createReadmeInputs, purpose)
|
264
273
|
}
|
265
274
|
|
266
275
|
if (inputs.kind === "code") {
|
267
|
-
return createCodingReadme(
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
276
|
+
return createCodingReadme(
|
277
|
+
token,
|
278
|
+
{
|
279
|
+
title: inputs.title,
|
280
|
+
output_lang: inputs.output_lang,
|
281
|
+
list_of_exercises: inputs.list_of_exercises,
|
282
|
+
tutorial_description: inputs.tutorial_description,
|
283
|
+
lesson_description: inputs.lesson_description,
|
284
|
+
},
|
285
|
+
purpose
|
286
|
+
)
|
274
287
|
}
|
275
288
|
|
276
289
|
throw new Error("Invalid kind of lesson")
|
@@ -302,7 +315,8 @@ type TReduceReadmeInputs = {
|
|
302
315
|
}
|
303
316
|
export async function makeReadmeReadable(
|
304
317
|
rigoToken: string,
|
305
|
-
inputs: TReduceReadmeInputs
|
318
|
+
inputs: TReduceReadmeInputs,
|
319
|
+
purpose: string
|
306
320
|
) {
|
307
321
|
try {
|
308
322
|
const response = await axios.post(
|