@saidulbadhon/jssm-cli 1.8.0 → 1.8.3
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 +7 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4173,21 +4173,21 @@ async function getProjects(host, apiKey) {
|
|
|
4173
4173
|
return apiRequest(url, apiKey);
|
|
4174
4174
|
}
|
|
4175
4175
|
async function pushEnvFile(host, apiKey, project, content, filename = ".env") {
|
|
4176
|
-
const url = `${host}/projects/${project}/files/push`;
|
|
4176
|
+
const url = `${host}/projects/${encodeURIComponent(project)}/files/push`;
|
|
4177
4177
|
return apiRequest(url, apiKey, {
|
|
4178
4178
|
method: "POST",
|
|
4179
4179
|
body: JSON.stringify({ content, filename })
|
|
4180
4180
|
});
|
|
4181
4181
|
}
|
|
4182
4182
|
async function pullEnvFile(host, apiKey, project, filename = ".env") {
|
|
4183
|
-
const url = `${host}/projects/${project}/files/pull?filename=${encodeURIComponent(
|
|
4183
|
+
const url = `${host}/projects/${encodeURIComponent(project)}/files/pull?filename=${encodeURIComponent(
|
|
4184
4184
|
filename
|
|
4185
4185
|
)}`;
|
|
4186
4186
|
const data = await apiRequest(url, apiKey);
|
|
4187
4187
|
return data.content;
|
|
4188
4188
|
}
|
|
4189
4189
|
async function listEnvFiles(host, apiKey, project) {
|
|
4190
|
-
const url = `${host}/projects/${project}/files/list`;
|
|
4190
|
+
const url = `${host}/projects/${encodeURIComponent(project)}/files/list`;
|
|
4191
4191
|
const data = await apiRequest(url, apiKey);
|
|
4192
4192
|
return data.files;
|
|
4193
4193
|
}
|
|
@@ -5724,7 +5724,7 @@ async function createToken(args2) {
|
|
|
5724
5724
|
);
|
|
5725
5725
|
try {
|
|
5726
5726
|
const response = await fetch(
|
|
5727
|
-
`${host}/api/projects/${project}/envs/${environment}/tokens`,
|
|
5727
|
+
`${host}/api/projects/${encodeURIComponent(project)}/envs/${encodeURIComponent(environment)}/tokens`,
|
|
5728
5728
|
{
|
|
5729
5729
|
method: "POST",
|
|
5730
5730
|
headers: {
|
|
@@ -5800,7 +5800,7 @@ async function listTokens(args2) {
|
|
|
5800
5800
|
}
|
|
5801
5801
|
try {
|
|
5802
5802
|
const response = await fetch(
|
|
5803
|
-
`${host}/api/projects/${project}/envs/${environment}/tokens`,
|
|
5803
|
+
`${host}/api/projects/${encodeURIComponent(project)}/envs/${encodeURIComponent(environment)}/tokens`,
|
|
5804
5804
|
{
|
|
5805
5805
|
headers: { Authorization: `Bearer ${auth.token}` }
|
|
5806
5806
|
}
|
|
@@ -5888,7 +5888,7 @@ async function revokeToken(args2) {
|
|
|
5888
5888
|
}
|
|
5889
5889
|
try {
|
|
5890
5890
|
const response = await fetch(
|
|
5891
|
-
`${host}/api/projects/${project}/envs/${environment}/tokens/${tokenId}`,
|
|
5891
|
+
`${host}/api/projects/${encodeURIComponent(project)}/envs/${encodeURIComponent(environment)}/tokens/${encodeURIComponent(tokenId)}`,
|
|
5892
5892
|
{
|
|
5893
5893
|
method: "DELETE",
|
|
5894
5894
|
headers: { Authorization: `Bearer ${auth.token}` }
|
|
@@ -5948,7 +5948,7 @@ ${import_chalk.default.bold("Usage in Docker:")}
|
|
|
5948
5948
|
|
|
5949
5949
|
// src/utils/versionCheck.ts
|
|
5950
5950
|
var PACKAGE_NAME = "@saidulbadhon/jssm-cli";
|
|
5951
|
-
var CURRENT_VERSION = "1.8.
|
|
5951
|
+
var CURRENT_VERSION = "1.8.3";
|
|
5952
5952
|
async function getLatestVersion() {
|
|
5953
5953
|
try {
|
|
5954
5954
|
const response = await fetch(`https://registry.npmjs.org/${PACKAGE_NAME}`);
|