@rg-dev/stdlib 1.0.41 → 1.0.42
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/lib/node-env.cjs +5 -1
- package/lib/node-env.d.cts +3 -1
- package/lib/node-env.d.ts +3 -1
- package/lib/node-env.js +5 -1
- package/package.json +1 -1
package/lib/node-env.cjs
CHANGED
|
@@ -196,7 +196,8 @@ __export(node_env_exports, {
|
|
|
196
196
|
createTempDir: () => createTempDir,
|
|
197
197
|
createTempFilePath: () => createTempFilePath,
|
|
198
198
|
isWindows: () => isWindows,
|
|
199
|
-
throwIfDirNotEmpty: () => throwIfDirNotEmpty
|
|
199
|
+
throwIfDirNotEmpty: () => throwIfDirNotEmpty,
|
|
200
|
+
typedSystemArch: () => typedSystemArch
|
|
200
201
|
});
|
|
201
202
|
module.exports = __toCommonJS(node_env_exports);
|
|
202
203
|
var fs = __toESM(require("fs-extra"), 1);
|
|
@@ -327,6 +328,9 @@ var SSEClient = class extends import_events.EventEmitter {
|
|
|
327
328
|
function isWindows() {
|
|
328
329
|
return import_os.default.platform() === "win32";
|
|
329
330
|
}
|
|
331
|
+
function typedSystemArch() {
|
|
332
|
+
return import_os.default.arch();
|
|
333
|
+
}
|
|
330
334
|
function chmodPlusX(filePath) {
|
|
331
335
|
if (import_os.default.platform() === "win32") {
|
|
332
336
|
return;
|
package/lib/node-env.d.cts
CHANGED
|
@@ -28,6 +28,8 @@ declare class SSEClient extends EventEmitter {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
declare function isWindows(): boolean;
|
|
31
|
+
type SystemArch = "x64" | "arm64" | "arm" | "ia32" | "ppc64" | "s390x" | "loong64" | "riscv64";
|
|
32
|
+
declare function typedSystemArch(): SystemArch;
|
|
31
33
|
declare function chmodPlusX(filePath: string): void;
|
|
32
34
|
declare function checkIfDirExistsOrThrow(path: string): Promise<void>;
|
|
33
35
|
declare function createTempDir(): string;
|
|
@@ -39,4 +41,4 @@ declare function throwIfDirNotEmpty(dirPath: string): Promise<void>;
|
|
|
39
41
|
declare function checkCommandExistsOrThrow(cmd: string): Promise<void>;
|
|
40
42
|
declare function checkIfFileExistsOrThrow(thePath: string): Promise<void>;
|
|
41
43
|
|
|
42
|
-
export { SSEClient, SSEResponse, checkCommandExistsOrThrow, checkIfDirExistsOrThrow, checkIfFileExistsOrThrow, chmodPlusX, createTempDir, createTempFilePath, isWindows, throwIfDirNotEmpty };
|
|
44
|
+
export { SSEClient, SSEResponse, type SystemArch, checkCommandExistsOrThrow, checkIfDirExistsOrThrow, checkIfFileExistsOrThrow, chmodPlusX, createTempDir, createTempFilePath, isWindows, throwIfDirNotEmpty, typedSystemArch };
|
package/lib/node-env.d.ts
CHANGED
|
@@ -28,6 +28,8 @@ declare class SSEClient extends EventEmitter {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
declare function isWindows(): boolean;
|
|
31
|
+
type SystemArch = "x64" | "arm64" | "arm" | "ia32" | "ppc64" | "s390x" | "loong64" | "riscv64";
|
|
32
|
+
declare function typedSystemArch(): SystemArch;
|
|
31
33
|
declare function chmodPlusX(filePath: string): void;
|
|
32
34
|
declare function checkIfDirExistsOrThrow(path: string): Promise<void>;
|
|
33
35
|
declare function createTempDir(): string;
|
|
@@ -39,4 +41,4 @@ declare function throwIfDirNotEmpty(dirPath: string): Promise<void>;
|
|
|
39
41
|
declare function checkCommandExistsOrThrow(cmd: string): Promise<void>;
|
|
40
42
|
declare function checkIfFileExistsOrThrow(thePath: string): Promise<void>;
|
|
41
43
|
|
|
42
|
-
export { SSEClient, SSEResponse, checkCommandExistsOrThrow, checkIfDirExistsOrThrow, checkIfFileExistsOrThrow, chmodPlusX, createTempDir, createTempFilePath, isWindows, throwIfDirNotEmpty };
|
|
44
|
+
export { SSEClient, SSEResponse, type SystemArch, checkCommandExistsOrThrow, checkIfDirExistsOrThrow, checkIfFileExistsOrThrow, chmodPlusX, createTempDir, createTempFilePath, isWindows, throwIfDirNotEmpty, typedSystemArch };
|
package/lib/node-env.js
CHANGED
|
@@ -314,6 +314,9 @@ var SSEClient = class extends EventEmitter {
|
|
|
314
314
|
function isWindows() {
|
|
315
315
|
return os.platform() === "win32";
|
|
316
316
|
}
|
|
317
|
+
function typedSystemArch() {
|
|
318
|
+
return os.arch();
|
|
319
|
+
}
|
|
317
320
|
function chmodPlusX(filePath) {
|
|
318
321
|
if (os.platform() === "win32") {
|
|
319
322
|
return;
|
|
@@ -409,5 +412,6 @@ export {
|
|
|
409
412
|
createTempDir,
|
|
410
413
|
createTempFilePath,
|
|
411
414
|
isWindows,
|
|
412
|
-
throwIfDirNotEmpty
|
|
415
|
+
throwIfDirNotEmpty,
|
|
416
|
+
typedSystemArch
|
|
413
417
|
};
|