@demoscript/cli 1.0.2 → 1.0.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.
Files changed (72) hide show
  1. package/dist/bundle.cjs +10952 -10633
  2. package/dist/commands/login.d.ts +4 -0
  3. package/dist/commands/login.d.ts.map +1 -0
  4. package/dist/commands/login.js +109 -0
  5. package/dist/commands/login.js.map +1 -0
  6. package/dist/commands/push.d.ts +9 -0
  7. package/dist/commands/push.d.ts.map +1 -0
  8. package/dist/commands/push.js +146 -0
  9. package/dist/commands/push.js.map +1 -0
  10. package/dist/commands/serve.d.ts +9 -0
  11. package/dist/commands/serve.d.ts.map +1 -0
  12. package/dist/commands/serve.js +197 -0
  13. package/dist/commands/serve.js.map +1 -0
  14. package/dist/index.d.ts +3 -0
  15. package/dist/index.d.ts.map +1 -0
  16. package/dist/index.js.map +1 -0
  17. package/dist/lib/config.d.ts +12 -0
  18. package/dist/lib/config.d.ts.map +1 -0
  19. package/dist/lib/config.js +39 -0
  20. package/dist/lib/config.js.map +1 -0
  21. package/dist/lib/executor.d.ts +20 -0
  22. package/dist/lib/executor.d.ts.map +1 -0
  23. package/dist/lib/executor.js +185 -0
  24. package/dist/lib/executor.js.map +1 -0
  25. package/dist/lib/executor.test.d.ts +2 -0
  26. package/dist/lib/executor.test.d.ts.map +1 -0
  27. package/dist/lib/executor.test.js +62 -0
  28. package/dist/lib/executor.test.js.map +1 -0
  29. package/dist/lib/loader.d.ts +10 -0
  30. package/dist/lib/loader.d.ts.map +1 -0
  31. package/dist/lib/loader.js +156 -0
  32. package/dist/lib/loader.js.map +1 -0
  33. package/dist/lib/openapi.d.ts +108 -0
  34. package/dist/lib/openapi.d.ts.map +1 -0
  35. package/dist/lib/openapi.js +375 -0
  36. package/dist/lib/openapi.js.map +1 -0
  37. package/dist/lib/openapi.test.d.ts +2 -0
  38. package/dist/lib/openapi.test.d.ts.map +1 -0
  39. package/dist/lib/openapi.test.js +318 -0
  40. package/dist/lib/openapi.test.js.map +1 -0
  41. package/dist/lib/validator.d.ts +12 -0
  42. package/dist/lib/validator.d.ts.map +1 -0
  43. package/dist/lib/validator.js +58 -0
  44. package/dist/lib/validator.js.map +1 -0
  45. package/dist/server/rest-proxy.d.ts +3 -0
  46. package/dist/server/rest-proxy.d.ts.map +1 -0
  47. package/dist/server/rest-proxy.js +34 -0
  48. package/dist/server/rest-proxy.js.map +1 -0
  49. package/dist/server/shell-executor.d.ts +3 -0
  50. package/dist/server/shell-executor.d.ts.map +1 -0
  51. package/dist/server/shell-executor.js +56 -0
  52. package/dist/server/shell-executor.js.map +1 -0
  53. package/dist/types.d.ts +312 -0
  54. package/dist/types.d.ts.map +1 -0
  55. package/dist/types.js +33 -0
  56. package/dist/types.js.map +1 -0
  57. package/dist/ui-dist/assets/index-CtREFkwP.js +175 -0
  58. package/dist/ui-dist/assets/index-DTJEjfHv.css +1 -0
  59. package/dist/ui-dist/dist/assets/index-DZpZVgB7.js +177 -0
  60. package/dist/ui-dist/dist/assets/index-DZpZVgB7.js.map +1 -0
  61. package/dist/ui-dist/dist/assets/index-OFqwkvWn.css +1 -0
  62. package/dist/ui-dist/{assets/index-cngvCrhl.js → dist/assets/index-Uvktqp4J.js} +31 -31
  63. package/dist/ui-dist/dist/assets/index-Uvktqp4J.js.map +1 -0
  64. package/dist/ui-dist/dist/assets/index-pTz7wI27.css +1 -0
  65. package/dist/ui-dist/{assets/index-DFwzKJ81.css → dist/assets/index.css} +1 -1
  66. package/dist/ui-dist/dist/assets/index.js +177 -0
  67. package/dist/ui-dist/dist/assets/index.js.map +1 -0
  68. package/dist/ui-dist/dist/demo.yaml +120 -0
  69. package/dist/ui-dist/dist/index.html +14 -0
  70. package/dist/ui-dist/index.html +2 -2
  71. package/package.json +1 -1
  72. /package/dist/ui-dist/{favicon.svg → dist/favicon.svg} +0 -0
@@ -0,0 +1,120 @@
1
+ # DemoScript Sample Demo
2
+ # Uses JSONPlaceholder API (https://jsonplaceholder.typicode.com) - always available
3
+
4
+ title: "REST API Demo"
5
+ description: "Sample demo showing REST API calls, variable chaining, and result display"
6
+ version: "1.0"
7
+ author: "DemoScript"
8
+ tags: ["api", "rest", "demo"]
9
+
10
+ settings:
11
+ base_url: "https://jsonplaceholder.typicode.com"
12
+ theme:
13
+ primary_color: "#3B82F6"
14
+
15
+ steps:
16
+ - slide: |
17
+ # REST API Demo
18
+
19
+ This demo showcases DemoScript features using the JSONPlaceholder API:
20
+
21
+ 1. **Fetch Users** - List users from the API
22
+ 2. **Get User Details** - Fetch a specific user
23
+ 3. **Create Post** - Submit data with form inputs
24
+ 4. **View Results** - See response handling
25
+
26
+ JSONPlaceholder is a free fake REST API for testing.
27
+
28
+ title: "Introduction"
29
+
30
+ - rest: GET /users
31
+ title: "List Users"
32
+ description: "Fetch all users from the API"
33
+ results:
34
+ - key: ""
35
+ label: "Users"
36
+ type: json
37
+ expandedDepth: 1
38
+
39
+ - rest: GET /users/1
40
+ title: "Get User Details"
41
+ description: "Fetch details for a specific user"
42
+ save:
43
+ userId: id
44
+ userName: name
45
+ userEmail: email
46
+ userCompany: company.name
47
+ results:
48
+ - key: ""
49
+ label: "Response"
50
+ type: json
51
+ expandedDepth: 2
52
+ - key: name
53
+ label: "Name"
54
+ - key: email
55
+ label: "Email"
56
+ - key: company.name
57
+ label: "Company"
58
+
59
+ - rest: POST /posts
60
+ title: "Create Post"
61
+ description: "Create a new post for the user"
62
+ form:
63
+ - name: title
64
+ label: "Post Title"
65
+ type: text
66
+ default: "Hello from DemoScript"
67
+ required: true
68
+ - name: body
69
+ label: "Post Content"
70
+ type: textarea
71
+ default: "This is a sample post created during the demo."
72
+ - name: userId
73
+ label: "User ID"
74
+ type: number
75
+ default: "$userId"
76
+ readonly: true
77
+ save:
78
+ postId: id
79
+ postTitle: title
80
+ results:
81
+ - key: ""
82
+ label: "Response"
83
+ type: json
84
+ expandedDepth: 1
85
+ - key: id
86
+ label: "Post ID"
87
+ - key: title
88
+ label: "Title"
89
+
90
+ - rest: GET /posts?userId=$userId
91
+ title: "Get User Posts"
92
+ description: "List all posts by the current user"
93
+ results:
94
+ - key: ""
95
+ label: "Posts"
96
+ type: table
97
+ columns:
98
+ - key: id
99
+ label: "ID"
100
+ - key: title
101
+ label: "Title"
102
+
103
+ - slide: |
104
+ # Demo Complete!
105
+
106
+ ### Summary
107
+
108
+ | Item | Value |
109
+ |------|-------|
110
+ | User | **$userName** |
111
+ | Email | $userEmail |
112
+ | Company | $userCompany |
113
+ | Created Post | "$postTitle" (ID: $postId) |
114
+
115
+ ### Variable Chaining
116
+
117
+ Notice how we saved the user ID from the first request and used it
118
+ in subsequent requests with `$userId`.
119
+
120
+ title: "Summary"
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>DemoScript</title>
8
+ <script type="module" crossorigin src="/assets/index.js"></script>
9
+ <link rel="stylesheet" crossorigin href="/assets/index.css">
10
+ </head>
11
+ <body>
12
+ <div id="root"></div>
13
+ </body>
14
+ </html>
@@ -5,8 +5,8 @@
5
5
  <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>DemoScript</title>
8
- <script type="module" crossorigin src="/assets/index-cngvCrhl.js"></script>
9
- <link rel="stylesheet" crossorigin href="/assets/index-DFwzKJ81.css">
8
+ <script type="module" crossorigin src="/assets/index-CtREFkwP.js"></script>
9
+ <link rel="stylesheet" crossorigin href="/assets/index-DTJEjfHv.css">
10
10
  </head>
11
11
  <body>
12
12
  <div id="root"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@demoscript/cli",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "CLI tool for DemoScript - create and present scripted product demonstrations",
5
5
  "type": "module",
6
6
  "bin": {
File without changes