@01-edu/shared 1.1.3 → 1.1.5
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/attrs-defs.js +15 -6
- package/package.json +1 -1
- package/skill-definitions.js +18 -0
package/attrs-defs.js
CHANGED
|
@@ -389,7 +389,7 @@ attrs.autoValidateWhere = {
|
|
|
389
389
|
const skillsList = {
|
|
390
390
|
value: {},
|
|
391
391
|
editable: true,
|
|
392
|
-
label: 'Skills',
|
|
392
|
+
label: 'Skills rewarded',
|
|
393
393
|
type: mapValues(skillsSet, ({ name, type: instruction, description }) => ({
|
|
394
394
|
label: name,
|
|
395
395
|
instruction,
|
|
@@ -403,7 +403,8 @@ const skillsList = {
|
|
|
403
403
|
}
|
|
404
404
|
const sharedBasedSkills = {
|
|
405
405
|
...skillsList,
|
|
406
|
-
instruction:
|
|
406
|
+
instruction:
|
|
407
|
+
'Skills rewarded to users when they succeed in the current content',
|
|
407
408
|
}
|
|
408
409
|
relationAttrs.baseSkills = {
|
|
409
410
|
// only if result associated directly to the object
|
|
@@ -427,8 +428,9 @@ const sharedBaseXp = {
|
|
|
427
428
|
// TODO: we should not manually set base-xp but play with level and difficulty attribute
|
|
428
429
|
// then this attribute should not be editable
|
|
429
430
|
editable: true,
|
|
430
|
-
label: 'XP',
|
|
431
|
-
instruction:
|
|
431
|
+
label: 'XP rewards',
|
|
432
|
+
instruction:
|
|
433
|
+
'How much experience points the user gets by succeeding on this content',
|
|
432
434
|
...Functions({ 'by level and difficulty': getBaseXpByLevelAndDifficulty }),
|
|
433
435
|
check: amount => {
|
|
434
436
|
if (!Number.isInteger(amount)) throw Error('Must be a whole number')
|
|
@@ -2397,7 +2399,7 @@ const contentRequirements = {
|
|
|
2397
2399
|
`Invalid objects requirements - no object found for the following relative paths: ${paths}`,
|
|
2398
2400
|
)
|
|
2399
2401
|
error.userFeedback =
|
|
2400
|
-
'You have some misconfigured
|
|
2402
|
+
'You have some misconfigured Contents required, please update them!'
|
|
2401
2403
|
console.error(error.message)
|
|
2402
2404
|
throw error
|
|
2403
2405
|
}
|
|
@@ -2782,7 +2784,13 @@ types.pathwaysRequirementObjects = {
|
|
|
2782
2784
|
const sharedContentRequirementsForMainAttr = TypeObject({
|
|
2783
2785
|
...contentRequirements,
|
|
2784
2786
|
type: {
|
|
2785
|
-
skills: {
|
|
2787
|
+
skills: {
|
|
2788
|
+
...skillsList,
|
|
2789
|
+
label: 'Skills required',
|
|
2790
|
+
instruction: 'Necessary skill level to unlock the current content',
|
|
2791
|
+
description:
|
|
2792
|
+
'Define the skills and tier required to unlock the current content. The skill tracker button opens a modal where you can visualize the contents that reward the selected skill',
|
|
2793
|
+
},
|
|
2786
2794
|
objects: {
|
|
2787
2795
|
...types.sharedObjectList,
|
|
2788
2796
|
value: (...args) => {
|
|
@@ -4140,6 +4148,7 @@ const sharedBranchOptions = {
|
|
|
4140
4148
|
description: 'Changing branch can disrupt the piscine timeline.',
|
|
4141
4149
|
required: true,
|
|
4142
4150
|
editable: true,
|
|
4151
|
+
hidden: true,
|
|
4143
4152
|
}
|
|
4144
4153
|
|
|
4145
4154
|
const getBranchOptions = (object, limit = 9) => {
|
package/package.json
CHANGED
package/skill-definitions.js
CHANGED
|
@@ -242,8 +242,20 @@ export const skillsSet = {
|
|
|
242
242
|
name: 'Git',
|
|
243
243
|
type: 'technology',
|
|
244
244
|
},
|
|
245
|
+
|
|
246
|
+
// employability
|
|
247
|
+
employability: {
|
|
248
|
+
name: 'Employability',
|
|
249
|
+
type: 'employability',
|
|
250
|
+
},
|
|
245
251
|
}
|
|
246
252
|
|
|
253
|
+
export const skillTiers = [
|
|
254
|
+
{ tier: 'Beginner', name: 'Code Explorer', maxValue: 25 },
|
|
255
|
+
{ tier: 'Intermediate', name: 'Bug Squasher', maxValue: 50 },
|
|
256
|
+
{ tier: 'Advanced', name: 'Script Wizard', maxValue: 75 },
|
|
257
|
+
{ tier: 'Master', name: 'Master Hacker', maxValue: 100 },
|
|
258
|
+
]
|
|
247
259
|
export const skillTypes = [
|
|
248
260
|
{
|
|
249
261
|
type: 'technical',
|
|
@@ -263,6 +275,12 @@ export const skillTypes = [
|
|
|
263
275
|
description:
|
|
264
276
|
'Technologies gather the different programming languages, frameworks and platforms acquired from projects & piscines.',
|
|
265
277
|
},
|
|
278
|
+
{
|
|
279
|
+
type: 'employability',
|
|
280
|
+
name: 'Employability',
|
|
281
|
+
description:
|
|
282
|
+
'Develops professional readiness through personal branding, digital presence, and job search strategies—including portfolio building, CV writing, and effective networking.',
|
|
283
|
+
},
|
|
266
284
|
]
|
|
267
285
|
|
|
268
286
|
export const hasRequiredSkills = (requiredSkills, userSkills) =>
|