veryfront 0.0.1
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/LICENSE +21 -0
- package/README.md +7 -0
- package/package.json +49 -0
- package/scripts/postinstall.js +109 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Veryfront
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "veryfront",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "React meta-framework with AI-native capabilities",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"deno",
|
|
7
|
+
"framework",
|
|
8
|
+
"react",
|
|
9
|
+
"rsc",
|
|
10
|
+
"server-components",
|
|
11
|
+
"ai",
|
|
12
|
+
"agents",
|
|
13
|
+
"mcp",
|
|
14
|
+
"llm",
|
|
15
|
+
"anthropic",
|
|
16
|
+
"openai"
|
|
17
|
+
],
|
|
18
|
+
"homepage": "https://github.com/veryfront/veryfront#readme",
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/veryfront/veryfront.git"
|
|
22
|
+
},
|
|
23
|
+
"bugs": {
|
|
24
|
+
"url": "https://github.com/veryfront/veryfront/issues"
|
|
25
|
+
},
|
|
26
|
+
"license": "MIT",
|
|
27
|
+
"author": "Veryfront",
|
|
28
|
+
"bin": {
|
|
29
|
+
"veryfront": "./bin/veryfront"
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"scripts/postinstall.js"
|
|
33
|
+
],
|
|
34
|
+
"scripts": {
|
|
35
|
+
"postinstall": "node scripts/postinstall.js"
|
|
36
|
+
},
|
|
37
|
+
"engines": {
|
|
38
|
+
"node": ">=16.0.0"
|
|
39
|
+
},
|
|
40
|
+
"os": [
|
|
41
|
+
"darwin",
|
|
42
|
+
"linux",
|
|
43
|
+
"win32"
|
|
44
|
+
],
|
|
45
|
+
"cpu": [
|
|
46
|
+
"x64",
|
|
47
|
+
"arm64"
|
|
48
|
+
]
|
|
49
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Post-install script for Veryfront CLI
|
|
5
|
+
* Downloads the correct pre-compiled binary for the user's platform
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
const os = require('os');
|
|
9
|
+
const fs = require('fs');
|
|
10
|
+
const path = require('path');
|
|
11
|
+
const https = require('https');
|
|
12
|
+
const { execSync } = require('child_process');
|
|
13
|
+
|
|
14
|
+
const platform = os.platform();
|
|
15
|
+
const arch = os.arch();
|
|
16
|
+
const version = require('../package.json').version;
|
|
17
|
+
|
|
18
|
+
// Map platform/arch to binary names
|
|
19
|
+
const binaryMap = {
|
|
20
|
+
'darwin-x64': 'veryfront-macos-x64',
|
|
21
|
+
'darwin-arm64': 'veryfront-macos-arm64',
|
|
22
|
+
'linux-x64': 'veryfront-linux-x64',
|
|
23
|
+
'linux-arm64': 'veryfront-linux-arm64',
|
|
24
|
+
'win32-x64': 'veryfront-windows-x64.exe',
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const platformKey = `${platform}-${arch}`;
|
|
28
|
+
const binaryName = binaryMap[platformKey];
|
|
29
|
+
|
|
30
|
+
if (!binaryName) {
|
|
31
|
+
console.error(`ā Unsupported platform: ${platform}-${arch}`);
|
|
32
|
+
console.error('Supported platforms:', Object.keys(binaryMap).join(', '));
|
|
33
|
+
process.exit(1);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const binDir = path.join(__dirname, '..', 'bin');
|
|
37
|
+
const binPath = path.join(binDir, platform === 'win32' ? 'veryfront.exe' : 'veryfront');
|
|
38
|
+
|
|
39
|
+
// Create bin directory if it doesn't exist
|
|
40
|
+
if (!fs.existsSync(binDir)) {
|
|
41
|
+
fs.mkdirSync(binDir, { recursive: true });
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// GitHub release URL (update with your org/repo)
|
|
45
|
+
const baseUrl = `https://github.com/veryfront/veryfront/releases/download/v${version}`;
|
|
46
|
+
const url = `${baseUrl}/${binaryName}`;
|
|
47
|
+
|
|
48
|
+
console.log('š¦ Installing Veryfront CLI...');
|
|
49
|
+
console.log(` Platform: ${platform}-${arch}`);
|
|
50
|
+
console.log(` Version: ${version}`);
|
|
51
|
+
|
|
52
|
+
function downloadBinary(url, dest) {
|
|
53
|
+
return new Promise((resolve, reject) => {
|
|
54
|
+
const file = fs.createWriteStream(dest);
|
|
55
|
+
|
|
56
|
+
https.get(url, (response) => {
|
|
57
|
+
if (response.statusCode === 302 || response.statusCode === 301) {
|
|
58
|
+
// Follow redirect
|
|
59
|
+
https.get(response.headers.location, (redirectResponse) => {
|
|
60
|
+
redirectResponse.pipe(file);
|
|
61
|
+
file.on('finish', () => {
|
|
62
|
+
file.close();
|
|
63
|
+
resolve();
|
|
64
|
+
});
|
|
65
|
+
}).on('error', reject);
|
|
66
|
+
} else if (response.statusCode === 200) {
|
|
67
|
+
response.pipe(file);
|
|
68
|
+
file.on('finish', () => {
|
|
69
|
+
file.close();
|
|
70
|
+
resolve();
|
|
71
|
+
});
|
|
72
|
+
} else {
|
|
73
|
+
reject(new Error(`Failed to download: ${response.statusCode} ${response.statusMessage}`));
|
|
74
|
+
}
|
|
75
|
+
}).on('error', reject);
|
|
76
|
+
|
|
77
|
+
file.on('error', (err) => {
|
|
78
|
+
fs.unlinkSync(dest);
|
|
79
|
+
reject(err);
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
async function install() {
|
|
85
|
+
try {
|
|
86
|
+
console.log(`ā¬ļø Downloading binary from ${url}...`);
|
|
87
|
+
await downloadBinary(url, binPath);
|
|
88
|
+
|
|
89
|
+
// Make binary executable (Unix systems)
|
|
90
|
+
if (platform !== 'win32') {
|
|
91
|
+
fs.chmodSync(binPath, 0o755);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
console.log('ā
Veryfront CLI installed successfully!');
|
|
95
|
+
console.log('\nš Get started:');
|
|
96
|
+
console.log(' npx veryfront --help');
|
|
97
|
+
console.log(' npx veryfront create my-app');
|
|
98
|
+
|
|
99
|
+
} catch (error) {
|
|
100
|
+
console.error('ā Installation failed:', error.message);
|
|
101
|
+
console.error('\nš Manual installation:');
|
|
102
|
+
console.error(' 1. Download the binary from GitHub releases');
|
|
103
|
+
console.error(' 2. Place it in your PATH as "veryfront"');
|
|
104
|
+
console.error(` 3. URL: ${url}`);
|
|
105
|
+
process.exit(1);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
install();
|