Skip to content

Commit b3e1aaa

Browse files
Merge branch 'mainnet' into feat/client-side-await-aleo-futures
2 parents 29d26a0 + 2759585 commit b3e1aaa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+5481
-4230
lines changed

.circleci/config.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,15 @@ jobs:
9393
command: |
9494
yarn start
9595
96+
create-leo-app-cli:
97+
executor: rust-node
98+
steps:
99+
- setup
100+
- run:
101+
working_directory: create-leo-app
102+
command: |
103+
npm i -D tsx
104+
npx tsx src/index.ts test-app --template react-leo
96105
97106
template-node:
98107
executor: rust-node
@@ -172,6 +181,9 @@ workflows:
172181
- e2e-mainnet:
173182
requires:
174183
- sdk
184+
- create-leo-app-cli:
185+
requires:
186+
- sdk
175187
- template-node:
176188
requires:
177189
- sdk

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
**/tmp
99
storage*/
1010
**/.next
11+
*.zip
1112

1213
## OS Files
1314
**.DS_Store

create-leo-app/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ npm create leo-app@latest
1313

1414
Then follow the prompts!
1515

16-
You can also directly specify the project name you want to use via additional command line options. For example, to scaffold a Leo project, run:
16+
You can also directly specify the project name and template you want to use via additional command line options. For example, to scaffold a Leo project using the Vanilla JavaScript template, run:
1717

1818
```bash
1919
# npm 6.x
20-
npm create leo-app@latest my-leo-app
20+
npm create leo-app@latest my-leo-app --template vanilla
2121

2222
# npm 7+, extra double-dash is needed:
23-
npm create leo-app@latest my-leo-app
23+
npm create leo-app@latest my-leo-app -- --template vanilla
2424
```
2525

2626
Currently supported template presets include:

create-leo-app/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "create-leo-app",
3-
"version": "0.8.6",
3+
"version": "0.8.8",
44
"type": "module",
55
"license": "GPL-3.0",
66
"collaborators": [
@@ -34,6 +34,8 @@
3434
"kolorist": "^1.8.0",
3535
"minimist": "^1.2.8",
3636
"prompts": "^2.4.2",
37+
"ts-node": "^10.9.2",
38+
"typescript": "^5.8.2",
3739
"unbuild": "^3.3.1"
3840
}
3941
}

create-leo-app/src/index.ts

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,20 @@ async function init() {
9292
const getProjectName = () =>
9393
targetDir === "." ? path.basename(path.resolve()) : targetDir;
9494

95+
let selectedFramework: Framework | undefined;
96+
let selectedVariant: string | undefined;
97+
98+
if (argTemplate && TEMPLATES.includes(argTemplate)) {
99+
for (const framework of FRAMEWORKS) {
100+
const match = framework.variants.find((v) => v.name === argTemplate);
101+
if (match) {
102+
selectedFramework = framework;
103+
selectedVariant = match.name;
104+
break;
105+
}
106+
}
107+
}
108+
95109
let result: prompts.Answers<
96110
"projectName" | "overwrite" | "packageName" | "framework" | "variant"
97111
>;
@@ -136,8 +150,7 @@ async function init() {
136150
isValidPackageName(dir) || "Invalid package.json name",
137151
},
138152
{
139-
type:
140-
argTemplate && TEMPLATES.includes(argTemplate) ? null : "select",
153+
type: selectedFramework ? null : "select",
141154
name: "framework",
142155
message:
143156
typeof argTemplate === "string" && !TEMPLATES.includes(argTemplate)
@@ -155,8 +168,7 @@ async function init() {
155168
}),
156169
},
157170
{
158-
type: (framework: Framework) =>
159-
framework && framework.variants ? "select" : null,
171+
type: selectedVariant ? null : "select",
160172
name: "variant",
161173
message: reset("Select a variant:"),
162174
choices: (framework: Framework) =>

create-leo-app/template-extension/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"build": "rimraf static/js && rollup --config"
88
},
99
"devDependencies": {
10-
"@provablehq/sdk": "^0.8.0",
10+
"@provablehq/sdk": "^0.8.8",
1111
"@web/rollup-plugin-import-meta-assets": "^2.2.1",
1212
"rimraf": "^6.0.1",
1313
"rollup": "^4.32.0"

create-leo-app/template-nextjs-ts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"lint": "next lint"
1010
},
1111
"dependencies": {
12-
"@provablehq/sdk": "^0.8.0",
12+
"@provablehq/sdk": "^0.8.8",
1313
"next": "15.2.3",
1414
"react": "^19.0.0",
1515
"react-dom": "^19.0.0",

create-leo-app/template-node-ts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"dev": "npm run build && node dist/index.js"
99
},
1010
"dependencies": {
11-
"@provablehq/sdk": "^0.8.0"
11+
"@provablehq/sdk": "^0.8.8"
1212
},
1313
"devDependencies": {
1414
"rimraf": "^6.0.1",

create-leo-app/template-node/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
"dev": "node index.js"
88
},
99
"dependencies": {
10-
"@provablehq/sdk": "^0.8.0"
10+
"@provablehq/sdk": "^0.8.8"
1111
}
1212
}

create-leo-app/template-offline-public-transaction-ts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"dev": "npm run build && node dist/index.js"
99
},
1010
"dependencies": {
11-
"@provablehq/sdk": "^0.8.0"
11+
"@provablehq/sdk": "^0.8.8"
1212
},
1313
"devDependencies": {
1414
"rimraf": "^6.0.1",

0 commit comments

Comments
 (0)