@elizaos/cli 1.5.0 ā 1.5.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/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/dist/templates/plugin-quick-starter/build.ts +72 -21
- package/dist/templates/plugin-quick-starter/package.json +2 -2
- package/dist/templates/plugin-starter/build.ts +72 -21
- package/dist/templates/plugin-starter/package.json +2 -2
- package/dist/templates/project-starter/build.ts +83 -30
- package/dist/templates/project-starter/package.json +4 -4
- package/dist/templates/project-tee-starter/build.ts +83 -30
- package/dist/templates/project-tee-starter/package.json +4 -4
- package/dist/templates/project-tee-starter/src/__tests__/env.test.ts +1 -1
- package/dist/templates/project-tee-starter/src/__tests__/file-structure.test.ts +1 -1
- package/package.json +7 -7
- package/templates/plugin-quick-starter/build.ts +72 -21
- package/templates/plugin-quick-starter/package.json +2 -2
- package/templates/plugin-starter/build.ts +72 -21
- package/templates/plugin-starter/package.json +2 -2
- package/templates/project-starter/build.ts +83 -30
- package/templates/project-starter/package.json +4 -4
- package/templates/project-tee-starter/build.ts +83 -30
- package/templates/project-tee-starter/package.json +4 -4
- package/templates/project-tee-starter/src/__tests__/env.test.ts +1 -1
- package/templates/project-tee-starter/src/__tests__/file-structure.test.ts +1 -1
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
"package.json"
|
|
41
41
|
],
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@elizaos/core": "1.5.
|
|
43
|
+
"@elizaos/core": "1.5.2",
|
|
44
44
|
"zod": "^3.24.4"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@elizaos/cli": "1.5.
|
|
47
|
+
"@elizaos/cli": "1.5.2",
|
|
48
48
|
"dotenv": "16.4.5",
|
|
49
49
|
"prettier": "3.5.3",
|
|
50
50
|
"typescript": "5.8.2"
|
|
@@ -1,27 +1,78 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Self-contained build script for ElizaOS plugins
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
outdir
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
6
|
+
import { existsSync } from 'node:fs';
|
|
7
|
+
import { rm } from 'node:fs/promises';
|
|
8
|
+
import { $ } from 'bun';
|
|
9
|
+
|
|
10
|
+
async function cleanBuild(outdir = 'dist') {
|
|
11
|
+
if (existsSync(outdir)) {
|
|
12
|
+
await rm(outdir, { recursive: true, force: true });
|
|
13
|
+
console.log(`ā Cleaned ${outdir} directory`);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
async function build() {
|
|
18
|
+
const start = performance.now();
|
|
19
|
+
console.log('š Building plugin...\n');
|
|
20
|
+
|
|
21
|
+
try {
|
|
22
|
+
// Clean previous build
|
|
23
|
+
await cleanBuild('dist');
|
|
24
|
+
|
|
25
|
+
// Build with Bun
|
|
26
|
+
console.log('Bundling with Bun...');
|
|
27
|
+
const result = await Bun.build({
|
|
28
|
+
entrypoints: ['./src/index.ts'],
|
|
29
|
+
outdir: './dist',
|
|
30
|
+
target: 'node',
|
|
31
|
+
format: 'esm',
|
|
32
|
+
sourcemap: true,
|
|
33
|
+
minify: false,
|
|
34
|
+
external: ['dotenv', 'node:*', '@elizaos/core', '@elizaos/cli', 'zod'],
|
|
35
|
+
naming: {
|
|
36
|
+
entry: '[dir]/[name].[ext]',
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
if (!result.success) {
|
|
41
|
+
console.error('ā Build failed:', result.logs);
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const totalSize = result.outputs.reduce((sum, output) => sum + output.size, 0);
|
|
46
|
+
const sizeMB = (totalSize / 1024 / 1024).toFixed(2);
|
|
47
|
+
console.log(`ā Built ${result.outputs.length} file(s) - ${sizeMB}MB`);
|
|
48
|
+
|
|
49
|
+
// Generate TypeScript declarations
|
|
50
|
+
console.log('\nGenerating TypeScript declarations...');
|
|
51
|
+
try {
|
|
52
|
+
await $`tsc --emitDeclarationOnly --incremental --project ./tsconfig.build.json`.quiet();
|
|
53
|
+
console.log('ā TypeScript declarations generated');
|
|
54
|
+
} catch (error) {
|
|
55
|
+
console.warn('ā Failed to generate TypeScript declarations');
|
|
56
|
+
console.warn(' This is usually due to test files or type errors.');
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const elapsed = ((performance.now() - start) / 1000).toFixed(2);
|
|
60
|
+
console.log(`\nā
Build complete! (${elapsed}s)\n`);
|
|
61
|
+
return true;
|
|
62
|
+
} catch (error) {
|
|
63
|
+
console.error('Build error:', error);
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
22
67
|
|
|
23
68
|
// Execute the build
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
69
|
+
build()
|
|
70
|
+
.then((success) => {
|
|
71
|
+
if (!success) {
|
|
72
|
+
process.exit(1);
|
|
73
|
+
}
|
|
74
|
+
})
|
|
75
|
+
.catch((error) => {
|
|
76
|
+
console.error('Build script error:', error);
|
|
77
|
+
process.exit(1);
|
|
78
|
+
});
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"package.json"
|
|
41
41
|
],
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@elizaos/core": "1.5.
|
|
43
|
+
"@elizaos/core": "1.5.2",
|
|
44
44
|
"@tanstack/react-query": "^5.80.7",
|
|
45
45
|
"clsx": "^2.1.1",
|
|
46
46
|
"tailwind-merge": "^3.3.1",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"zod": "3.24.2"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@elizaos/cli": "1.5.
|
|
52
|
+
"@elizaos/cli": "1.5.2",
|
|
53
53
|
"@tailwindcss/vite": "^4.1.10",
|
|
54
54
|
"@vitejs/plugin-react-swc": "^3.10.2",
|
|
55
55
|
"dotenv": "16.4.5",
|
|
@@ -1,36 +1,89 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Self-contained build script for ElizaOS projects
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
outdir
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
6
|
+
import { existsSync } from 'node:fs';
|
|
7
|
+
import { rm } from 'node:fs/promises';
|
|
8
|
+
import { $ } from 'bun';
|
|
9
|
+
|
|
10
|
+
async function cleanBuild(outdir = 'dist') {
|
|
11
|
+
if (existsSync(outdir)) {
|
|
12
|
+
await rm(outdir, { recursive: true, force: true });
|
|
13
|
+
console.log(`ā Cleaned ${outdir} directory`);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
async function build() {
|
|
18
|
+
const start = performance.now();
|
|
19
|
+
console.log('š Building project...\n');
|
|
20
|
+
|
|
21
|
+
try {
|
|
22
|
+
// Clean previous build
|
|
23
|
+
await cleanBuild('dist');
|
|
24
|
+
|
|
25
|
+
// Build with Bun
|
|
26
|
+
console.log('Bundling with Bun...');
|
|
27
|
+
const result = await Bun.build({
|
|
28
|
+
entrypoints: ['./src/index.ts'],
|
|
29
|
+
outdir: './dist',
|
|
30
|
+
target: 'node',
|
|
31
|
+
format: 'esm',
|
|
32
|
+
sourcemap: true,
|
|
33
|
+
minify: false,
|
|
34
|
+
external: [
|
|
35
|
+
'dotenv',
|
|
36
|
+
'fs',
|
|
37
|
+
'path',
|
|
38
|
+
'https',
|
|
39
|
+
'node:*',
|
|
40
|
+
'@elizaos/core',
|
|
41
|
+
'@elizaos/plugin-bootstrap',
|
|
42
|
+
'@elizaos/plugin-sql',
|
|
43
|
+
'@elizaos/cli',
|
|
44
|
+
'zod',
|
|
45
|
+
],
|
|
46
|
+
naming: {
|
|
47
|
+
entry: '[dir]/[name].[ext]',
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
if (!result.success) {
|
|
52
|
+
console.error('ā Build failed:', result.logs);
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const totalSize = result.outputs.reduce((sum, output) => sum + output.size, 0);
|
|
57
|
+
const sizeMB = (totalSize / 1024 / 1024).toFixed(2);
|
|
58
|
+
console.log(`ā Built ${result.outputs.length} file(s) - ${sizeMB}MB`);
|
|
59
|
+
|
|
60
|
+
// Generate TypeScript declarations
|
|
61
|
+
console.log('\nGenerating TypeScript declarations...');
|
|
62
|
+
try {
|
|
63
|
+
await $`tsc --emitDeclarationOnly --incremental --project ./tsconfig.build.json`.quiet();
|
|
64
|
+
console.log('ā TypeScript declarations generated');
|
|
65
|
+
} catch (error) {
|
|
66
|
+
console.warn('ā Failed to generate TypeScript declarations');
|
|
67
|
+
console.warn(' This is usually due to test files or type errors.');
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const elapsed = ((performance.now() - start) / 1000).toFixed(2);
|
|
71
|
+
console.log(`\nā
Build complete! (${elapsed}s)\n`);
|
|
72
|
+
return true;
|
|
73
|
+
} catch (error) {
|
|
74
|
+
console.error('Build error:', error);
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
31
78
|
|
|
32
79
|
// Execute the build
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
80
|
+
build()
|
|
81
|
+
.then((success) => {
|
|
82
|
+
if (!success) {
|
|
83
|
+
process.exit(1);
|
|
84
|
+
}
|
|
85
|
+
})
|
|
86
|
+
.catch((error) => {
|
|
87
|
+
console.error('Build script error:', error);
|
|
88
|
+
process.exit(1);
|
|
89
|
+
});
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
"dist"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@elizaos/cli": "1.5.
|
|
32
|
-
"@elizaos/core": "1.5.
|
|
33
|
-
"@elizaos/plugin-bootstrap": "1.5.
|
|
34
|
-
"@elizaos/plugin-sql": "1.5.
|
|
31
|
+
"@elizaos/cli": "1.5.2",
|
|
32
|
+
"@elizaos/core": "1.5.2",
|
|
33
|
+
"@elizaos/plugin-bootstrap": "1.5.2",
|
|
34
|
+
"@elizaos/plugin-sql": "1.5.2",
|
|
35
35
|
"@tanstack/react-query": "^5.29.0",
|
|
36
36
|
"clsx": "^2.1.1",
|
|
37
37
|
"react": "^18.3.1",
|
|
@@ -1,36 +1,89 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Self-contained build script for ElizaOS TEE projects
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
outdir
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
6
|
+
import { existsSync } from 'node:fs';
|
|
7
|
+
import { rm } from 'node:fs/promises';
|
|
8
|
+
import { $ } from 'bun';
|
|
9
|
+
|
|
10
|
+
async function cleanBuild(outdir = 'dist') {
|
|
11
|
+
if (existsSync(outdir)) {
|
|
12
|
+
await rm(outdir, { recursive: true, force: true });
|
|
13
|
+
console.log(`ā Cleaned ${outdir} directory`);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
async function build() {
|
|
18
|
+
const start = performance.now();
|
|
19
|
+
console.log('š Building TEE project...\n');
|
|
20
|
+
|
|
21
|
+
try {
|
|
22
|
+
// Clean previous build
|
|
23
|
+
await cleanBuild('dist');
|
|
24
|
+
|
|
25
|
+
// Build with Bun
|
|
26
|
+
console.log('Bundling with Bun...');
|
|
27
|
+
const result = await Bun.build({
|
|
28
|
+
entrypoints: ['./src/index.ts'],
|
|
29
|
+
outdir: './dist',
|
|
30
|
+
target: 'node',
|
|
31
|
+
format: 'esm',
|
|
32
|
+
sourcemap: true,
|
|
33
|
+
minify: false,
|
|
34
|
+
external: [
|
|
35
|
+
'dotenv',
|
|
36
|
+
'fs',
|
|
37
|
+
'path',
|
|
38
|
+
'https',
|
|
39
|
+
'node:*',
|
|
40
|
+
'@elizaos/core',
|
|
41
|
+
'@elizaos/plugin-bootstrap',
|
|
42
|
+
'@elizaos/plugin-sql',
|
|
43
|
+
'@elizaos/cli',
|
|
44
|
+
'zod',
|
|
45
|
+
],
|
|
46
|
+
naming: {
|
|
47
|
+
entry: '[dir]/[name].[ext]',
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
if (!result.success) {
|
|
52
|
+
console.error('ā Build failed:', result.logs);
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const totalSize = result.outputs.reduce((sum, output) => sum + output.size, 0);
|
|
57
|
+
const sizeMB = (totalSize / 1024 / 1024).toFixed(2);
|
|
58
|
+
console.log(`ā Built ${result.outputs.length} file(s) - ${sizeMB}MB`);
|
|
59
|
+
|
|
60
|
+
// Generate TypeScript declarations
|
|
61
|
+
console.log('\nGenerating TypeScript declarations...');
|
|
62
|
+
try {
|
|
63
|
+
await $`tsc --emitDeclarationOnly --incremental --project ./tsconfig.build.json`.quiet();
|
|
64
|
+
console.log('ā TypeScript declarations generated');
|
|
65
|
+
} catch (error) {
|
|
66
|
+
console.warn('ā Failed to generate TypeScript declarations');
|
|
67
|
+
console.warn(' This is usually due to test files or type errors.');
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const elapsed = ((performance.now() - start) / 1000).toFixed(2);
|
|
71
|
+
console.log(`\nā
Build complete! (${elapsed}s)\n`);
|
|
72
|
+
return true;
|
|
73
|
+
} catch (error) {
|
|
74
|
+
console.error('Build error:', error);
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
31
78
|
|
|
32
79
|
// Execute the build
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
80
|
+
build()
|
|
81
|
+
.then((success) => {
|
|
82
|
+
if (!success) {
|
|
83
|
+
process.exit(1);
|
|
84
|
+
}
|
|
85
|
+
})
|
|
86
|
+
.catch((error) => {
|
|
87
|
+
console.error('Build script error:', error);
|
|
88
|
+
process.exit(1);
|
|
89
|
+
});
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
"GUIDE.md"
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@elizaos/cli": "1.5.
|
|
37
|
-
"@elizaos/core": "1.5.
|
|
38
|
-
"@elizaos/plugin-bootstrap": "1.5.
|
|
36
|
+
"@elizaos/cli": "1.5.2",
|
|
37
|
+
"@elizaos/core": "1.5.2",
|
|
38
|
+
"@elizaos/plugin-bootstrap": "1.5.2",
|
|
39
39
|
"@elizaos/plugin-redpill": "1.2.1",
|
|
40
|
-
"@elizaos/plugin-sql": "1.5.
|
|
40
|
+
"@elizaos/plugin-sql": "1.5.2",
|
|
41
41
|
"@phala/dstack-sdk": "0.1.11",
|
|
42
42
|
"@solana/web3.js": "1.98.2",
|
|
43
43
|
"@tanstack/react-query": "^5.29.0",
|
|
@@ -77,7 +77,7 @@ describe('Environment Setup', () => {
|
|
|
77
77
|
expect(fs.existsSync(buildScriptPath)).toBe(true);
|
|
78
78
|
|
|
79
79
|
const buildScript = fs.readFileSync(buildScriptPath, 'utf8');
|
|
80
|
-
expect(buildScript).toContain('
|
|
80
|
+
expect(buildScript).toContain('Bun.build');
|
|
81
81
|
expect(buildScript).toContain('entrypoints');
|
|
82
82
|
expect(buildScript).toContain('src/index.ts');
|
|
83
83
|
});
|
|
@@ -124,7 +124,7 @@ describe('Project Structure Validation', () => {
|
|
|
124
124
|
|
|
125
125
|
// Check that build.ts exists and contains proper configuration
|
|
126
126
|
const buildScript = fs.readFileSync(path.join(rootDir, 'build.ts'), 'utf8');
|
|
127
|
-
expect(buildScript).toContain('
|
|
127
|
+
expect(buildScript).toContain('Bun.build');
|
|
128
128
|
expect(buildScript).toContain('entrypoints');
|
|
129
129
|
});
|
|
130
130
|
});
|