Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaRHristov committed Jan 5, 2025
1 parent 1c4a4f1 commit 890c729
Show file tree
Hide file tree
Showing 16 changed files with 110 additions and 1 deletion.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
- Updated `typedoc-plugin-zod` to version 1.3.1.
- Updated `@playform/build` to version 0.2.1.
- Removed unnecessary type annotations in `Document.ts` and `JSON.ts`.
- Removed `Exec.ts.`

## 0.1.3

Expand Down
22 changes: 22 additions & 0 deletions Source/Function/Exec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import type Interface from "../Interface/Exec.js";

/**
* @module Exec
*
*/
export default (async (
...[Command, Echo = async (Return) => console.log(Return)]
) => {
try {
const { stdout, stderr } = (await import("child_process")).exec(
Command,
);

if (typeof Echo === "function") {
stdout?.on("data", async (Data) => await Echo(Data.trim()));
stderr?.on("data", async (Data) => await Echo(Data.trim(), true));
}
} catch (_Error) {
console.log(_Error);
}
}) satisfies Interface as Interface;
7 changes: 7 additions & 0 deletions Target/Class/Document.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env node
/**
* @module Document
*
*/
declare const _default: import("commander").Command;
export default _default;
2 changes: 2 additions & 0 deletions Target/Class/Document.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions Target/Function/Document.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import type Interface from "../Interface/Document.js";
/**
* @module Document
*
*/
declare const _default: Interface;
export default _default;
export declare const Exec: any;
export declare const resolve: (...paths: string[]) => string;
export declare const Pipe: string[];
export declare const Current: string;
1 change: 1 addition & 0 deletions Target/Function/Document.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file added Target/Function/Exec.d.ts
Empty file.
Empty file added Target/Function/Exec.js
Empty file.
7 changes: 7 additions & 0 deletions Target/Function/JSON.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import type Interface from "../Interface/JSON.js";
/**
* @module JSON
*
*/
declare const _default: Interface;
export default _default;
1 change: 1 addition & 0 deletions Target/Function/JSON.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
var a=async(...[e,t])=>JSON.parse((await(await import("fs/promises")).readFile(`${t??"."}/${e}`,"utf-8")).toString());export{a as default};
18 changes: 18 additions & 0 deletions Target/Interface/Document.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import type { Pattern } from "fast-glob";
/**
* @module Document
*
*/
export default interface Interface {
/**
* Represents a function that processes file patterns.
*
* @param File - An array of file patterns to be processed. Each pattern can include wildcards (*) to match multiple files.
*
* @param Option.Folder - A string representing the Folder option.
*
*/
(File: Pattern[], Option?: {
Folder?: string;
}): Promise<void>;
}
Empty file added Target/Interface/Document.js
Empty file.
21 changes: 21 additions & 0 deletions Target/Interface/Exec.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* @module Exec
*
*/
export default interface Interface {
/**
* The 'Exec' function is an asynchronous function that executes a command and logs the
* stdout and stderr of the child process.
*
* @param Command - The 'Command' parameter is a string that represents the
* command you want to execute. It can be any valid command that can be executed in a
* terminal or command prompt.
*
* @param Echo - An optional parameter that controls whether the stdout and stderr
* of the child process should be logged. If set to 'false', no logging will occur. If set
* to a function, the function will be called with the stdout and stderr data as a parameter for custom
* logging. If not provided, stdout and stderr will be logged to the console by default.
*
*/
(Command: string, Echo?: false | ((Return: any, _Error?: boolean) => Promise<void>)): Promise<void>;
}
Empty file added Target/Interface/Exec.js
Empty file.
20 changes: 20 additions & 0 deletions Target/Interface/JSON.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* @module JSON
*
*/
export default interface Interface {
/**
* The function 'JSON' is a TypeScript function that reads a JSON file and returns its
* parsed content.
*
* @param File - The `File` parameter is a string that represents the name or
* path of the JSON file that you want to parse.
*
* @param From - The `From` parameter is an optional string that represents
* the directory path from which the JSON file should be loaded. If `From` is provided,
* it will be used as the base directory path. If `From` is not provided, the current
* directory will be used as the base directory path.
*
*/
(File: string, From?: string): Promise<ReturnType<typeof JSON.parse>>;
}
Empty file added Target/Interface/JSON.js
Empty file.

0 comments on commit 890c729

Please sign in to comment.