From 24912d9e03c33f77bdd3e335f279ed00e20efeff Mon Sep 17 00:00:00 2001 From: Nikita <61884745+dakln@users.noreply.github.com> Date: Tue, 15 Oct 2024 21:56:33 +0500 Subject: [PATCH] Trying to fix global install (2.0.1) --- build.ts | 9 ++++++++- deno.json | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/build.ts b/build.ts index 5b7b090..085e71b 100644 --- a/build.ts +++ b/build.ts @@ -1,7 +1,14 @@ import * as path from "jsr:@std/path@1.0.6"; import { type Lost, zip, Project, walk, bold, yellow, green, magenta, join, Logger, ErrorMessage, WarningMessage } from "./deps.ts"; -const __dirname = path.dirname(path.fromFileUrl(import.meta.url)); +let __dirname: string //= path.dirname(path.fromFileUrl(import.meta.url)); + +if (import.meta.url.startsWith('file:')) { + __dirname = path.fromFileUrl(import.meta.url); + } else { + // Обработка https: URL + __dirname = new URL(import.meta.url).pathname; + } const buildPath = `${Deno.cwd()}/Builds/Source`; const addonsCollectionPath = `${Deno.cwd()}/Builds`; diff --git a/deno.json b/deno.json index 58c8d4b..7de4f05 100644 --- a/deno.json +++ b/deno.json @@ -1,6 +1,6 @@ { "name": "@lost-c3/cli", - "version": "2.0.0", + "version": "2.0.1", "compilerOptions": { "noImplicitOverride": false, "emitDecoratorMetadata": true, @@ -15,6 +15,7 @@ }, "publish": { "exclude": [ + ".github", "tsconfig.json", ".gitignore", "lost.config.ts",