diff --git a/Script/Configuration/ESBuild.d.ts b/Script/Configuration/ESBuild.d.ts index 80a1b88..914769f 100644 --- a/Script/Configuration/ESBuild.d.ts +++ b/Script/Configuration/ESBuild.d.ts @@ -1,10 +1,10 @@ declare const _default: { - format: "esm"; - minify: false; - outdir: string; - platform: "node"; - target: string; - write: true; - plugins: import("esbuild").Plugin[]; + format: "esm"; + minify: false; + outdir: string; + platform: "node"; + target: string; + write: true; + plugins: import("esbuild").Plugin[]; }; export default _default; diff --git a/Script/Configuration/ESBuild.js b/Script/Configuration/ESBuild.js index efc3061..c3391b6 100644 --- a/Script/Configuration/ESBuild.js +++ b/Script/Configuration/ESBuild.js @@ -1,33 +1,32 @@ export default { - format: "esm", - minify: false, - outdir: "Target", - platform: "node", - target: "esnext", - write: true, - plugins: [ - { - name: "Target", - setup({ onStart, initialOptions: { outdir } }) { - onStart(async () => { - try { - await ( - await import("fs/promises") - ).rm(outdir, { - recursive: true, - }); - } catch (_Error) {} - }); - }, - }, - (await import("esbuild-plugin-copy")).copy({ - resolveFrom: "out", - assets: [ - { - from: "./Source/Workflow/*.yml", - to: "./Workflow/", - }, - ], - }), - ], + format: "esm", + minify: false, + outdir: "Target", + platform: "node", + target: "esnext", + write: true, + plugins: [ + { + name: "Target", + setup({ onStart, initialOptions: { outdir } }) { + onStart(async () => { + try { + await (await import("fs/promises")).rm(outdir, { + recursive: true, + }); + } + catch (_Error) { } + }); + }, + }, + (await import("esbuild-plugin-copy")).copy({ + resolveFrom: "out", + assets: [ + { + from: "./Source/Workflow/*.yml", + to: "./Workflow/", + }, + ], + }), + ], }; diff --git a/Script/Documentation/.nojekyll b/Script/Documentation/.nojekyll new file mode 100644 index 0000000..e2ac661 --- /dev/null +++ b/Script/Documentation/.nojekyll @@ -0,0 +1 @@ +TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false. \ No newline at end of file diff --git a/Script/Documentation/Function/Clean.Clean.html b/Script/Documentation/Function/Clean.Clean.html new file mode 100644 index 0000000..aedec19 --- /dev/null +++ b/Script/Documentation/Function/Clean.Clean.html @@ -0,0 +1,73 @@ +
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
This function ensures the correct decodings of percent-encoded characters as +well as ensuring a cross-platform valid absolute path string.
+import { fileURLToPath } from 'node:url';
const __filename = fileURLToPath(import.meta.url);
new URL('file:///C:/path/').pathname; // Incorrect: /C:/path/
fileURLToPath('file:///C:/path/'); // Correct: C:\path\ (Windows)
new URL('file://nas/foo.txt').pathname; // Incorrect: /foo.txt
fileURLToPath('file://nas/foo.txt'); // Correct: \\nas\foo.txt (Windows)
new URL('file:///ä½ å¥½.txt').pathname; // Incorrect: /%E4%BD%A0%E5%A5%BD.txt
fileURLToPath('file:///ä½ å¥½.txt'); // Correct: /ä½ å¥½.txt (POSIX)
new URL('file:///hello world').pathname; // Incorrect: /hello%20world
fileURLToPath('file:///hello world'); // Correct: /hello world (POSIX)
+
+The file URL string or URL object to convert to a path.
+The fully-resolved platform-specific Node.js file path.
+ +v10.12.0
+Generated using TypeDoc
Asynchronously reads the entire contents of a file.
+If no encoding is specified (using options.encoding
), the data is returned
+as a Buffer
object. Otherwise, the data will be a string.
If options
is a string, then it specifies the encoding.
When the path
is a directory, the behavior of fsPromises.readFile()
is
+platform-specific. On macOS, Linux, and Windows, the promise will be rejected
+with an error. On FreeBSD, a representation of the directory's contents will be
+returned.
An example of reading a package.json
file located in the same directory of the
+running code:
import { readFile } from 'node:fs/promises';
try {
const filePath = new URL('./package.json', import.meta.url);
const contents = await readFile(filePath, { encoding: 'utf8' });
console.log(contents);
} catch (err) {
console.error(err.message);
}
+
+It is possible to abort an ongoing readFile
using an AbortSignal
. If a
+request is aborted the promise returned is rejected with an AbortError
:
import { readFile } from 'node:fs/promises';
try {
const controller = new AbortController();
const { signal } = controller;
const promise = readFile(fileName, { signal });
// Abort the request before the promise settles.
controller.abort();
await promise;
} catch (err) {
// When a request is aborted - err is an AbortError
console.error(err);
}
+
+Aborting an ongoing request does not abort individual operating
+system requests but rather the internal buffering fs.readFile
performs.
Any specified FileHandle
has to support reading.
filename or FileHandle
Optional
options: null | { Fulfills with the contents of the file.
+ +v10.0.0
+Asynchronously reads the entire contents of a file.
+A path to a file. If a URL is provided, it must use the file:
protocol.
+If a FileHandle
is provided, the underlying file will not be closed automatically.
An object that may contain an optional flag.
+If a flag is not provided, it defaults to 'r'
.
Asynchronously reads the entire contents of a file.
+A path to a file. If a URL is provided, it must use the file:
protocol.
+If a FileHandle
is provided, the underlying file will not be closed automatically.
Optional
options: null | BufferEncoding | ObjectEncodingOptions & Abortable & { An object that may contain an optional flag.
+If a flag is not provided, it defaults to 'r'
.
Generated using TypeDoc
The right-most parameter is considered {to}. Other parameters are considered an array of {from}.
+Starting from leftmost {from} parameter, resolves {to} to an absolute path.
+If {to} isn't already absolute, {from} arguments are prepended in right to left order, +until an absolute path is found. If after using all {from} paths still no absolute path is found, +the current working directory is used as well. The resulting path is normalized, +and trailing slashes are removed unless the path gets resolved to the root directory.
+Rest
...paths: string[]A sequence of paths or path segments.
+if any of the arguments is not a string.
+Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
It takes a list of files, and for each file, it checks if the file is a workflow file, and if it is, +it checks if the file is a node workflow file, and if it is, it checks if the file is a node +workflow file for a package that has dependencies, and if it is, it adds the dependencies to the +workflow file
+Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
It takes a list of files, and for each file, it checks if the file is a workflow file, and if it is, +it checks if the file is a node workflow file, and if it is, it checks if the file is a node +workflow file for a package that has dependencies, and if it is, it adds the dependencies to the +workflow file
+Generated using TypeDoc
The function Directory
takes a set of file globs, walks through the directories
+until it finds a Git repository, and returns a map where the keys are the directories
+and the values are sets of globs associated with each directory.
is a Set of strings representing file globs. A file glob is a +pattern used to match file paths. For example, "*.js" would match all JavaScript +files in a directory. The Search parameter is a set of these file globs that will be +used to search for files in +paths and the values are sets of glob patterns associated with each directory.
+Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
The function recursively walks through directories until it finds a ".git" folder or reaches the +root directory.
+The Search
parameter is a string that represents the directory path where
+you want to start searching for a .git
directory.
Optional
From: stringThe "From" parameter is an optional parameter that specifies the starting +directory for the search. If provided, the function will start searching for the ".git" directory +from this directory. If not provided, the function will start searching from the directory specified +by the "Search" parameter.
+Generated using TypeDoc
Generated using TypeDoc
The function recursively walks through directories until it finds a ".git" folder or reaches the +root directory.
+The Search
parameter is a string that represents the directory path where
+you want to start searching for a .git
directory.
Optional
From: stringThe "From" parameter is an optional parameter that specifies the starting +directory for the search. If provided, the function will start searching for the ".git" directory +from this directory. If not provided, the function will start searching from the directory specified +by the "Search" parameter.
+Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Const
Generated using TypeDoc
Const
Generated using TypeDoc
Generated using TypeDoc
Const
Generated using TypeDoc
Generated using TypeDoc
Optional
Base?: stringOptional
Token?: stringOptional
User?: stringGenerated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Optional
Base?: stringOptional
Token?: stringOptional
User?: stringGenerated using TypeDoc
Generated using TypeDoc
Maintains GitHub repositories.
+Using NPM
+npm install -g @yesmaintain/script
+
+Using Yarn
+yarn global add @yesmaintain/script
+
+Using PNPM
+pnpm install -g @yesmaintain/script
+
+or direct usage:
+Using NPM
+npx @yesmaintain/script
+
+Using Yarn
+yarn @yesmaintain/script
+
+Using PNPM
+pnpx @yesmaintain/script
+
+Delete all GitHub Actions runs and their logs for all of your repositories:
+Maintain Clean
+
+Create a dependabot.yml
file in each of the .github directories for each of
+the packages in the monorepo:
Maintain Dependabot
+
+Dispatch all workflows for all repositories for a given user:
+Maintain Dispatch
+
+or specific repositories by name:
+Maintain Dispatch Repository1 Repository2
+
+Enable / disable all the features that GitHub offers for all the repositories +that you have access to:
+Maintain Edit
+
+Create a Node.yml
file in the .github/workflows
directory for each
+repository that has a package.json
file.
Maintain Node
+
+Create a NPM.yml
file in the .github/workflows
directory for each repository
+that has a package.json
file.
Maintain NPM
+
+Create a Rust.yml
file in the .github/workflows
directory for each
+repository that has a Cargo.toml
file.
Maintain Rust
+
+Run all workflow tasks.
+Maintain Workflow
+
+Find all the package.json
files in the project, and then star all the
+dependencies in that package.json
.
Maintain Star
+
+.env
+User="Username"
+Base="Folder"
+Token="AAAA"
+
+Generated using TypeDoc
The function
+Cloudflare
iterates through a list of files, checks if a specific file exists, and +performs certain actions based on the conditions.