@moneysiren/cli 0.1.0-alpha.5 → 0.1.0-alpha.6
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
CHANGED
|
@@ -67,7 +67,7 @@ Install the generated tarball into a temporary project:
|
|
|
67
67
|
mkdir -p /tmp/moneysiren-alpha-review
|
|
68
68
|
cd /tmp/moneysiren-alpha-review
|
|
69
69
|
npm init -y
|
|
70
|
-
npm install /path/to/moneysiren-cli-0.1.0-alpha.
|
|
70
|
+
npm install /path/to/moneysiren-cli-0.1.0-alpha.6.tgz
|
|
71
71
|
npm exec moneysiren
|
|
72
72
|
npm exec moneysiren -- --version
|
|
73
73
|
npm exec moneysiren -- /version
|
|
@@ -83,7 +83,7 @@ PowerShell equivalent for the temporary project:
|
|
|
83
83
|
New-Item -ItemType Directory -Force -Path $env:TEMP\moneysiren-alpha-review
|
|
84
84
|
Set-Location $env:TEMP\moneysiren-alpha-review
|
|
85
85
|
npm init -y
|
|
86
|
-
npm install C:\path\to\moneysiren-cli-0.1.0-alpha.
|
|
86
|
+
npm install C:\path\to\moneysiren-cli-0.1.0-alpha.6.tgz
|
|
87
87
|
npm exec moneysiren
|
|
88
88
|
npm exec moneysiren -- --version
|
|
89
89
|
npm exec moneysiren -- modes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { InstallSurface } from "./install-profile.js";
|
|
2
2
|
export declare const DEFAULT_RELEASE_REPOSITORY = "ztwz11/moneysiren";
|
|
3
|
-
export declare const DEFAULT_RELEASE_TAG = "v0.1.0-alpha.
|
|
3
|
+
export declare const DEFAULT_RELEASE_TAG = "v0.1.0-alpha.6";
|
|
4
4
|
export interface ReleaseInstallOptions {
|
|
5
5
|
env?: Record<string, string | undefined>;
|
|
6
6
|
fetchImpl: typeof fetch;
|
|
@@ -2,12 +2,12 @@ import { createHash } from "node:crypto";
|
|
|
2
2
|
import { execFile } from "node:child_process";
|
|
3
3
|
import { mkdir, unlink, writeFile } from "node:fs/promises";
|
|
4
4
|
import { homedir } from "node:os";
|
|
5
|
-
import { basename,
|
|
5
|
+
import { basename, join, posix, resolve, win32 } from "node:path";
|
|
6
6
|
import { promisify } from "node:util";
|
|
7
7
|
const execFileAsync = promisify(execFile);
|
|
8
8
|
export const DEFAULT_RELEASE_REPOSITORY = "ztwz11/moneysiren";
|
|
9
9
|
// Keep the source-free installer pinned to the latest published desktop/web release tag.
|
|
10
|
-
export const DEFAULT_RELEASE_TAG = "v0.1.0-alpha.
|
|
10
|
+
export const DEFAULT_RELEASE_TAG = "v0.1.0-alpha.6";
|
|
11
11
|
const RELEASE_REPOSITORY_ENV_KEY = "MONEYSIREN_RELEASE_REPOSITORY";
|
|
12
12
|
const RELEASE_TAG_ENV_KEY = "MONEYSIREN_RELEASE_TAG";
|
|
13
13
|
const RELEASE_INSTALL_DIR_ENV_KEY = "MONEYSIREN_RELEASE_INSTALL_DIR";
|
|
@@ -122,9 +122,9 @@ export function resolveReleaseInstallDir(input = {}) {
|
|
|
122
122
|
const env = input.env ?? process.env;
|
|
123
123
|
const platform = input.platform ?? process.platform;
|
|
124
124
|
const tag = input.tag ?? DEFAULT_RELEASE_TAG;
|
|
125
|
-
const configured = trimToNull(input.installDir);
|
|
125
|
+
const configured = trimToNull(input.installDir ?? env[RELEASE_INSTALL_DIR_ENV_KEY]);
|
|
126
126
|
if (configured !== null) {
|
|
127
|
-
return
|
|
127
|
+
return isAbsoluteForPlatform(platform, configured) ? configured : resolve(process.cwd(), configured);
|
|
128
128
|
}
|
|
129
129
|
const root = platform === "win32"
|
|
130
130
|
? joinForPlatform(platform, trimToNull(env.APPDATA) ?? win32.join(resolveHomeDirectory(env), "AppData", "Roaming"), "MoneySiren")
|
|
@@ -423,6 +423,9 @@ function trimToNull(value) {
|
|
|
423
423
|
function joinForPlatform(platform, ...segments) {
|
|
424
424
|
return platform === "win32" ? win32.join(...segments) : posix.join(...segments);
|
|
425
425
|
}
|
|
426
|
+
function isAbsoluteForPlatform(platform, value) {
|
|
427
|
+
return platform === "win32" ? win32.isAbsolute(value) : posix.isAbsolute(value);
|
|
428
|
+
}
|
|
426
429
|
function isRecord(value) {
|
|
427
430
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
428
431
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const CLI_VERSION = "0.1.0-alpha.
|
|
1
|
+
export declare const CLI_VERSION = "0.1.0-alpha.6";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const CLI_VERSION = "0.1.0-alpha.
|
|
1
|
+
export const CLI_VERSION = "0.1.0-alpha.6";
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
|
@@ -3,7 +3,7 @@ import { parseNotificationPreferences, readNotificationDigest, readNotificationP
|
|
|
3
3
|
import { assertLoopbackHost, isLoopbackHost, removeRuntimeLock, writeRuntimeLock, } from "../../runtime/src/index.js";
|
|
4
4
|
const DEFAULT_HOST = "127.0.0.1";
|
|
5
5
|
const DEFAULT_PORT = 47831;
|
|
6
|
-
const DEFAULT_VERSION = "0.1.0-alpha.
|
|
6
|
+
const DEFAULT_VERSION = "0.1.0-alpha.6";
|
|
7
7
|
export async function startLocalApiServer(options = {}) {
|
|
8
8
|
const host = options.host ?? DEFAULT_HOST;
|
|
9
9
|
const requestedPort = options.port ?? DEFAULT_PORT;
|