-
Notifications
You must be signed in to change notification settings - Fork 294
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(docs): update box readme, remove duplicated features, added box…
… install to the docs (#8254) ### TL;DR (AI generated) Simplified the Aztec app creation process by removing sandbox-related functionality and updating documentation. ### What changed? - Removed sandbox installation, update, and run steps from the `aztec-app` command. - Updated README files and documentation to reflect the removal of sandbox-related features. - Changed the command from `npx create-aztec-app` to `npx aztec-app` throughout the project. - Removed sandbox-related scripts and dependencies. - Updated the onCreateCommand script in the devcontainer configuration. ### How to test? 1. Run `npx aztec-app` and verify that it only prompts for project options without mentioning sandbox installation. 2. Check that the README files in various boxes (react, vanilla, contract-only) no longer mention sandbox installation or management. 3. Verify that the devcontainer script uses the new `npx aztec-app` command. ### Why make this change? This change simplifies the Aztec app creation process by focusing solely on project setup and removing the complexity of sandbox management. It allows users to handle sandbox installation and management separately, providing a more streamlined experience for creating Aztec projects.
- Loading branch information
1 parent
c4dbcab
commit b747ac1
Showing
18 changed files
with
1,688 additions
and
980 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
import { parse } from "@iarna/toml"; | ||
import axios from "axios"; | ||
import { execSync } from "child_process"; | ||
import fs from "fs/promises"; | ||
import path from "path"; | ||
import { describe, test, expect, beforeAll } from "vitest"; | ||
|
||
const getLatestStable = async () => { | ||
try { | ||
const { data } = await axios.get( | ||
`https://api.github.com/repos/AztecProtocol/aztec-packages/releases`, | ||
); | ||
return data[0].tag_name.split("-v")[1]; | ||
} catch (error) { | ||
console.error("Error fetching latest stable version:", error); | ||
return; | ||
} | ||
}; | ||
|
||
const version = await getLatestStable(); | ||
const tag = version.match(/^\d+\.\d+\.\d+$/) | ||
? `aztec-packages-v${version}` | ||
: version; | ||
|
||
describe("Token contract", () => { | ||
beforeAll(() => { | ||
try { | ||
execSync("npx . new -d -t contract -n token_contract", { | ||
stdio: "inherit", | ||
}); | ||
} catch (error) { | ||
console.error("Error executing command:", error); | ||
} | ||
}); | ||
|
||
test("Paths were updated correctly", async () => { | ||
const replaces = []; | ||
const findAndReplace = async (dir, prefix) => { | ||
const files = await fs.readdir(dir, { | ||
withFileTypes: true, | ||
}); | ||
files.forEach(async (file) => { | ||
const filePath = path.join(dir, file.name); | ||
if (file.isDirectory()) { | ||
findAndReplace(filePath, prefix); // Recursively search subdirectories | ||
} else if (file.name === "Nargo.toml") { | ||
replaces.push( | ||
new Promise(async (resolve, reject) => { | ||
let content = parse(await fs.readFile(filePath, "utf8")); | ||
if (!content.dependencies) return; | ||
resolve( | ||
Object.keys(content.dependencies) | ||
.filter((dep) => dep.match("@aztec")) | ||
.every( | ||
(dep) => | ||
content.dependencies[dep] === | ||
JSON.stringify({ | ||
git: `https://github.com/${AZTEC_REPO}/`, | ||
tag, | ||
directory: `${prefix}${directory}`, | ||
}), | ||
), | ||
); | ||
}), | ||
); | ||
} else if (file.name === "package.json") { | ||
replaces.push( | ||
new Promise(async (resolve, reject) => { | ||
let content = JSON.parse(await fs.readFile(filePath, "utf8")); | ||
if (!content.dependencies) return; | ||
resolve( | ||
Object.keys(content.dependencies) | ||
.filter((deps) => deps.match("@aztec")) | ||
// "master" actually means "latest" for the npm release | ||
.every( | ||
(dep) => | ||
content.dependencies[dep] === | ||
`${version === "master" ? "latest" : `^${version}`}`, | ||
), | ||
); | ||
}), | ||
); | ||
} | ||
}); | ||
}; | ||
|
||
await findAndReplace(path.resolve("./token_contract"), ""); | ||
const res = await Promise.all(replaces); | ||
expect(res).toEqual([true, true]); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.