skrypt-ai 0.3.0 → 0.3.2
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/cli.js
CHANGED
|
@@ -18,7 +18,7 @@ import { loginCommand, logoutCommand, whoamiCommand } from './commands/login.js'
|
|
|
18
18
|
import { cronCommand } from './commands/cron.js';
|
|
19
19
|
import { deployCommand } from './commands/deploy.js';
|
|
20
20
|
import { testCommand } from './commands/test.js';
|
|
21
|
-
const VERSION = '0.3.
|
|
21
|
+
const VERSION = '0.3.2';
|
|
22
22
|
async function checkForUpdates() {
|
|
23
23
|
try {
|
|
24
24
|
const res = await fetch('https://registry.npmjs.org/skrypt-ai/latest', {
|
package/dist/commands/init.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Command } from 'commander';
|
|
2
2
|
import { existsSync, mkdirSync, cpSync, readFileSync, writeFileSync, readdirSync } from 'fs';
|
|
3
|
-
import { join, dirname } from 'path';
|
|
3
|
+
import { join, dirname, resolve } from 'path';
|
|
4
4
|
import { fileURLToPath } from 'url';
|
|
5
5
|
const __filename = fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = dirname(__filename);
|
|
@@ -9,7 +9,7 @@ export const initCommand = new Command('init')
|
|
|
9
9
|
.argument('[directory]', 'Target directory', '.')
|
|
10
10
|
.option('--name <name>', 'Project name', 'my-docs')
|
|
11
11
|
.action(async (directory, options) => {
|
|
12
|
-
const targetDir =
|
|
12
|
+
const targetDir = resolve(directory);
|
|
13
13
|
console.log('skrypt init');
|
|
14
14
|
console.log(` directory: ${targetDir}`);
|
|
15
15
|
console.log(` name: ${options.name}`);
|
|
@@ -41,6 +41,7 @@ export const initCommand = new Command('init')
|
|
|
41
41
|
const docsJsonPath = join(targetDir, 'docs.json');
|
|
42
42
|
const docsJson = JSON.parse(readFileSync(docsJsonPath, 'utf-8'));
|
|
43
43
|
docsJson.name = options.name;
|
|
44
|
+
docsJson.description = `${options.name} documentation`;
|
|
44
45
|
writeFileSync(docsJsonPath, JSON.stringify(docsJson, null, 2));
|
|
45
46
|
console.log('');
|
|
46
47
|
console.log('Done! Next steps:');
|
package/dist/template/docs.json
CHANGED
|
@@ -1,31 +1,27 @@
|
|
|
1
1
|
# Introduction
|
|
2
2
|
|
|
3
|
-
Welcome to the
|
|
3
|
+
Welcome to the documentation. This guide will help you get started.
|
|
4
4
|
|
|
5
5
|
<CardGroup cols={2}>
|
|
6
6
|
<Card title="Quick Start" icon="Zap" href="/docs/quickstart">
|
|
7
7
|
Get up and running in under 5 minutes
|
|
8
8
|
</Card>
|
|
9
|
-
<Card title="
|
|
10
|
-
Explore all available
|
|
9
|
+
<Card title="Reference" icon="Code" href="/docs/api">
|
|
10
|
+
Explore all available APIs
|
|
11
11
|
</Card>
|
|
12
12
|
</CardGroup>
|
|
13
13
|
|
|
14
|
-
##
|
|
15
|
-
|
|
16
|
-
<Info title="Full API Access">
|
|
17
|
-
Our API provides complete access to all platform features with comprehensive documentation.
|
|
18
|
-
</Info>
|
|
14
|
+
## Getting Started
|
|
19
15
|
|
|
20
16
|
<Steps>
|
|
21
|
-
<Step title="
|
|
22
|
-
Install
|
|
17
|
+
<Step title="Installation">
|
|
18
|
+
Install the package using your preferred package manager.
|
|
23
19
|
</Step>
|
|
24
|
-
<Step title="
|
|
25
|
-
Set up your
|
|
20
|
+
<Step title="Configuration">
|
|
21
|
+
Set up your configuration and credentials.
|
|
26
22
|
</Step>
|
|
27
|
-
<Step title="
|
|
28
|
-
Start
|
|
23
|
+
<Step title="First Steps">
|
|
24
|
+
Start using the library in your project.
|
|
29
25
|
</Step>
|
|
30
26
|
</Steps>
|
|
31
27
|
|
|
@@ -34,8 +30,8 @@ Welcome to the API documentation. This guide will help you get started with inte
|
|
|
34
30
|
<CodeGroup>
|
|
35
31
|
|
|
36
32
|
```typescript
|
|
37
|
-
// TypeScript
|
|
38
|
-
import { Client } from 'your-
|
|
33
|
+
// TypeScript example
|
|
34
|
+
import { Client } from 'your-package'
|
|
39
35
|
|
|
40
36
|
const client = new Client({
|
|
41
37
|
apiKey: process.env.API_KEY
|
|
@@ -45,8 +41,8 @@ const result = await client.getData()
|
|
|
45
41
|
```
|
|
46
42
|
|
|
47
43
|
```python
|
|
48
|
-
# Python
|
|
49
|
-
from
|
|
44
|
+
# Python example
|
|
45
|
+
from your_package import Client
|
|
50
46
|
|
|
51
47
|
client = Client(api_key=os.environ["API_KEY"])
|
|
52
48
|
|
|
@@ -55,13 +51,13 @@ result = client.get_data()
|
|
|
55
51
|
|
|
56
52
|
</CodeGroup>
|
|
57
53
|
|
|
58
|
-
##
|
|
54
|
+
## Need Help?
|
|
59
55
|
|
|
60
56
|
<AccordionGroup>
|
|
61
|
-
<Accordion title="
|
|
62
|
-
|
|
57
|
+
<Accordion title="Where can I get support?">
|
|
58
|
+
Check the GitHub repository for issues and discussions.
|
|
63
59
|
</Accordion>
|
|
64
|
-
<Accordion title="
|
|
65
|
-
|
|
60
|
+
<Accordion title="How do I report bugs?">
|
|
61
|
+
Open an issue on GitHub with reproduction steps.
|
|
66
62
|
</Accordion>
|
|
67
63
|
</AccordionGroup>
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
import Link from 'next/link'
|
|
2
|
+
import { readFileSync } from 'fs'
|
|
3
|
+
import { join } from 'path'
|
|
4
|
+
|
|
5
|
+
function getDocsConfig() {
|
|
6
|
+
const configPath = join(process.cwd(), 'docs.json')
|
|
7
|
+
const content = readFileSync(configPath, 'utf-8')
|
|
8
|
+
return JSON.parse(content)
|
|
9
|
+
}
|
|
2
10
|
|
|
3
11
|
export default function Home() {
|
|
12
|
+
const docsConfig = getDocsConfig()
|
|
13
|
+
|
|
4
14
|
return (
|
|
5
15
|
<main className="min-h-screen flex flex-col items-center justify-center p-8">
|
|
6
|
-
<h1 className="text-4xl font-bold mb-4">
|
|
16
|
+
<h1 className="text-4xl font-bold mb-4">{docsConfig.name} Documentation</h1>
|
|
7
17
|
<p className="text-[var(--color-text-secondary)] mb-8 text-center max-w-xl">
|
|
8
|
-
|
|
18
|
+
{docsConfig.description}
|
|
9
19
|
</p>
|
|
10
20
|
<Link
|
|
11
21
|
href="/docs"
|
|
@@ -26,9 +26,9 @@ export function Card({ title, icon, href, children }: CardProps) {
|
|
|
26
26
|
<div>
|
|
27
27
|
<h3 className="font-medium text-[var(--color-text)]">{title}</h3>
|
|
28
28
|
{children && (
|
|
29
|
-
<
|
|
29
|
+
<div className="mt-1 text-sm text-[var(--color-text-secondary)]">
|
|
30
30
|
{children}
|
|
31
|
-
</
|
|
31
|
+
</div>
|
|
32
32
|
)}
|
|
33
33
|
</div>
|
|
34
34
|
</div>
|