Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1274,7 +1274,7 @@
"dependencies": {
"@vscode/l10n": "^0.0.18",
"adm-zip": "^0.5.16",
"discloud.app": "^1.0.1",
"discloud.app": "^1.0.2",
"jose": "^6.0.11",
"json-schema-library": "^10.1.2",
"ws": "^8.18.2"
Expand Down
2 changes: 1 addition & 1 deletion src/commands/apps/profile/avatar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default class extends Command {
const workspaceFolder = await extension.getWorkspaceFolder();

if (workspaceFolder) {
const dConfig = new DiscloudConfig(workspaceFolder.fsPath);
const dConfig = await DiscloudConfig.fromPath(workspaceFolder.fsPath);

const ID = dConfig.get(DiscloudConfigScopes.ID);

Expand Down
2 changes: 1 addition & 1 deletion src/commands/apps/profile/name.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default class extends Command {
const workspaceFolder = await extension.getWorkspaceFolder();

if (workspaceFolder) {
const dConfig = new DiscloudConfig(workspaceFolder.fsPath);
const dConfig = await DiscloudConfig.fromPath(workspaceFolder.fsPath);

const ID = dConfig.get(DiscloudConfigScopes.ID);

Expand Down
2 changes: 1 addition & 1 deletion src/commands/logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default class extends Command {
if (!item?.appId) {
const workspaceFolder = await extension.getWorkspaceFolder();
if (workspaceFolder) {
const dConfig = new DiscloudConfig(workspaceFolder.fsPath);
const dConfig = await DiscloudConfig.fromPath(workspaceFolder.fsPath);

const ID = dConfig.get(DiscloudConfigScopes.ID);

Expand Down
8 changes: 4 additions & 4 deletions src/commands/upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default class extends Command {

task.progress.report({ increment: 30, message: t("files.checking") });

const dConfig = new DiscloudConfig(workspaceFolder.fsPath);
const dConfig = await DiscloudConfig.fromPath(workspaceFolder.fsPath);

if (!dConfig.validate(true))
throw Error(t("invalid.discloud.config"));
Expand All @@ -43,11 +43,11 @@ export default class extends Command {
const found = await fs.findFiles(task.token);
if (!found.length) throw Error(t("files.missing"));

const main = Uri.parse(dConfig.data.MAIN).fsPath;
const main = dConfig.data.MAIN && Uri.parse(dConfig.data.MAIN).fsPath;

if (!found.some(uri => uri.fsPath.endsWith(main)))
if (!main || !found.some(uri => uri.fsPath.endsWith(main)))
throw Error([
t("missing.discloud.config.main", { file: dConfig.data.MAIN }),
t("missing.discloud.config.main", { file: `${dConfig.data.MAIN}` }),
t("readdiscloudconfigdocs"),
].join("\n"));

Expand Down
2 changes: 1 addition & 1 deletion src/structures/Command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export default abstract class Command {

const workspaceFolder = await extension.getWorkspaceFolder().then(f => f?.fsPath);

const dConfig = new DiscloudConfig(workspaceFolder!);
const dConfig = await DiscloudConfig.fromPath(workspaceFolder!);

const ID = dConfig.get(DiscloudConfigScopes.ID);

Expand Down
2 changes: 1 addition & 1 deletion src/structures/DiscloudStatusBarItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default class DiscloudStatusBarItem extends BaseStatusBarItem {

if (!workspaceFolder) return this.setUpload();

const dConfig = new DiscloudConfig(workspaceFolder.fsPath);
const dConfig = await DiscloudConfig.fromPath(workspaceFolder.fsPath);

const ID = dConfig.get(DiscloudConfigScopes.ID);

Expand Down
30 changes: 15 additions & 15 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@
dependencies:
tslib "^2.8.1"

"@discloudapp/rest@^1.0.1":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@discloudapp/rest/-/rest-1.0.1.tgz#ff4abf8f81ae5020f968a22e2ecf5fa07d487693"
integrity sha512-8eTM32ZEeof4tBGkWnKX9TnUox1Xg94jn9IZsrFuw7t9P5T4pLCKcl5YnBgHrKYNvjLWzom1MuNMaoxTzNa4Jg==
"@discloudapp/rest@^1.0.2":
version "1.0.2"
resolved "https://registry.yarnpkg.com/@discloudapp/rest/-/rest-1.0.2.tgz#8e88d6dc1e46e6adcccb71787861a0843a828448"
integrity sha512-5TWKl9fDm/Apn2bWVo9Qk3Le2Vc6CqWzfkQSSmWAppXMh541xx1C1pjT1HgB7jusOAkdPPb2gq5Fqyb6ZvLVrQ==
dependencies:
"@discloudapp/api-types" "^1.0.1"
"@discloudapp/util" "^1.0.1"
"@discloudapp/util" "^1.1.0"
source-map-support "^0.5.21"
tslib "^2.8.1"

"@discloudapp/util@^1.0.1":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@discloudapp/util/-/util-1.0.1.tgz#4ee8a2349d0d0e560b847b4cd631694dd3e24bc8"
integrity sha512-BpW9q1YS/e/f9A+AhptD8mlwgjAkJxYEpKQIQYnk0JPg2ORNCh7G80U9qgodNtFaHpVSmN3exIouCLj7XufVkw==
"@discloudapp/util@^1.1.0":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@discloudapp/util/-/util-1.1.0.tgz#beb38442097acd3f74a2c774da039ec5490bb211"
integrity sha512-3Qo+sWHe55xOmL+ufD/W+vtXPnQHTqxEP0tgmIuBsYmrX4OrioOaTUq6b3kLgxmFAgp4IDAqedgu+UuNS4rpLg==
dependencies:
"@discloudapp/api-types" "^1.0.1"
file-type "^21.0.0"
Expand Down Expand Up @@ -961,14 +961,14 @@ diff@^7.0.0:
resolved "https://registry.yarnpkg.com/diff/-/diff-7.0.0.tgz#3fb34d387cd76d803f6eebea67b921dab0182a9a"
integrity sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==

discloud.app@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/discloud.app/-/discloud.app-1.0.1.tgz#974685608d0dfd7187b0e7632bd20cf3d94a3fad"
integrity sha512-SHSrYNZZaUZiKf7+A+nfpX20p9IxmU2eZNNUEpqOG4K5y/4Oy/ZTIGJUXN5EtblSyc2+wUfo9b53OQT6AF9biQ==
discloud.app@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/discloud.app/-/discloud.app-1.0.2.tgz#179fb4763e5e017532d0d0f06b98c72dc95cdffe"
integrity sha512-s1QXGA9+fMSCDfdSHI4ZZkCnm5J3HrPLtAZWUE5DqZ9UIawTQ1CUtwvCFmHlqDW6HC+1q9oFaACdToa1SBdWzg==
dependencies:
"@discloudapp/api-types" "^1.0.1"
"@discloudapp/rest" "^1.0.1"
"@discloudapp/util" "^1.0.1"
"@discloudapp/rest" "^1.0.2"
"@discloudapp/util" "^1.1.0"
source-map-support "^0.5.21"
tslib "^2.8.1"
zod "^3.25.67"
Expand Down
Loading