@tscircuit/cli 0.1.89 → 0.1.90
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/main.js +14 -6
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -348861,7 +348861,7 @@ Expected ` + (val42.length + 1) + " quasis but got " + node2.quasis.length);
|
|
|
348861
348861
|
return p;
|
|
348862
348862
|
}).join("/"));
|
|
348863
348863
|
}
|
|
348864
|
-
function
|
|
348864
|
+
function relative6(from2, to) {
|
|
348865
348865
|
from2 = resolve$2(from2).substr(1);
|
|
348866
348866
|
to = resolve$2(to).substr(1);
|
|
348867
348867
|
function trim(arr) {
|
|
@@ -348924,7 +348924,7 @@ Expected ` + (val42.length + 1) + " quasis but got " + node2.quasis.length);
|
|
|
348924
348924
|
dirname: dirname8,
|
|
348925
348925
|
sep: sep$1,
|
|
348926
348926
|
delimiter,
|
|
348927
|
-
relative:
|
|
348927
|
+
relative: relative6,
|
|
348928
348928
|
join: join11,
|
|
348929
348929
|
isAbsolute: isAbsolute2,
|
|
348930
348930
|
normalize: normalize$2,
|
|
@@ -348957,7 +348957,7 @@ Expected ` + (val42.length + 1) + " quasis but got " + node2.quasis.length);
|
|
|
348957
348957
|
isAbsolute: isAbsolute2,
|
|
348958
348958
|
join: join11,
|
|
348959
348959
|
normalize: normalize$2,
|
|
348960
|
-
relative:
|
|
348960
|
+
relative: relative6,
|
|
348961
348961
|
resolve: resolve$2,
|
|
348962
348962
|
sep: sep$1
|
|
348963
348963
|
});
|
|
@@ -433425,7 +433425,7 @@ import readline from "node:readline";
|
|
|
433425
433425
|
import { execSync as execSync2 } from "node:child_process";
|
|
433426
433426
|
var import_semver = __toESM2(require_semver2(), 1);
|
|
433427
433427
|
// package.json
|
|
433428
|
-
var version = "0.1.
|
|
433428
|
+
var version = "0.1.89";
|
|
433429
433429
|
var package_default = {
|
|
433430
433430
|
name: "@tscircuit/cli",
|
|
433431
433431
|
version,
|
|
@@ -439200,6 +439200,7 @@ var registerClone = (program3) => {
|
|
|
439200
439200
|
program3.command("clone").description("Clone a snippet from the registry").argument("<snippet>", "Snippet to clone (e.g. author/snippetName or https://tscircuit.com/author/snippetName)").action(async (snippetPath) => {
|
|
439201
439201
|
const urlMatch = snippetPath.match(/^https:\/\/tscircuit\.com\/([^\/]+)\/([^\/]+)\/?$/i);
|
|
439202
439202
|
const originalMatch = !urlMatch && snippetPath.match(/^(?:@tsci\/)?([^/.]+)[/.]([^/.]+)$/);
|
|
439203
|
+
const originalCwd = process.cwd();
|
|
439203
439204
|
if (!urlMatch && !originalMatch) {
|
|
439204
439205
|
console.error(`Invalid snippet path "${snippetPath}". Accepted formats:
|
|
439205
439206
|
- author/snippetName
|
|
@@ -439249,8 +439250,15 @@ var registerClone = (program3) => {
|
|
|
439249
439250
|
fs19.writeFileSync(path19.join(dirPath, ".npmrc"), "@tsci:registry=https://npm.tscircuit.com");
|
|
439250
439251
|
generateTsConfig(dirPath);
|
|
439251
439252
|
setupTsciProject(dirPath);
|
|
439252
|
-
|
|
439253
|
-
console.log(
|
|
439253
|
+
const relativeDirPath = path19.relative(originalCwd, dirPath);
|
|
439254
|
+
console.log(kleur_default.green(`
|
|
439255
|
+
Successfully cloned to:`));
|
|
439256
|
+
console.log(` ${dirPath}/
|
|
439257
|
+
`);
|
|
439258
|
+
console.log(kleur_default.bold("Start developing:"));
|
|
439259
|
+
console.log(kleur_default.cyan(` cd ${relativeDirPath}`));
|
|
439260
|
+
console.log(kleur_default.cyan(` tsci dev
|
|
439261
|
+
`));
|
|
439254
439262
|
});
|
|
439255
439263
|
};
|
|
439256
439264
|
|