@better-sol/cli 0.1.0-alpha.4 → 0.1.0-alpha.5
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 +13 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3036,11 +3036,18 @@ function primitiveLayout(type) {
|
|
|
3036
3036
|
//#endregion
|
|
3037
3037
|
//#region src/parser/discover.ts
|
|
3038
3038
|
function globToRegex(pattern) {
|
|
3039
|
-
const
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3039
|
+
const parts = pattern.split("/");
|
|
3040
|
+
const regexParts = [];
|
|
3041
|
+
for (let i = 0; i < parts.length; i++) {
|
|
3042
|
+
const part = parts[i];
|
|
3043
|
+
const isLast = i === parts.length - 1;
|
|
3044
|
+
if (part === "**") regexParts.push("(.*\\/)?");
|
|
3045
|
+
else {
|
|
3046
|
+
regexParts.push(part.replace(/[.+^${}()|[\]\\]/g, "\\$&").replace(/\*/g, "[^/]*").replace(/\?/g, "[^/]"));
|
|
3047
|
+
if (!isLast) regexParts.push("/");
|
|
3048
|
+
}
|
|
3049
|
+
}
|
|
3050
|
+
return new RegExp(`^${regexParts.join("")}$`);
|
|
3044
3051
|
}
|
|
3045
3052
|
async function findFiles(pattern) {
|
|
3046
3053
|
const regex = globToRegex(pattern);
|
|
@@ -69252,7 +69259,7 @@ async function gitCommit() {
|
|
|
69252
69259
|
//#endregion
|
|
69253
69260
|
//#region src/index.ts
|
|
69254
69261
|
const cli = new Command();
|
|
69255
|
-
cli.name("better-sol").description("TypeScript-first Solana program tooling — run with npx @better-sol/cli").version("0.1.0-alpha.
|
|
69262
|
+
cli.name("better-sol").description("TypeScript-first Solana program tooling — run with npx @better-sol/cli").version("0.1.0-alpha.5");
|
|
69256
69263
|
cli.command("init").description("Initialize a better-sol project").option("--force", "overwrite existing files", false).option("--skip-install", "skip installing dependencies", false).action((options) => run(() => init(options)));
|
|
69257
69264
|
cli.command("create").description("Create a new better-sol program").argument("[name]", "program name").option("--dir <dir>", "program directory", "programs").option("--force", "overwrite existing files", false).action((name, options) => run(() => create(name, options)));
|
|
69258
69265
|
cli.command("login").description("Save your compiler API key").action(() => run(() => login()));
|