@demoscript/cli 1.0.1 → 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.
- package/dist/bundle.cjs +43573 -0
- package/dist/commands/login.d.ts +4 -0
- package/dist/commands/login.d.ts.map +1 -0
- package/dist/commands/login.js +109 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/push.d.ts +9 -0
- package/dist/commands/push.d.ts.map +1 -0
- package/dist/commands/push.js +146 -0
- package/dist/commands/push.js.map +1 -0
- package/dist/index.js +3 -20
- package/dist/index.js.map +1 -1
- package/dist/lib/config.d.ts +12 -0
- package/dist/lib/config.d.ts.map +1 -0
- package/dist/lib/config.js +39 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/loader.d.ts.map +1 -1
- package/dist/lib/loader.js +53 -6
- package/dist/lib/loader.js.map +1 -1
- package/dist/lib/openapi.d.ts +11 -1
- package/dist/lib/openapi.d.ts.map +1 -1
- package/dist/lib/openapi.js +106 -0
- package/dist/lib/openapi.js.map +1 -1
- package/dist/lib/openapi.test.js +95 -3
- package/dist/lib/openapi.test.js.map +1 -1
- package/dist/types.d.ts +2 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/ui-dist/dist/assets/index-DZpZVgB7.js +177 -0
- package/dist/ui-dist/dist/assets/index-DZpZVgB7.js.map +1 -0
- package/dist/ui-dist/dist/assets/index-OFqwkvWn.css +1 -0
- package/dist/ui-dist/dist/assets/index-Uvktqp4J.js +177 -0
- package/dist/ui-dist/dist/assets/index-Uvktqp4J.js.map +1 -0
- package/dist/ui-dist/dist/assets/index-pTz7wI27.css +1 -0
- package/dist/ui-dist/dist/assets/index.css +1 -0
- package/dist/ui-dist/dist/assets/index.js +177 -0
- package/dist/ui-dist/dist/assets/index.js.map +1 -0
- package/dist/ui-dist/dist/demo.yaml +120 -0
- package/dist/ui-dist/dist/favicon.svg +10 -0
- package/dist/ui-dist/dist/index.html +14 -0
- package/package.json +1 -1
|
@@ -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,10 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="grad" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
4
|
+
<stop offset="0%" style="stop-color:#8b5cf6"/>
|
|
5
|
+
<stop offset="100%" style="stop-color:#6366f1"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
</defs>
|
|
8
|
+
<rect width="32" height="32" rx="6" fill="url(#grad)"/>
|
|
9
|
+
<path d="M12 8 L24 16 L12 24 Z" fill="white"/>
|
|
10
|
+
</svg>
|
|
@@ -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>
|