thinkncollab-cli 0.0.44 → 0.0.46
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/Readme.md +2 -2
- package/bin/index.js +1 -1
- package/commands/help.js +0 -2
- package/commands/init.js +1 -1
- package/commands/pull.js +2 -2
- package/commands/status.js +0 -1
- package/commands/version.js +2 -3
- package/package.json +1 -1
package/Readme.md
CHANGED
|
@@ -301,8 +301,8 @@ tnc-cli --debug push --room 64a1b2c3d4e5f6a1b2c3d4e5 ./path/
|
|
|
301
301
|
|
|
302
302
|
## 🧩 Resources & Support
|
|
303
303
|
|
|
304
|
-
- 📘 **Documentation:** [docs.thinkncollab.com/cli](https://
|
|
305
|
-
|
|
304
|
+
- 📘 **Documentation:** [docs.thinkncollab.com/cli](https://thinkncollab.com/cli)
|
|
305
|
+
|
|
306
306
|
- ✉️ **Email:** support@thinkncollab.com
|
|
307
307
|
- 💬 **Community:** Join our [ThinkNCollab Discord](https://discord.gg/thinkncollab)
|
|
308
308
|
|
package/bin/index.js
CHANGED
|
@@ -16,7 +16,7 @@ import version from "../commands/version.js";
|
|
|
16
16
|
|
|
17
17
|
const RC_FILE = path.join(os.homedir(), ".tncrc");
|
|
18
18
|
const VERSION_FILE = path.join(process.cwd(), ".tncversions");
|
|
19
|
-
const BASE_URL = "
|
|
19
|
+
const BASE_URL = "https://thinkncollab.in/rooms";
|
|
20
20
|
const CWD = process.cwd();
|
|
21
21
|
|
|
22
22
|
/** ------------------ LOGIN ------------------ **/
|
package/commands/help.js
CHANGED
|
@@ -10,7 +10,5 @@ async function help() {
|
|
|
10
10
|
console.log(chalk.green("`tnc-cli rooms info <id>` | Show room details"))
|
|
11
11
|
console.log(chalk.green("`tnc-cli --help` | Show help information "))
|
|
12
12
|
console.log(chalk.green(" `tnc-cli --version` | Show CLI version"))
|
|
13
|
-
|
|
14
|
-
|
|
15
13
|
}
|
|
16
14
|
export default help;
|
package/commands/init.js
CHANGED
|
@@ -23,7 +23,7 @@ async function projectInit() {
|
|
|
23
23
|
const currentUser = JSON.parse(data).email;
|
|
24
24
|
|
|
25
25
|
// Initialize project via backend
|
|
26
|
-
const response = await axios.post("
|
|
26
|
+
const response = await axios.post("https://thinkncollab.in/cli/init", {
|
|
27
27
|
projectName: answer.projectName,
|
|
28
28
|
owner: currentUser
|
|
29
29
|
});
|
package/commands/pull.js
CHANGED
|
@@ -19,7 +19,7 @@ function readToken() {
|
|
|
19
19
|
return { token: data.token, email: data.email };
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
/** ------------------ DOWNLOAD FILE ------------------ **/
|
|
22
|
+
/** ------------------ DOWNLOAD FILE ------------------ **/ await axios
|
|
23
23
|
async function downloadFile(url, filePath) {
|
|
24
24
|
return new Promise((resolve, reject) => {
|
|
25
25
|
const fileDir = path.dirname(filePath);
|
|
@@ -115,7 +115,7 @@ export default async function pull(roomId, version = "latest") {
|
|
|
115
115
|
console.log(`📋 Project: ${projectId}`);
|
|
116
116
|
console.log(`🎯 Version: ${version}\n`);
|
|
117
117
|
|
|
118
|
-
let url = `
|
|
118
|
+
let url = `https://thinkncollab.in/folders/${roomId}/download`;
|
|
119
119
|
const params = { projectId };
|
|
120
120
|
|
|
121
121
|
if (version !== "latest") {
|
package/commands/status.js
CHANGED
package/commands/version.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
// and this file is in src/commands/version.js
|
|
1
|
+
|
|
3
2
|
|
|
4
3
|
import { readFileSync } from 'fs';
|
|
5
4
|
import { fileURLToPath } from 'url';
|
|
@@ -10,7 +9,7 @@ const __dirname = dirname(__filename);
|
|
|
10
9
|
|
|
11
10
|
async function version() {
|
|
12
11
|
try {
|
|
13
|
-
const pkgPath = join(__dirname, '..', '
|
|
12
|
+
const pkgPath = join(__dirname, '..', 'package.json');
|
|
14
13
|
const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'));
|
|
15
14
|
console.log(`ThinkNCollab CLI Version: ${pkg.version}`);
|
|
16
15
|
console.log(`ThinkNCollab CLI is Installed at: ${pkgPath}`);
|