@contractspec/example.learning-journey-studio-onboarding 0.0.0-canary-20260113162409
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/.turbo/turbo-build$colon$bundle.log +45 -0
- package/.turbo/turbo-build.log +46 -0
- package/CHANGELOG.md +330 -0
- package/LICENSE +21 -0
- package/README.md +41 -0
- package/dist/docs/index.d.ts +1 -0
- package/dist/docs/index.js +1 -0
- package/dist/docs/studio-onboarding.docblock.d.ts +1 -0
- package/dist/docs/studio-onboarding.docblock.js +40 -0
- package/dist/docs/studio-onboarding.docblock.js.map +1 -0
- package/dist/example.d.ts +7 -0
- package/dist/example.d.ts.map +1 -0
- package/dist/example.js +42 -0
- package/dist/example.js.map +1 -0
- package/dist/handlers/demo.handlers.d.ts +23 -0
- package/dist/handlers/demo.handlers.d.ts.map +1 -0
- package/dist/handlers/demo.handlers.js +24 -0
- package/dist/handlers/demo.handlers.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +9 -0
- package/dist/learning-journey-studio-onboarding.feature.d.ts +12 -0
- package/dist/learning-journey-studio-onboarding.feature.d.ts.map +1 -0
- package/dist/learning-journey-studio-onboarding.feature.js +75 -0
- package/dist/learning-journey-studio-onboarding.feature.js.map +1 -0
- package/dist/operations/index.d.ts +271 -0
- package/dist/operations/index.d.ts.map +1 -0
- package/dist/operations/index.js +176 -0
- package/dist/operations/index.js.map +1 -0
- package/dist/presentations/index.d.ts +9 -0
- package/dist/presentations/index.d.ts.map +1 -0
- package/dist/presentations/index.js +57 -0
- package/dist/presentations/index.js.map +1 -0
- package/dist/tests/operations.test-spec.d.ts +7 -0
- package/dist/tests/operations.test-spec.d.ts.map +1 -0
- package/dist/tests/operations.test-spec.js +36 -0
- package/dist/tests/operations.test-spec.js.map +1 -0
- package/dist/track.d.ts +8 -0
- package/dist/track.d.ts.map +1 -0
- package/dist/track.js +91 -0
- package/dist/track.js.map +1 -0
- package/example.ts +1 -0
- package/package.json +66 -0
- package/src/docs/index.ts +1 -0
- package/src/docs/studio-onboarding.docblock.ts +38 -0
- package/src/example.ts +31 -0
- package/src/handlers/demo.handlers.ts +48 -0
- package/src/index.ts +7 -0
- package/src/learning-journey-studio-onboarding.feature.ts +69 -0
- package/src/operations/index.test.ts +49 -0
- package/src/operations/index.ts +122 -0
- package/src/presentations/index.ts +57 -0
- package/src/tests/operations.test-spec.ts +31 -0
- package/src/track.ts +86 -0
- package/tsconfig.json +9 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/tsdown.config.js +17 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { defineTestSpec } from '@contractspec/lib.contracts';
|
|
2
|
+
|
|
3
|
+
export const GetTrackTest = defineTestSpec({
|
|
4
|
+
meta: {
|
|
5
|
+
key: 'learningJourney.studioOnboarding.getTrack.test',
|
|
6
|
+
version: '1.0.0',
|
|
7
|
+
stability: 'experimental',
|
|
8
|
+
owners: ['@example.learning-journey-studio-onboarding'],
|
|
9
|
+
description: 'Test for getting studio onboarding track',
|
|
10
|
+
tags: ['test'],
|
|
11
|
+
},
|
|
12
|
+
target: {
|
|
13
|
+
type: 'operation',
|
|
14
|
+
operation: {
|
|
15
|
+
key: 'learningJourney.studioOnboarding.getTrack',
|
|
16
|
+
version: '1.0.0',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
scenarios: [
|
|
20
|
+
{
|
|
21
|
+
key: 'success',
|
|
22
|
+
when: { operation: { key: 'learningJourney.studioOnboarding.getTrack' } },
|
|
23
|
+
then: [{ type: 'expectOutput', match: {} }],
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
key: 'error',
|
|
27
|
+
when: { operation: { key: 'learningJourney.studioOnboarding.getTrack' } },
|
|
28
|
+
then: [{ type: 'expectError' }],
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
});
|
package/src/track.ts
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import type { LearningJourneyTrackSpec } from '@contractspec/module.learning-journey/track-spec';
|
|
2
|
+
|
|
3
|
+
export const studioGettingStartedTrack: LearningJourneyTrackSpec = {
|
|
4
|
+
id: 'studio_getting_started',
|
|
5
|
+
productId: 'contractspec-studio',
|
|
6
|
+
name: 'Studio Getting Started',
|
|
7
|
+
description:
|
|
8
|
+
'First 30 minutes in Studio: create a project, edit the spec, deploy/regenerate, and try key modules.',
|
|
9
|
+
targetUserSegment: 'new_studio_user',
|
|
10
|
+
targetRole: 'developer',
|
|
11
|
+
totalXp: 110,
|
|
12
|
+
streakRule: { hoursWindow: 48, bonusXp: 25 },
|
|
13
|
+
completionRewards: { xpBonus: 25, badgeKey: 'studio_first_30m' },
|
|
14
|
+
steps: [
|
|
15
|
+
{
|
|
16
|
+
id: 'choose_template',
|
|
17
|
+
title: 'Choose a template',
|
|
18
|
+
description: 'Create your first Studio project (starter template).',
|
|
19
|
+
order: 1,
|
|
20
|
+
completion: {
|
|
21
|
+
eventName: 'studio.template.instantiated',
|
|
22
|
+
sourceModule: '@contractspec/bundle.studio',
|
|
23
|
+
},
|
|
24
|
+
xpReward: 20,
|
|
25
|
+
metadata: { surface: 'projects' },
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id: 'edit_spec',
|
|
29
|
+
title: 'Edit the spec',
|
|
30
|
+
description: 'Change the spec (not generated code) and save.',
|
|
31
|
+
instructions: 'Open spec editor, tweak a contract or presentation, save.',
|
|
32
|
+
order: 2,
|
|
33
|
+
completion: {
|
|
34
|
+
eventName: 'spec.changed',
|
|
35
|
+
sourceModule: '@contractspec/bundle.studio',
|
|
36
|
+
},
|
|
37
|
+
xpReward: 20,
|
|
38
|
+
metadata: { surface: 'spec-editor' },
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
id: 'regenerate_app',
|
|
42
|
+
title: 'Regenerate the app',
|
|
43
|
+
description: 'Regenerate artifacts from the updated spec.',
|
|
44
|
+
order: 3,
|
|
45
|
+
completion: {
|
|
46
|
+
eventName: 'regeneration.completed',
|
|
47
|
+
sourceModule: '@contractspec/lib.contracts/regenerator',
|
|
48
|
+
},
|
|
49
|
+
xpReward: 20,
|
|
50
|
+
metadata: { surface: 'regenerator' },
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
id: 'open_canvas',
|
|
54
|
+
title: 'Open the canvas',
|
|
55
|
+
description: 'Visit the canvas module for your project.',
|
|
56
|
+
order: 4,
|
|
57
|
+
completion: {
|
|
58
|
+
eventName: 'module.navigated',
|
|
59
|
+
sourceModule: '@contractspec/bundle.studio',
|
|
60
|
+
payloadFilter: { moduleId: 'canvas' },
|
|
61
|
+
},
|
|
62
|
+
xpReward: 20,
|
|
63
|
+
metadata: { surface: 'canvas' },
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
id: 'try_evolution_mode',
|
|
67
|
+
title: 'Try evolution mode',
|
|
68
|
+
description: 'Request a change via Evolution, then regenerate.',
|
|
69
|
+
order: 5,
|
|
70
|
+
completion: {
|
|
71
|
+
eventName: 'studio.evolution.applied',
|
|
72
|
+
sourceModule: '@contractspec/lib.evolution',
|
|
73
|
+
},
|
|
74
|
+
xpReward: 30,
|
|
75
|
+
metadata: { surface: 'evolution' },
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
metadata: {
|
|
79
|
+
persona: 'first_run',
|
|
80
|
+
surfacedIn: ['studio/home', 'studio/sidebar/learning'],
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
export const studioLearningTracks: LearningJourneyTrackSpec[] = [
|
|
85
|
+
studioGettingStartedTrack,
|
|
86
|
+
];
|