@visulima/fs 2.0.9 → 2.1.1
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/CHANGELOG.md +15 -0
- package/dist/chunk-BZXQ545V.cjs +12 -0
- package/dist/chunk-BZXQ545V.cjs.map +1 -0
- package/dist/chunk-P3KZLWQC.js +5 -0
- package/dist/chunk-P3KZLWQC.js.map +1 -0
- package/dist/error.cjs +20 -8
- package/dist/error.cjs.map +1 -1
- package/dist/error.js +1 -5
- package/dist/error.js.map +1 -1
- package/dist/index.cjs +50 -48
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js +12 -12
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/dist/chunk-JSJNX53G.cjs +0 -8
- package/dist/chunk-JSJNX53G.cjs.map +0 -1
- package/dist/chunk-X5PFFPHW.js +0 -5
- package/dist/chunk-X5PFFPHW.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
## @visulima/fs [2.1.1](https://github.com/visulima/visulima/compare/@visulima/fs@2.1.0...@visulima/fs@2.1.1) (2024-05-15)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Dependencies
|
|
6
|
+
|
|
7
|
+
* **@visulima/error:** upgraded to 3.2.8
|
|
8
|
+
|
|
9
|
+
## @visulima/fs [2.1.0](https://github.com/visulima/visulima/compare/@visulima/fs@2.0.9...@visulima/fs@2.1.0) (2024-05-06)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* **fs:** adding ensure symlink ([#350](https://github.com/visulima/visulima/issues/350)) ([3e2fd19](https://github.com/visulima/visulima/commit/3e2fd191c4de13a2a6ebf599cd83926b7f8ad9a6))
|
|
15
|
+
|
|
1
16
|
## @visulima/fs [2.0.9](https://github.com/visulima/visulima/compare/@visulima/fs@2.0.8...@visulima/fs@2.0.9) (2024-05-03)
|
|
2
17
|
|
|
3
18
|
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var t=class extends Error{constructor(r){super(`EEXIST: ${r}`);}get code(){return "EEXIST"}set code(r){throw new Error("Cannot overwrite code EEXIST")}get name(){return "AlreadyExistsError"}set name(r){throw new Error("Cannot overwrite name of AlreadyExistsError")}},E=t;var n=class extends Error{constructor(r){super(`EISDIR: Illegal operation on a directory, ${r}`);}get code(){return "EISDIR"}set code(r){throw new Error("Cannot overwrite code EISDIR")}get name(){return "DirectoryError"}set name(r){throw new Error("Cannot overwrite name of DirectoryError")}},l=n;var i=class extends Error{constructor(r){super(`ENOTEMPTY: Directory not empty, ${r}`);}get code(){return "ENOTEMPTY"}set code(r){throw new Error("Cannot overwrite code ENOTEMPTY")}get name(){return "NotEmptyError"}set name(r){throw new Error("Cannot overwrite name of NotEmptyError")}},p=i;var s=class extends Error{constructor(r){super(`ENOENT: ${r}`);}get code(){return "ENOENT"}set code(r){throw new Error("Cannot overwrite code ENOENT")}get name(){return "NotFoundError"}set name(r){throw new Error("Cannot overwrite name of NotFoundError")}},d=s;var a=class extends Error{constructor(r){super(`EPERM: Operation not permitted, ${r}`);}get code(){return "EPERM"}set code(r){throw new Error("Cannot overwrite code EPERM")}get name(){return "PermissionError"}set name(r){throw new Error("Cannot overwrite name of PermissionError")}},m=a;var u=class extends Error{root;constructor(r,c){super(`${r instanceof Error?r.message:r} for path "${c}"`),this.cause=r,this.root=c;}get name(){return "WalkError"}set name(r){throw new Error("Cannot overwrite name of WalkError")}},w=u;
|
|
4
|
+
|
|
5
|
+
exports.a = E;
|
|
6
|
+
exports.b = l;
|
|
7
|
+
exports.c = p;
|
|
8
|
+
exports.d = d;
|
|
9
|
+
exports.e = m;
|
|
10
|
+
exports.f = w;
|
|
11
|
+
//# sourceMappingURL=out.js.map
|
|
12
|
+
//# sourceMappingURL=chunk-BZXQ545V.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/error/already-exists-error.ts","../src/error/directory-error.ts","../src/error/not-empty-error.ts","../src/error/not-found-error.ts","../src/error/permission-error.ts","../src/error/walk-error.ts"],"names":["AlreadyExistsError","message","_name","already_exists_error_default","DirectoryError","directory_error_default","NotEmptyError","not_empty_error_default","NotFoundError","not_found_error_default","PermissionError","permission_error_default","WalkError","cause","root","walk_error_default"],"mappings":"AAGA,IAAMA,EAAN,cAAiC,KAAM,CAK5B,YAAYC,EAAiB,CAChC,MAAM,WAAWA,CAAO,EAAE,CAC9B,CAGA,IAAW,MAAe,CACtB,MAAO,QACX,CAGA,IAAW,KAAKC,EAAO,CACnB,MAAM,IAAI,MAAM,8BAA8B,CAClD,CAGA,IAAoB,MAAe,CAC/B,MAAO,oBACX,CAGA,IAAoB,KAAKA,EAAO,CAC5B,MAAM,IAAI,MAAM,6CAA6C,CACjE,CACJ,EAEOC,EAAQH,EC9Bf,IAAMI,EAAN,cAA6B,KAAM,CAKxB,YAAYH,EAAiB,CAChC,MAAM,6CAA6CA,CAAO,EAAE,CAChE,CAGA,IAAW,MAAe,CACtB,MAAO,QACX,CAGA,IAAW,KAAKC,EAAO,CACnB,MAAM,IAAI,MAAM,8BAA8B,CAClD,CAGA,IAAoB,MAAe,CAC/B,MAAO,gBACX,CAGA,IAAoB,KAAKA,EAAO,CAC5B,MAAM,IAAI,MAAM,yCAAyC,CAC7D,CACJ,EAEOG,EAAQD,EC9Bf,IAAME,EAAN,cAA4B,KAAM,CAKvB,YAAYL,EAAiB,CAChC,MAAM,mCAAmCA,CAAO,EAAE,CACtD,CAGA,IAAW,MAAe,CACtB,MAAO,WACX,CAGA,IAAW,KAAKC,EAAO,CACnB,MAAM,IAAI,MAAM,iCAAiC,CACrD,CAGA,IAAoB,MAAe,CAC/B,MAAO,eACX,CAGA,IAAoB,KAAKA,EAAO,CAC5B,MAAM,IAAI,MAAM,wCAAwC,CAC5D,CACJ,EAEOK,EAAQD,EC9Bf,IAAME,EAAN,cAA4B,KAAM,CAKvB,YAAYP,EAAiB,CAChC,MAAM,WAAWA,CAAO,EAAE,CAC9B,CAGA,IAAW,MAAe,CACtB,MAAO,QACX,CAGA,IAAW,KAAKC,EAAO,CACnB,MAAM,IAAI,MAAM,8BAA8B,CAClD,CAGA,IAAoB,MAAe,CAC/B,MAAO,eACX,CAGA,IAAoB,KAAKA,EAAO,CAC5B,MAAM,IAAI,MAAM,wCAAwC,CAC5D,CACJ,EAEOO,EAAQD,EC9Bf,IAAME,EAAN,cAA8B,KAAM,CAKzB,YAAYT,EAAiB,CAChC,MAAM,mCAAmCA,CAAO,EAAE,CACtD,CAGA,IAAW,MAAe,CACtB,MAAO,OACX,CAGA,IAAW,KAAKC,EAAO,CACnB,MAAM,IAAI,MAAM,6BAA6B,CACjD,CAGA,IAAoB,MAAe,CAC/B,MAAO,iBACX,CAGA,IAAoB,KAAKA,EAAO,CAC5B,MAAM,IAAI,MAAM,0CAA0C,CAC9D,CACJ,EAEOS,EAAQD,EC3Bf,IAAME,EAAN,cAAwB,KAAM,CAEnB,KAGA,YAAYC,EAAgBC,EAAc,CAE7C,MAAM,GAAGD,aAAiB,MAAQA,EAAM,QAAUA,CAAK,cAAcC,CAAI,GAAG,EAE5E,KAAK,MAAQD,EACb,KAAK,KAAOC,CAChB,CAGA,IAAoB,MAAe,CAC/B,MAAO,WACX,CAGA,IAAoB,KAAKZ,EAAO,CAC5B,MAAM,IAAI,MAAM,oCAAoC,CACxD,CACJ,EAEOa,EAAQH","sourcesContent":["/**\n * Error thrown when file already exists.\n */\nclass AlreadyExistsError extends Error {\n /**\n * Creates a new instance.\n * @param {string} message The error message.\n */\n public constructor(message: string) {\n super(`EEXIST: ${message}`);\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/class-literal-property-style\n public get code(): string {\n return \"EEXIST\";\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/explicit-module-boundary-types\n public set code(_name) {\n throw new Error(\"Cannot overwrite code EEXIST\");\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/class-literal-property-style\n public override get name(): string {\n return \"AlreadyExistsError\";\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/explicit-module-boundary-types\n public override set name(_name) {\n throw new Error(\"Cannot overwrite name of AlreadyExistsError\");\n }\n}\n\nexport default AlreadyExistsError;\n","/**\n * Error thrown when an operation is not allowed on a directory.\n */\nclass DirectoryError extends Error {\n /**\n * Creates a new instance.\n * @param {string} message The error message.\n */\n public constructor(message: string) {\n super(`EISDIR: Illegal operation on a directory, ${message}`);\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/class-literal-property-style\n public get code(): string {\n return \"EISDIR\";\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/explicit-module-boundary-types\n public set code(_name) {\n throw new Error(\"Cannot overwrite code EISDIR\");\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/class-literal-property-style\n public override get name(): string {\n return \"DirectoryError\";\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/explicit-module-boundary-types\n public override set name(_name) {\n throw new Error(\"Cannot overwrite name of DirectoryError\");\n }\n}\n\nexport default DirectoryError;\n","/**\n * Error thrown when a directory is not empty.\n */\nclass NotEmptyError extends Error {\n /**\n * Creates a new instance.\n * @param {string} message The error message.\n */\n public constructor(message: string) {\n super(`ENOTEMPTY: Directory not empty, ${message}`);\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/class-literal-property-style\n public get code(): string {\n return \"ENOTEMPTY\";\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/explicit-module-boundary-types\n public set code(_name) {\n throw new Error(\"Cannot overwrite code ENOTEMPTY\");\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/class-literal-property-style\n public override get name(): string {\n return \"NotEmptyError\";\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/explicit-module-boundary-types\n public override set name(_name) {\n throw new Error(\"Cannot overwrite name of NotEmptyError\");\n }\n}\n\nexport default NotEmptyError;\n","/**\n * Error thrown when a file or directory is not found.\n */\nclass NotFoundError extends Error {\n /**\n * Creates a new instance.\n * @param {string} message The error message.\n */\n public constructor(message: string) {\n super(`ENOENT: ${message}`);\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/class-literal-property-style\n public get code(): string {\n return \"ENOENT\";\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/explicit-module-boundary-types\n public set code(_name) {\n throw new Error(\"Cannot overwrite code ENOENT\");\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/class-literal-property-style\n public override get name(): string {\n return \"NotFoundError\";\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/explicit-module-boundary-types\n public override set name(_name) {\n throw new Error(\"Cannot overwrite name of NotFoundError\");\n }\n}\n\nexport default NotFoundError;\n","/**\n * Error thrown when an operation is not permitted.\n */\nclass PermissionError extends Error {\n /**\n * Creates a new instance.\n * @param {string} message The error message.\n */\n public constructor(message: string) {\n super(`EPERM: Operation not permitted, ${message}`);\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/class-literal-property-style\n public get code(): string {\n return \"EPERM\";\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/explicit-module-boundary-types\n public set code(_name) {\n throw new Error(\"Cannot overwrite code EPERM\");\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/class-literal-property-style\n public override get name(): string {\n return \"PermissionError\";\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/explicit-module-boundary-types\n public override set name(_name) {\n throw new Error(\"Cannot overwrite name of PermissionError\");\n }\n}\n\nexport default PermissionError;\n","// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.\n// Documentation and interface for walk were adapted from Go\n// https://golang.org/pkg/path/filepath/#Walk\n// Copyright 2009 The Go Authors. All rights reserved. BSD license.\n\n/** Error thrown in {@linkcode walk} or {@linkcode walkSync} during iteration. */\nclass WalkError extends Error {\n /** File path of the root that's being walked. */\n public root: string;\n\n /** Constructs a new instance. */\n public constructor(cause: unknown, root: string) {\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n super(`${cause instanceof Error ? cause.message : cause} for path \"${root}\"`);\n\n this.cause = cause;\n this.root = root;\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/class-literal-property-style\n public override get name(): string {\n return \"WalkError\";\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/explicit-module-boundary-types\n public override set name(_name) {\n throw new Error(\"Cannot overwrite name of WalkError\");\n }\n}\n\nexport default WalkError;\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
var n=class extends Error{constructor(r){super(`EEXIST: ${r}`);}get code(){return "EEXIST"}set code(r){throw new Error("Cannot overwrite code EEXIST")}get name(){return "AlreadyExistsError"}set name(r){throw new Error("Cannot overwrite name of AlreadyExistsError")}},l=n;var i=class extends Error{constructor(r){super(`EISDIR: Illegal operation on a directory, ${r}`);}get code(){return "EISDIR"}set code(r){throw new Error("Cannot overwrite code EISDIR")}get name(){return "DirectoryError"}set name(r){throw new Error("Cannot overwrite name of DirectoryError")}},p=i;var s=class extends Error{constructor(r){super(`ENOTEMPTY: Directory not empty, ${r}`);}get code(){return "ENOTEMPTY"}set code(r){throw new Error("Cannot overwrite code ENOTEMPTY")}get name(){return "NotEmptyError"}set name(r){throw new Error("Cannot overwrite name of NotEmptyError")}},d=s;var a=class extends Error{constructor(r){super(`ENOENT: ${r}`);}get code(){return "ENOENT"}set code(r){throw new Error("Cannot overwrite code ENOENT")}get name(){return "NotFoundError"}set name(r){throw new Error("Cannot overwrite name of NotFoundError")}},m=a;var u=class extends Error{constructor(r){super(`EPERM: Operation not permitted, ${r}`);}get code(){return "EPERM"}set code(r){throw new Error("Cannot overwrite code EPERM")}get name(){return "PermissionError"}set name(r){throw new Error("Cannot overwrite name of PermissionError")}},w=u;var c=class extends Error{root;constructor(r,E){super(`${r instanceof Error?r.message:r} for path "${E}"`),this.cause=r,this.root=E;}get name(){return "WalkError"}set name(r){throw new Error("Cannot overwrite name of WalkError")}},g=c;
|
|
2
|
+
|
|
3
|
+
export { l as a, p as b, d as c, m as d, w as e, g as f };
|
|
4
|
+
//# sourceMappingURL=out.js.map
|
|
5
|
+
//# sourceMappingURL=chunk-P3KZLWQC.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/error/already-exists-error.ts","../src/error/directory-error.ts","../src/error/not-empty-error.ts","../src/error/not-found-error.ts","../src/error/permission-error.ts","../src/error/walk-error.ts"],"names":["AlreadyExistsError","message","_name","already_exists_error_default","DirectoryError","directory_error_default","NotEmptyError","not_empty_error_default","NotFoundError","not_found_error_default","PermissionError","permission_error_default","WalkError","cause","root","walk_error_default"],"mappings":"AAGA,IAAMA,EAAN,cAAiC,KAAM,CAK5B,YAAYC,EAAiB,CAChC,MAAM,WAAWA,CAAO,EAAE,CAC9B,CAGA,IAAW,MAAe,CACtB,MAAO,QACX,CAGA,IAAW,KAAKC,EAAO,CACnB,MAAM,IAAI,MAAM,8BAA8B,CAClD,CAGA,IAAoB,MAAe,CAC/B,MAAO,oBACX,CAGA,IAAoB,KAAKA,EAAO,CAC5B,MAAM,IAAI,MAAM,6CAA6C,CACjE,CACJ,EAEOC,EAAQH,EC9Bf,IAAMI,EAAN,cAA6B,KAAM,CAKxB,YAAYH,EAAiB,CAChC,MAAM,6CAA6CA,CAAO,EAAE,CAChE,CAGA,IAAW,MAAe,CACtB,MAAO,QACX,CAGA,IAAW,KAAKC,EAAO,CACnB,MAAM,IAAI,MAAM,8BAA8B,CAClD,CAGA,IAAoB,MAAe,CAC/B,MAAO,gBACX,CAGA,IAAoB,KAAKA,EAAO,CAC5B,MAAM,IAAI,MAAM,yCAAyC,CAC7D,CACJ,EAEOG,EAAQD,EC9Bf,IAAME,EAAN,cAA4B,KAAM,CAKvB,YAAYL,EAAiB,CAChC,MAAM,mCAAmCA,CAAO,EAAE,CACtD,CAGA,IAAW,MAAe,CACtB,MAAO,WACX,CAGA,IAAW,KAAKC,EAAO,CACnB,MAAM,IAAI,MAAM,iCAAiC,CACrD,CAGA,IAAoB,MAAe,CAC/B,MAAO,eACX,CAGA,IAAoB,KAAKA,EAAO,CAC5B,MAAM,IAAI,MAAM,wCAAwC,CAC5D,CACJ,EAEOK,EAAQD,EC9Bf,IAAME,EAAN,cAA4B,KAAM,CAKvB,YAAYP,EAAiB,CAChC,MAAM,WAAWA,CAAO,EAAE,CAC9B,CAGA,IAAW,MAAe,CACtB,MAAO,QACX,CAGA,IAAW,KAAKC,EAAO,CACnB,MAAM,IAAI,MAAM,8BAA8B,CAClD,CAGA,IAAoB,MAAe,CAC/B,MAAO,eACX,CAGA,IAAoB,KAAKA,EAAO,CAC5B,MAAM,IAAI,MAAM,wCAAwC,CAC5D,CACJ,EAEOO,EAAQD,EC9Bf,IAAME,EAAN,cAA8B,KAAM,CAKzB,YAAYT,EAAiB,CAChC,MAAM,mCAAmCA,CAAO,EAAE,CACtD,CAGA,IAAW,MAAe,CACtB,MAAO,OACX,CAGA,IAAW,KAAKC,EAAO,CACnB,MAAM,IAAI,MAAM,6BAA6B,CACjD,CAGA,IAAoB,MAAe,CAC/B,MAAO,iBACX,CAGA,IAAoB,KAAKA,EAAO,CAC5B,MAAM,IAAI,MAAM,0CAA0C,CAC9D,CACJ,EAEOS,EAAQD,EC3Bf,IAAME,EAAN,cAAwB,KAAM,CAEnB,KAGA,YAAYC,EAAgBC,EAAc,CAE7C,MAAM,GAAGD,aAAiB,MAAQA,EAAM,QAAUA,CAAK,cAAcC,CAAI,GAAG,EAE5E,KAAK,MAAQD,EACb,KAAK,KAAOC,CAChB,CAGA,IAAoB,MAAe,CAC/B,MAAO,WACX,CAGA,IAAoB,KAAKZ,EAAO,CAC5B,MAAM,IAAI,MAAM,oCAAoC,CACxD,CACJ,EAEOa,EAAQH","sourcesContent":["/**\n * Error thrown when file already exists.\n */\nclass AlreadyExistsError extends Error {\n /**\n * Creates a new instance.\n * @param {string} message The error message.\n */\n public constructor(message: string) {\n super(`EEXIST: ${message}`);\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/class-literal-property-style\n public get code(): string {\n return \"EEXIST\";\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/explicit-module-boundary-types\n public set code(_name) {\n throw new Error(\"Cannot overwrite code EEXIST\");\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/class-literal-property-style\n public override get name(): string {\n return \"AlreadyExistsError\";\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/explicit-module-boundary-types\n public override set name(_name) {\n throw new Error(\"Cannot overwrite name of AlreadyExistsError\");\n }\n}\n\nexport default AlreadyExistsError;\n","/**\n * Error thrown when an operation is not allowed on a directory.\n */\nclass DirectoryError extends Error {\n /**\n * Creates a new instance.\n * @param {string} message The error message.\n */\n public constructor(message: string) {\n super(`EISDIR: Illegal operation on a directory, ${message}`);\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/class-literal-property-style\n public get code(): string {\n return \"EISDIR\";\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/explicit-module-boundary-types\n public set code(_name) {\n throw new Error(\"Cannot overwrite code EISDIR\");\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/class-literal-property-style\n public override get name(): string {\n return \"DirectoryError\";\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/explicit-module-boundary-types\n public override set name(_name) {\n throw new Error(\"Cannot overwrite name of DirectoryError\");\n }\n}\n\nexport default DirectoryError;\n","/**\n * Error thrown when a directory is not empty.\n */\nclass NotEmptyError extends Error {\n /**\n * Creates a new instance.\n * @param {string} message The error message.\n */\n public constructor(message: string) {\n super(`ENOTEMPTY: Directory not empty, ${message}`);\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/class-literal-property-style\n public get code(): string {\n return \"ENOTEMPTY\";\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/explicit-module-boundary-types\n public set code(_name) {\n throw new Error(\"Cannot overwrite code ENOTEMPTY\");\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/class-literal-property-style\n public override get name(): string {\n return \"NotEmptyError\";\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/explicit-module-boundary-types\n public override set name(_name) {\n throw new Error(\"Cannot overwrite name of NotEmptyError\");\n }\n}\n\nexport default NotEmptyError;\n","/**\n * Error thrown when a file or directory is not found.\n */\nclass NotFoundError extends Error {\n /**\n * Creates a new instance.\n * @param {string} message The error message.\n */\n public constructor(message: string) {\n super(`ENOENT: ${message}`);\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/class-literal-property-style\n public get code(): string {\n return \"ENOENT\";\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/explicit-module-boundary-types\n public set code(_name) {\n throw new Error(\"Cannot overwrite code ENOENT\");\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/class-literal-property-style\n public override get name(): string {\n return \"NotFoundError\";\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/explicit-module-boundary-types\n public override set name(_name) {\n throw new Error(\"Cannot overwrite name of NotFoundError\");\n }\n}\n\nexport default NotFoundError;\n","/**\n * Error thrown when an operation is not permitted.\n */\nclass PermissionError extends Error {\n /**\n * Creates a new instance.\n * @param {string} message The error message.\n */\n public constructor(message: string) {\n super(`EPERM: Operation not permitted, ${message}`);\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/class-literal-property-style\n public get code(): string {\n return \"EPERM\";\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/explicit-module-boundary-types\n public set code(_name) {\n throw new Error(\"Cannot overwrite code EPERM\");\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/class-literal-property-style\n public override get name(): string {\n return \"PermissionError\";\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/explicit-module-boundary-types\n public override set name(_name) {\n throw new Error(\"Cannot overwrite name of PermissionError\");\n }\n}\n\nexport default PermissionError;\n","// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.\n// Documentation and interface for walk were adapted from Go\n// https://golang.org/pkg/path/filepath/#Walk\n// Copyright 2009 The Go Authors. All rights reserved. BSD license.\n\n/** Error thrown in {@linkcode walk} or {@linkcode walkSync} during iteration. */\nclass WalkError extends Error {\n /** File path of the root that's being walked. */\n public root: string;\n\n /** Constructs a new instance. */\n public constructor(cause: unknown, root: string) {\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n super(`${cause instanceof Error ? cause.message : cause} for path \"${root}\"`);\n\n this.cause = cause;\n this.root = root;\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/class-literal-property-style\n public override get name(): string {\n return \"WalkError\";\n }\n\n // eslint-disable-next-line class-methods-use-this,@typescript-eslint/explicit-module-boundary-types\n public override set name(_name) {\n throw new Error(\"Cannot overwrite name of WalkError\");\n }\n}\n\nexport default WalkError;\n"]}
|
package/dist/error.cjs
CHANGED
|
@@ -1,25 +1,37 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkBZXQ545V_cjs = require('./chunk-BZXQ545V.cjs');
|
|
4
4
|
var chunkN5NZURYL_cjs = require('./chunk-N5NZURYL.cjs');
|
|
5
5
|
|
|
6
|
-
var t=class extends Error{constructor(r){super(`EEXIST: ${r}`);}get code(){return "EEXIST"}set code(r){throw new Error("Cannot overwrite code EEXIST")}get name(){return "AlreadyExistsError"}set name(r){throw new Error("Cannot overwrite name of AlreadyExistsError")}},E=t;var n=class extends Error{constructor(r){super(`EISDIR: Illegal operation on a directory, ${r}`);}get code(){return "EISDIR"}set code(r){throw new Error("Cannot overwrite code EISDIR")}get name(){return "DirectoryError"}set name(r){throw new Error("Cannot overwrite name of DirectoryError")}},l=n;var i=class extends Error{constructor(r){super(`ENOTEMPTY: Directory not empty, ${r}`);}get code(){return "ENOTEMPTY"}set code(r){throw new Error("Cannot overwrite code ENOTEMPTY")}get name(){return "NotEmptyError"}set name(r){throw new Error("Cannot overwrite name of NotEmptyError")}},d=i;var a=class extends Error{constructor(r){super(`ENOENT: ${r}`);}get code(){return "ENOENT"}set code(r){throw new Error("Cannot overwrite code ENOENT")}get name(){return "NotFoundError"}set name(r){throw new Error("Cannot overwrite name of NotFoundError")}},p=a;
|
|
7
6
|
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, 'AlreadyExistsError', {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunkBZXQ545V_cjs.a; }
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, 'DirectoryError', {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return chunkBZXQ545V_cjs.b; }
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(exports, 'NotEmptyError', {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return chunkBZXQ545V_cjs.c; }
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports, 'NotFoundError', {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () { return chunkBZXQ545V_cjs.d; }
|
|
23
|
+
});
|
|
8
24
|
Object.defineProperty(exports, 'PermissionError', {
|
|
9
25
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkBZXQ545V_cjs.e; }
|
|
11
27
|
});
|
|
12
28
|
Object.defineProperty(exports, 'WalkError', {
|
|
13
29
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkBZXQ545V_cjs.f; }
|
|
15
31
|
});
|
|
16
32
|
Object.defineProperty(exports, 'JSONError', {
|
|
17
33
|
enumerable: true,
|
|
18
34
|
get: function () { return chunkN5NZURYL_cjs.a; }
|
|
19
35
|
});
|
|
20
|
-
exports.AlreadyExistsError = E;
|
|
21
|
-
exports.DirectoryError = l;
|
|
22
|
-
exports.NotEmptyError = d;
|
|
23
|
-
exports.NotFoundError = p;
|
|
24
36
|
//# sourceMappingURL=out.js.map
|
|
25
37
|
//# sourceMappingURL=error.cjs.map
|
package/dist/error.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
package/dist/error.js
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
export { b as PermissionError,
|
|
1
|
+
export { a as AlreadyExistsError, b as DirectoryError, c as NotEmptyError, d as NotFoundError, e as PermissionError, f as WalkError } from './chunk-P3KZLWQC.js';
|
|
2
2
|
export { a as JSONError } from './chunk-UPN3Y5W3.js';
|
|
3
|
-
|
|
4
|
-
var n=class extends Error{constructor(r){super(`EEXIST: ${r}`);}get code(){return "EEXIST"}set code(r){throw new Error("Cannot overwrite code EEXIST")}get name(){return "AlreadyExistsError"}set name(r){throw new Error("Cannot overwrite name of AlreadyExistsError")}},l=n;var i=class extends Error{constructor(r){super(`EISDIR: Illegal operation on a directory, ${r}`);}get code(){return "EISDIR"}set code(r){throw new Error("Cannot overwrite code EISDIR")}get name(){return "DirectoryError"}set name(r){throw new Error("Cannot overwrite name of DirectoryError")}},d=i;var a=class extends Error{constructor(r){super(`ENOTEMPTY: Directory not empty, ${r}`);}get code(){return "ENOTEMPTY"}set code(r){throw new Error("Cannot overwrite code ENOTEMPTY")}get name(){return "NotEmptyError"}set name(r){throw new Error("Cannot overwrite name of NotEmptyError")}},p=a;var s=class extends Error{constructor(r){super(`ENOENT: ${r}`);}get code(){return "ENOENT"}set code(r){throw new Error("Cannot overwrite code ENOENT")}get name(){return "NotFoundError"}set name(r){throw new Error("Cannot overwrite name of NotFoundError")}},m=s;
|
|
5
|
-
|
|
6
|
-
export { l as AlreadyExistsError, d as DirectoryError, p as NotEmptyError, m as NotFoundError };
|
|
7
3
|
//# sourceMappingURL=out.js.map
|
|
8
4
|
//# sourceMappingURL=error.js.map
|
package/dist/error.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkBZXQ545V_cjs = require('./chunk-BZXQ545V.cjs');
|
|
4
4
|
var chunkOC6EOVBX_cjs = require('./chunk-OC6EOVBX.cjs');
|
|
5
5
|
require('./chunk-N5NZURYL.cjs');
|
|
6
6
|
var promises = require('fs/promises');
|
|
@@ -11,55 +11,57 @@ var path = require('path');
|
|
|
11
11
|
var zlib = require('zlib');
|
|
12
12
|
var yaml = require('yaml');
|
|
13
13
|
|
|
14
|
-
var
|
|
15
|
-
`,
|
|
16
|
-
`,Ut=process$1.platform==="win32"?V:C,At=t=>{let e=t.match(G);if(!e||e.length===0)return null;let r=e.filter(n=>n===V).length,o=e.length-r;return r>o?V:C},It=(t,e)=>t.replaceAll(G,e);var Jt=t=>{let e=t.replace(/\.\*/g,".([^/]*)").replace(/\*\*/g,"(.*)").replace(/(?<!\.)\*(?!\*)/g,"([^/]*)").replace(/\?/g,"[^/]").replace(/\.(?!\*)/g,"\\.").replace(/\{/g,"(").replace(/\}/g,")").replace(/,/g,"|").replace(/\[!(.*?)\]/g,"[^$1]");return new RegExp(`^${e}$`)},x=Jt;var Yt=(t,e,r,o)=>Array.isArray(e)&&e.length>0&&!e.some(n=>t.endsWith(n))||r&&!r.some(n=>n.test(t))?!1:!(o&&o.some(n=>n.test(t))),w=Yt;var Kt=async t=>{let e=pathe.normalize(t),r=pathe.basename(e),o=await promises.stat(e);return {isDirectory:o.isDirectory,isFile:o.isFile,isSymbolicLink:o.isSymbolicLink,name:r,path:e}};async function*D(t,{extensions:e,followSymlinks:r=!1,includeDirs:o=!0,includeFiles:n=!0,includeSymlinks:s=!0,match:a,maxDepth:l=Number.POSITIVE_INFINITY,skip:y}={}){if(chunkOC6EOVBX_cjs.a(t),l<0)return;let f=a?a.map(i=>typeof i=="string"?x(i):i):void 0,d=y?y.map(i=>typeof i=="string"?x(i):i):void 0;if(t=pathe.resolve(chunkOC6EOVBX_cjs.b(t)),o&&w(t,e,f,d)&&(yield await Kt(t)),!(l<1||!w(t,void 0,void 0,d)))try{for await(let i of await promises.readdir(t,{withFileTypes:!0})){let u=pathe.join(t,i.name);if(i.isSymbolicLink())if(r)u=await promises.realpath(u);else if(s&&w(u,e,f,d))yield {isDirectory:i.isDirectory,isFile:i.isFile,isSymbolicLink:i.isSymbolicLink,name:i.name,path:u};else continue;i.isSymbolicLink()||i.isDirectory()?yield*D(u,{extensions:e,followSymlinks:r,includeDirs:o,includeFiles:n,includeSymlinks:s,match:f,maxDepth:l-1,skip:d}):i.isFile()&&n&&w(u,e,f,d)&&(yield {isDirectory:i.isDirectory,isFile:i.isFile,isSymbolicLink:i.isSymbolicLink,name:i.name,path:u});}}catch(i){throw i instanceof chunkJSJNX53G_cjs.a?i:new chunkJSJNX53G_cjs.a(i,t)}}var Mt=async(t,e={})=>{Array.isArray(e.extensions)||(e.extensions=["js","mjs","cjs","ts"]);let r=[];for await(let o of D(t,e))r.push(o.path);return r},jt=Mt;var Zt=t=>{let e=pathe.normalize(t),r=fs.statSync(e);return {isDirectory:r.isDirectory,isFile:r.isFile,isSymbolicLink:r.isSymbolicLink,name:pathe.basename(e),path:e}};function*L(t,{extensions:e,followSymlinks:r=!1,includeDirs:o=!0,includeFiles:n=!0,includeSymlinks:s=!0,match:a,maxDepth:l=Number.POSITIVE_INFINITY,skip:y}={}){if(chunkOC6EOVBX_cjs.a(t),l<0)return;let f=a?a.map(i=>typeof i=="string"?x(i):i):void 0,d=y?y.map(i=>typeof i=="string"?x(i):i):void 0;if(t=pathe.resolve(chunkOC6EOVBX_cjs.b(t)),o&&w(t,e,f,d)&&(yield Zt(t)),!(l<1||!w(t,void 0,void 0,d)))try{for(let i of fs.readdirSync(t,{withFileTypes:!0})){let u=pathe.join(t,i.name);if(i.isSymbolicLink())if(r)u=fs.realpathSync(u);else if(s&&w(u,e,f,d))yield {isDirectory:i.isDirectory,isFile:i.isFile,isSymbolicLink:i.isSymbolicLink,name:i.name,path:pathe.normalize(u)};else continue;i.isSymbolicLink()||i.isDirectory()?yield*L(u,{extensions:e,followSymlinks:r,includeDirs:o,includeFiles:n,includeSymlinks:s,match:f,maxDepth:l-1,skip:d}):i.isFile()&&n&&w(u,e,f,d)&&(yield {isDirectory:i.isDirectory,isFile:i.isFile,isSymbolicLink:i.isSymbolicLink,name:i.name,path:pathe.normalize(u)});}}catch(i){throw i instanceof chunkJSJNX53G_cjs.a?i:new chunkJSJNX53G_cjs.a(i,t)}}var te=(t,e={})=>{Array.isArray(e.extensions)||(e.extensions=["js","mjs","cjs","ts"]);let r=[];for(let o of L(t,e))r.push(o.path);return r},ee=te;var se=async(t,e={})=>{if(typeof t!="string"&&!Array.isArray(t)&&typeof t!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");let r=e.cwd?chunkOC6EOVBX_cjs.b(e.cwd):process.cwd(),o=pathe.resolve(r),{root:n}=path.parse(o),s=chunkOC6EOVBX_cjs.b(e.stopAt??n),a=pathe.resolve(o,s),l=e.type??"file",y=async function(f){return typeof t=="function"?[await t(f)]:typeof t=="string"?[t]:Array.isArray(t)?t:[t]};for(;o&&o!==a&&o!==n;){for await(let f of await y(o)){if(f===P)return;if(f===void 0)continue;let d=pathe.isAbsolute(f)?f:pathe.resolve(o,f);try{let i=await promises.stat(d);if(l==="file"&&i.isFile()||l==="directory"&&i.isDirectory())return d}catch{}}o=pathe.dirname(o);}},ae=se;var le=(t,e={})=>{if(typeof t!="string"&&!Array.isArray(t)&&typeof t!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");let r=e.cwd?chunkOC6EOVBX_cjs.b(e.cwd):process.cwd(),o=pathe.resolve(r),{root:n}=path.parse(o),s=chunkOC6EOVBX_cjs.b(e.stopAt??n),a=pathe.resolve(o,s),l=e.type??"file",y=function(f){return typeof t=="function"?[t(f)]:typeof t=="string"?[t]:Array.isArray(t)?t:[t]};for(;o&&o!==a&&o!==n;){for(let f of y(o)){if(f===P)return;if(f===void 0)continue;let d=pathe.isAbsolute(f)?f:pathe.resolve(o,f);try{let i=fs.statSync(d);if(l==="file"&&i.isFile()||l==="directory"&&i.isDirectory())return d}catch{}}o=pathe.dirname(o);}},de=le;async function ue(t,e=0){chunkOC6EOVBX_cjs.a(t),t=chunkOC6EOVBX_cjs.b(t);try{return await promises.access(t,e),!0}catch{return !1}}var O=ue;function we(t,e=0){chunkOC6EOVBX_cjs.a(t),t=chunkOC6EOVBX_cjs.b(t);try{return fs.accessSync(t,e),!0}catch{return !1}}var R=we;var he={brotli:zlib.brotliDecompress,gzip:zlib.unzip,none:(t,e)=>{e(null,t);}},xe=async(t,e)=>{if(chunkOC6EOVBX_cjs.a(t),t=chunkOC6EOVBX_cjs.b(t),!await O(t))throw new chunkJSJNX53G_cjs.b(`unable to read the non-accessible file: ${t}`);if(!await O(t,4))throw new Error(`Unable to read the non-readable file: ${t}`);let{buffer:r,compression:o,encoding:n,flag:s}=e??{};return await promises.readFile(t,s?{encoding:n,flag:s}:{encoding:n}).then(async a=>await new Promise((l,y)=>{he[o??"none"](a,(f,d)=>{f?y(f):l(r?d:d.toString());});})).catch(a=>{throw a})},T=xe;var ke={brotli:zlib.brotliDecompressSync,gzip:zlib.unzipSync,none:t=>t},Ee=(t,e)=>{if(chunkOC6EOVBX_cjs.a(t),t=chunkOC6EOVBX_cjs.b(t),!R(t))throw new chunkJSJNX53G_cjs.b(`unable to read the non-accessible file: ${t}`);if(!R(t,4))throw new chunkJSJNX53G_cjs.b(`invalid access to read file at: ${t}`);let{buffer:r,compression:o,encoding:n,flag:s}=e??{},a=fs.readFileSync(t,s?{encoding:n,flag:s}:{encoding:n}),l=ke[o??"none"](a);return r?l:l.toString()},v=Ee;async function De(t,e,r){typeof e=="object"&&(r=e,e=void 0);let o=await T(t,{buffer:!0,encoding:void 0}),n=new TextDecoder().decode(o),{beforeParse:s,color:a}=r??{};return typeof s=="function"&&(n=s(n)),chunkOC6EOVBX_cjs.c(n,e,chunkOC6EOVBX_cjs.b(t),{color:a})}var Le=De;function Te(t,e,r){typeof e=="object"&&(r=e,e=void 0);let o=v(t,{buffer:!0,encoding:void 0}),n=new TextDecoder().decode(o),{beforeParse:s,color:a}=r??{};return typeof s=="function"&&(n=s(n)),chunkOC6EOVBX_cjs.c(n,e,chunkOC6EOVBX_cjs.b(t),{color:a})}var ve=Te;async function Ue(t,e,r){let{buffer:o,compression:n,encoding:s="utf8",flag:a,...l}=r??{},y=await T(t,{buffer:o,compression:n,encoding:s,flag:a});return typeof e=="function"?yaml.parse(y,e,l):yaml.parse(y,l)}var Ae=Ue;function Ie(t,e,r){let{buffer:o,compression:n,encoding:s="utf8",flag:a,...l}=r??{},y=v(t,{buffer:o,compression:n,encoding:s,flag:a});return typeof e=="function"?yaml.parse(y,e,l):yaml.parse(y,l)}var Je=Ie;var $e=async(t,e)=>{if(chunkOC6EOVBX_cjs.a(t),!fs.existsSync(t)){await promises.mkdir(t,{recursive:!0});return}for await(let r of await promises.readdir(t))await promises.rm(pathe.join(chunkOC6EOVBX_cjs.b(t),r),{...e,force:!0,recursive:!0});},Ce=$e;var Xe=(t,e)=>{if(chunkOC6EOVBX_cjs.a(t),!fs.existsSync(t)){fs.mkdirSync(t,{recursive:!0});return}for(let r of fs.readdirSync(t))fs.rmSync(pathe.join(chunkOC6EOVBX_cjs.b(t),r),{...e,force:!0,recursive:!0});},He=Xe;var Qe=async(t,e={})=>{chunkOC6EOVBX_cjs.a(t);try{await promises.unlink(t);}catch{}try{await promises.rm(t,{force:!0,maxRetries:e?.maxRetries,recursive:!0,retryDelay:e?.retryDelay});}catch{}},Ze=Qe;var rr=(t,e={})=>{chunkOC6EOVBX_cjs.a(t);try{fs.unlinkSync(t);}catch{}try{fs.rmSync(t,{force:!0,maxRetries:e?.maxRetries,recursive:!0,retryDelay:e?.retryDelay});}catch{}},or=rr;var ir=new TextEncoder,nr=t=>{if(t instanceof Uint8Array)return t;if(typeof t=="string")return ir.encode(t);if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t)){let e=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);return new Uint8Array(e)}throw new TypeError("Invalid contents type. Expected string or ArrayBuffer.")},$=nr;var dr=async(t,e,r)=>{r={encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...r},chunkOC6EOVBX_cjs.a(t),chunkOC6EOVBX_cjs.d(e),t=chunkOC6EOVBX_cjs.b(t);try{let o=await O(t,0);if(!o&&r.recursive){let a=pathe.dirname(t);await O(a,0)||await promises.mkdir(a,{recursive:!0});}let n;await promises.writeFile(`${t}.tmp`,$(e),{encoding:r.encoding,flag:r.flag}),o&&!r.overwrite&&(n=await promises.stat(t),r.chown===void 0&&(r.chown={gid:n.gid,uid:n.uid}),await promises.rename(t,`${t}.bak`));let s=`${t}.tmp`;if(r.chown)try{await promises.chown(s,r.chown.uid,r.chown.gid);}catch{}await promises.chmod(s,n&&!r.mode?n.mode:r.mode??438),await promises.rename(s,t);}catch(o){throw new Error(`Failed to write file at: ${t} - ${o.message}`,{cause:o})}finally{await O(`${t}.tmp`)&&await promises.unlink(`${t}.tmp`);}},U=dr;var hr=(t,e,r)=>{r={encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...r},chunkOC6EOVBX_cjs.a(t),chunkOC6EOVBX_cjs.d(e),t=chunkOC6EOVBX_cjs.b(t);try{let o=R(t,0);if(!o&&r.recursive){let a=pathe.dirname(t);R(a,0)||fs.mkdirSync(a,{recursive:!0});}let n;fs.writeFileSync(`${t}.tmp`,$(e),{encoding:r.encoding,flag:r.flag}),o&&!r.overwrite&&(n=fs.statSync(t),r.chown===void 0&&(r.chown={gid:n.gid,uid:n.uid}),fs.renameSync(t,`${t}.bak`));let s=`${t}.tmp`;if(r.chown)try{fs.chownSync(s,r.chown.uid,r.chown.gid);}catch{}fs.chmodSync(s,n&&!r.mode?n.mode:r.mode??438),fs.renameSync(s,t);}catch(o){throw new Error(`Failed to write file at: ${t} - ${o.message}`,{cause:o})}finally{R(`${t}.tmp`)&&fs.unlinkSync(`${t}.tmp`);}},A=hr;var xr=/^(?:( )+|\t+)/,I="space",rt="tab";function et(t,e){let r=new Map,o=0,n,s;for(let a of t.split(/\n/g)){if(!a)continue;let l,y,f,d,i,u=a.match(xr);if(u===null)o=0,n="";else {if(l=u[0].length,y=u[1]?I:rt,e&&y===I&&l===1)continue;y!==n&&(o=0),n=y,f=1,d=0;let Y=l-o;if(o=l,Y===0)f=0,d=1;else {let nt=Y>0?Y:-Y;s=Fr(y,nt);}i=r.get(s),i=i===void 0?[1,0]:[i[0]+f,i[1]+d],r.set(s,i);}}return r}function Fr(t,e){return (t===I?"s":"t")+String(e)}function br(t){let r=t[0]==="s"?I:rt,o=Number(t.slice(1));return {type:r,amount:o}}function Pr(t){let e,r=0,o=0;for(let[n,[s,a]]of t)(s>r||s===r&&a>o)&&(r=s,o=a,e=n);return e}function kr(t,e){return (t===I?" ":" ").repeat(e)}function J(t){if(typeof t!="string")throw new TypeError("Expected a string");let e=et(t,!0);e.size===0&&(e=et(t,!1));let r=Pr(e),o,n=0,s="";return r!==void 0&&({type:o,amount:n}=br(r),s=kr(o,n)),{amount:n,type:o,indent:s}}var Dr=async(t,e,r={})=>{let{detectIndent:o,indent:n,replacer:s,stringify:a=JSON.stringify,...l}={indent:" ",...r},y=n,f=`
|
|
17
|
-
`;if(await
|
|
14
|
+
var R=0,T=4,wt=2,St=1,D=Symbol("findUpStop");var g=t=>{if(t.isFile())return "file";if(t.isDirectory())return "dir";if(t.isSymbolicLink())return "symlink"};var Ot=async t=>{chunkOC6EOVBX_cjs.a(t);try{let e=await promises.lstat(t);if(!e.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${g(e)}'`);return}catch(e){if(e.code!=="ENOENT")throw e}try{await promises.mkdir(t,{recursive:!0});}catch(e){if(e.code!=="EEXIST")throw e;let r=await promises.lstat(t);if(!r.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${g(r)}'`)}},x=Ot;var xt=t=>{chunkOC6EOVBX_cjs.a(t);try{let e=fs.lstatSync(t);if(!e.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${g(e)}'`);return}catch(e){if(e.code!=="ENOENT")throw e}try{fs.mkdirSync(t,{recursive:!0});}catch(e){if(e.code!=="EEXIST")throw e;let r=fs.lstatSync(t);if(!r.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${g(r)}'`)}},F=xt;var Et=async t=>{chunkOC6EOVBX_cjs.a(t);try{let e=await promises.lstat(t);if(!e.isFile())throw new Error(`Ensure path exists, expected 'file', got '${g(e)}'`)}catch(e){if(e.code==="ENOENT"){await x(pathe.dirname(chunkOC6EOVBX_cjs.b(t))),await promises.writeFile(t,new Uint8Array);return}throw e}},kt=Et;var vt=t=>{chunkOC6EOVBX_cjs.a(t);try{let e=fs.lstatSync(t);if(!e.isFile())throw new Error(`Ensure path exists, expected 'file', got '${g(e)}'`)}catch(e){if(e.code==="ENOENT"){F(pathe.dirname(chunkOC6EOVBX_cjs.b(t))),fs.writeFileSync(t,new Uint8Array);return}throw e}},Ut=vt;var It=(t,e)=>!!e.ino&&!!e.dev&&e.ino===t.ino&&e.dev===t.dev,w=It;var Yt=async(t,e)=>{chunkOC6EOVBX_cjs.a(t),chunkOC6EOVBX_cjs.a(e),t=pathe.toNamespacedPath(chunkOC6EOVBX_cjs.b(t)),e=pathe.toNamespacedPath(chunkOC6EOVBX_cjs.b(e));let r;try{r=await promises.lstat(e);}catch{}let o;try{o=await promises.lstat(t);}catch(i){throw i.message=i.message.replace("lstat","ensureLink"),i}r&&w(o,r)||(await x(pathe.dirname(e)),await promises.link(t,e));},Wt=Yt;var $t=(t,e)=>{chunkOC6EOVBX_cjs.a(t),chunkOC6EOVBX_cjs.a(e),t=pathe.toNamespacedPath(chunkOC6EOVBX_cjs.b(t)),e=pathe.toNamespacedPath(chunkOC6EOVBX_cjs.b(e));let r;try{r=fs.lstatSync(e);}catch{}let o;try{o=fs.lstatSync(t);}catch(i){throw i.message=i.message.replace("lstat","ensureLink"),i}r&&w(o,r)||(F(pathe.dirname(e)),fs.linkSync(t,e));},Ct=$t;var zt=(t,e)=>typeof t!="string"?t:t.startsWith("./")?pathe.resolve(t):typeof e=="string"?pathe.resolve(pathe.dirname(e),t):new URL(t,e),C=zt;var Xt=process.platform==="win32"||/^(?:msys|cygwin)$/.test(process.env.OSTYPE),Ht=async(t,e,r)=>{chunkOC6EOVBX_cjs.a(t),chunkOC6EOVBX_cjs.a(e);let o=C(t,e);e=pathe.toNamespacedPath(chunkOC6EOVBX_cjs.b(e));try{if((await promises.lstat(e)).isSymbolicLink()&&w(await promises.stat(o),await promises.stat(e))){let[d,a]=await Promise.all([promises.stat(o),promises.stat(e)]);if(w(d,a))return}}catch{}let i=await promises.lstat(o),s=g(i);await x(pathe.dirname(e));let m=r??(Xt?"junction":s==="dir"?"dir":"file");try{await promises.symlink(pathe.toNamespacedPath(chunkOC6EOVBX_cjs.b(o)),e,m);}catch(p){if(p.code!=="EEXIST")throw p;let d=await promises.lstat(e);if(!d.isSymbolicLink())throw new chunkBZXQ545V_cjs.a("A "+g(d)+" already exists at the path: "+e);let a=await promises.readlink(e),y=pathe.toNamespacedPath(pathe.resolve(a));if(y!==o)throw new chunkBZXQ545V_cjs.a("A symlink targeting to an undesired path already exists: "+e+" -> "+y)}},Gt=Ht;var ee=process.platform==="win32"||/^(?:msys|cygwin)$/.test(process.env.OSTYPE),re=(t,e,r)=>{chunkOC6EOVBX_cjs.a(t),chunkOC6EOVBX_cjs.a(e);let o=C(t,e);e=pathe.toNamespacedPath(chunkOC6EOVBX_cjs.b(e));try{if(fs.lstatSync(e).isSymbolicLink()&&w(fs.statSync(o),fs.statSync(e))){let d=fs.statSync(o),a=fs.statSync(e);if(w(d,a))return}}catch{}let i=fs.lstatSync(o),s=g(i);F(pathe.dirname(e));let m=r??(ee?"junction":s==="dir"?"dir":"file");try{fs.symlinkSync(pathe.toNamespacedPath(chunkOC6EOVBX_cjs.b(o)),e,m);}catch(p){if(p.code!=="EEXIST")throw p;let d=fs.lstatSync(e);if(!d.isSymbolicLink())throw new chunkBZXQ545V_cjs.a("A "+g(d)+" already exists at the path: "+e);let a=fs.readlinkSync(e),y=pathe.toNamespacedPath(pathe.resolve(a));if(y!==o)throw new chunkBZXQ545V_cjs.a("A symlink targeting to an undesired path already exists: "+e+" -> "+y)}},oe=re;var at=/\r?\n/g,G=`
|
|
15
|
+
`,K=`\r
|
|
16
|
+
`,ne=process$1.platform==="win32"?K:G,se=t=>{let e=t.match(at);if(!e||e.length===0)return null;let r=e.filter(i=>i===K).length,o=e.length-r;return r>o?K:G},ae=(t,e)=>t.replaceAll(at,e);var fe=t=>{let e=t.replace(/\.\*/g,".([^/]*)").replace(/\*\*/g,"(.*)").replace(/(?<!\.)\*(?!\*)/g,"([^/]*)").replace(/\?/g,"[^/]").replace(/\.(?!\*)/g,"\\.").replace(/\{/g,"(").replace(/\}/g,")").replace(/,/g,"|").replace(/\[!(.*?)\]/g,"[^$1]");return new RegExp(`^${e}$`)},E=fe;var ce=(t,e,r,o)=>Array.isArray(e)&&e.length>0&&!e.some(i=>t.endsWith(i))||r&&!r.some(i=>i.test(t))?!1:!(o&&o.some(i=>i.test(t))),S=ce;var we=async t=>{let e=pathe.normalize(t),r=pathe.basename(e),o=await promises.stat(e);return {isDirectory:o.isDirectory,isFile:o.isFile,isSymbolicLink:o.isSymbolicLink,name:r,path:e}};async function*L(t,{extensions:e,followSymlinks:r=!1,includeDirs:o=!0,includeFiles:i=!0,includeSymlinks:s=!0,match:m,maxDepth:p=Number.POSITIVE_INFINITY,skip:d}={}){if(chunkOC6EOVBX_cjs.a(t),p<0)return;let a=m?m.map(n=>typeof n=="string"?E(n):n):void 0,y=d?d.map(n=>typeof n=="string"?E(n):n):void 0;if(t=pathe.resolve(chunkOC6EOVBX_cjs.b(t)),o&&S(t,e,a,y)&&(yield await we(t)),!(p<1||!S(t,void 0,void 0,y)))try{for await(let n of await promises.readdir(t,{withFileTypes:!0})){let u=pathe.join(t,n.name);if(n.isSymbolicLink())if(r)u=await promises.realpath(u);else if(s&&S(u,e,a,y))yield {isDirectory:n.isDirectory,isFile:n.isFile,isSymbolicLink:n.isSymbolicLink,name:n.name,path:u};else continue;n.isSymbolicLink()||n.isDirectory()?yield*L(u,{extensions:e,followSymlinks:r,includeDirs:o,includeFiles:i,includeSymlinks:s,match:a,maxDepth:p-1,skip:y}):n.isFile()&&i&&S(u,e,a,y)&&(yield {isDirectory:n.isDirectory,isFile:n.isFile,isSymbolicLink:n.isSymbolicLink,name:n.name,path:u});}}catch(n){throw n instanceof chunkBZXQ545V_cjs.f?n:new chunkBZXQ545V_cjs.f(n,t)}}var Se=async(t,e={})=>{Array.isArray(e.extensions)||(e.extensions=["js","mjs","cjs","ts"]);let r=[];for await(let o of L(t,e))r.push(o.path);return r},he=Se;var Ee=t=>{let e=pathe.normalize(t),r=fs.statSync(e);return {isDirectory:r.isDirectory,isFile:r.isFile,isSymbolicLink:r.isSymbolicLink,name:pathe.basename(e),path:e}};function*v(t,{extensions:e,followSymlinks:r=!1,includeDirs:o=!0,includeFiles:i=!0,includeSymlinks:s=!0,match:m,maxDepth:p=Number.POSITIVE_INFINITY,skip:d}={}){if(chunkOC6EOVBX_cjs.a(t),p<0)return;let a=m?m.map(n=>typeof n=="string"?E(n):n):void 0,y=d?d.map(n=>typeof n=="string"?E(n):n):void 0;if(t=pathe.resolve(chunkOC6EOVBX_cjs.b(t)),o&&S(t,e,a,y)&&(yield Ee(t)),!(p<1||!S(t,void 0,void 0,y)))try{for(let n of fs.readdirSync(t,{withFileTypes:!0})){let u=pathe.join(t,n.name);if(n.isSymbolicLink())if(r)u=fs.realpathSync(u);else if(s&&S(u,e,a,y))yield {isDirectory:n.isDirectory,isFile:n.isFile,isSymbolicLink:n.isSymbolicLink,name:n.name,path:pathe.normalize(u)};else continue;n.isSymbolicLink()||n.isDirectory()?yield*v(u,{extensions:e,followSymlinks:r,includeDirs:o,includeFiles:i,includeSymlinks:s,match:a,maxDepth:p-1,skip:y}):n.isFile()&&i&&S(u,e,a,y)&&(yield {isDirectory:n.isDirectory,isFile:n.isFile,isSymbolicLink:n.isSymbolicLink,name:n.name,path:pathe.normalize(u)});}}catch(n){throw n instanceof chunkBZXQ545V_cjs.f?n:new chunkBZXQ545V_cjs.f(n,t)}}var ke=(t,e={})=>{Array.isArray(e.extensions)||(e.extensions=["js","mjs","cjs","ts"]);let r=[];for(let o of v(t,e))r.push(o.path);return r},Te=ke;var Ie=async(t,e={})=>{if(typeof t!="string"&&!Array.isArray(t)&&typeof t!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");let r=e.cwd?chunkOC6EOVBX_cjs.b(e.cwd):process.cwd(),o=pathe.resolve(r),{root:i}=path.parse(o),s=chunkOC6EOVBX_cjs.b(e.stopAt??i),m=pathe.resolve(o,s),p=e.type??"file",d=async function(a){return typeof t=="function"?[await t(a)]:typeof t=="string"?[t]:Array.isArray(t)?t:[t]};for(;o&&o!==m&&o!==i;){for await(let a of await d(o)){if(a===D)return;if(a===void 0)continue;let y=pathe.isAbsolute(a)?a:pathe.resolve(o,a);try{let n=await promises.stat(y);if(p==="file"&&n.isFile()||p==="directory"&&n.isDirectory())return y}catch{}}o=pathe.dirname(o);}},Ae=Ie;var Ve=(t,e={})=>{if(typeof t!="string"&&!Array.isArray(t)&&typeof t!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");let r=e.cwd?chunkOC6EOVBX_cjs.b(e.cwd):process.cwd(),o=pathe.resolve(r),{root:i}=path.parse(o),s=chunkOC6EOVBX_cjs.b(e.stopAt??i),m=pathe.resolve(o,s),p=e.type??"file",d=function(a){return typeof t=="function"?[t(a)]:typeof t=="string"?[t]:Array.isArray(t)?t:[t]};for(;o&&o!==m&&o!==i;){for(let a of d(o)){if(a===D)return;if(a===void 0)continue;let y=pathe.isAbsolute(a)?a:pathe.resolve(o,a);try{let n=fs.statSync(y);if(p==="file"&&n.isFile()||p==="directory"&&n.isDirectory())return y}catch{}}o=pathe.dirname(o);}},$e=Ve;async function Ne(t,e=0){chunkOC6EOVBX_cjs.a(t),t=chunkOC6EOVBX_cjs.b(t);try{return await promises.access(t,e),!0}catch{return !1}}var h=Ne;function Ke(t,e=0){chunkOC6EOVBX_cjs.a(t),t=chunkOC6EOVBX_cjs.b(t);try{return fs.accessSync(t,e),!0}catch{return !1}}var O=Ke;var Xe={brotli:zlib.brotliDecompress,gzip:zlib.unzip,none:(t,e)=>{e(null,t);}},He=async(t,e)=>{if(chunkOC6EOVBX_cjs.a(t),t=chunkOC6EOVBX_cjs.b(t),!await h(t))throw new chunkBZXQ545V_cjs.e(`unable to read the non-accessible file: ${t}`);if(!await h(t,4))throw new Error(`Unable to read the non-readable file: ${t}`);let{buffer:r,compression:o,encoding:i,flag:s}=e??{};return await promises.readFile(t,s?{encoding:i,flag:s}:{encoding:i}).then(async m=>await new Promise((p,d)=>{Xe[o??"none"](m,(a,y)=>{a?d(a):p(r?y:y.toString());});})).catch(m=>{throw m})},U=He;var Ze={brotli:zlib.brotliDecompressSync,gzip:zlib.unzipSync,none:t=>t},tr=(t,e)=>{if(chunkOC6EOVBX_cjs.a(t),t=chunkOC6EOVBX_cjs.b(t),!O(t))throw new chunkBZXQ545V_cjs.e(`unable to read the non-accessible file: ${t}`);if(!O(t,4))throw new chunkBZXQ545V_cjs.e(`invalid access to read file at: ${t}`);let{buffer:r,compression:o,encoding:i,flag:s}=e??{},m=fs.readFileSync(t,s?{encoding:i,flag:s}:{encoding:i}),p=Ze[o??"none"](m);return r?p:p.toString()},I=tr;async function er(t,e,r){typeof e=="object"&&(r=e,e=void 0);let o=await U(t,{buffer:!0,encoding:void 0}),i=new TextDecoder().decode(o),{beforeParse:s,color:m}=r??{};return typeof s=="function"&&(i=s(i)),chunkOC6EOVBX_cjs.c(i,e,chunkOC6EOVBX_cjs.b(t),{color:m})}var rr=er;function or(t,e,r){typeof e=="object"&&(r=e,e=void 0);let o=I(t,{buffer:!0,encoding:void 0}),i=new TextDecoder().decode(o),{beforeParse:s,color:m}=r??{};return typeof s=="function"&&(i=s(i)),chunkOC6EOVBX_cjs.c(i,e,chunkOC6EOVBX_cjs.b(t),{color:m})}var ir=or;async function nr(t,e,r){let{buffer:o,compression:i,encoding:s="utf8",flag:m,...p}=r??{},d=await U(t,{buffer:o,compression:i,encoding:s,flag:m});return typeof e=="function"?yaml.parse(d,e,p):yaml.parse(d,p)}var sr=nr;function ar(t,e,r){let{buffer:o,compression:i,encoding:s="utf8",flag:m,...p}=r??{},d=I(t,{buffer:o,compression:i,encoding:s,flag:m});return typeof e=="function"?yaml.parse(d,e,p):yaml.parse(d,p)}var fr=ar;var yr=async(t,e)=>{if(chunkOC6EOVBX_cjs.a(t),!fs.existsSync(t)){await promises.mkdir(t,{recursive:!0});return}for await(let r of await promises.readdir(t))await promises.rm(pathe.join(chunkOC6EOVBX_cjs.b(t),r),{...e,force:!0,recursive:!0});},ur=yr;var Rr=(t,e)=>{if(chunkOC6EOVBX_cjs.a(t),!fs.existsSync(t)){fs.mkdirSync(t,{recursive:!0});return}for(let r of fs.readdirSync(t))fs.rmSync(pathe.join(chunkOC6EOVBX_cjs.b(t),r),{...e,force:!0,recursive:!0});},xr=Rr;var br=async(t,e={})=>{chunkOC6EOVBX_cjs.a(t);try{await promises.unlink(t);}catch{}try{await promises.rm(t,{force:!0,maxRetries:e?.maxRetries,recursive:!0,retryDelay:e?.retryDelay});}catch{}},Er=br;var Dr=(t,e={})=>{chunkOC6EOVBX_cjs.a(t);try{fs.unlinkSync(t);}catch{}try{fs.rmSync(t,{force:!0,maxRetries:e?.maxRetries,recursive:!0,retryDelay:e?.retryDelay});}catch{}},Lr=Dr;var vr=new TextEncoder,Ur=t=>{if(t instanceof Uint8Array)return t;if(typeof t=="string")return vr.encode(t);if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t)){let e=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);return new Uint8Array(e)}throw new TypeError("Invalid contents type. Expected string or ArrayBuffer.")},M=Ur;var $r=async(t,e,r)=>{r={encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...r},chunkOC6EOVBX_cjs.a(t),chunkOC6EOVBX_cjs.d(e),t=chunkOC6EOVBX_cjs.b(t);try{let o=await h(t,0);if(!o&&r.recursive){let m=pathe.dirname(t);await h(m,0)||await promises.mkdir(m,{recursive:!0});}let i;await promises.writeFile(`${t}.tmp`,M(e),{encoding:r.encoding,flag:r.flag}),o&&!r.overwrite&&(i=await promises.stat(t),r.chown===void 0&&(r.chown={gid:i.gid,uid:i.uid}),await promises.rename(t,`${t}.bak`));let s=`${t}.tmp`;if(r.chown)try{await promises.chown(s,r.chown.uid,r.chown.gid);}catch{}await promises.chmod(s,i&&!r.mode?i.mode:r.mode??438),await promises.rename(s,t);}catch(o){throw new Error(`Failed to write file at: ${t} - ${o.message}`,{cause:o})}finally{await h(`${t}.tmp`)&&await promises.unlink(`${t}.tmp`);}},A=$r;var Xr=(t,e,r)=>{r={encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...r},chunkOC6EOVBX_cjs.a(t),chunkOC6EOVBX_cjs.d(e),t=chunkOC6EOVBX_cjs.b(t);try{let o=O(t,0);if(!o&&r.recursive){let m=pathe.dirname(t);O(m,0)||fs.mkdirSync(m,{recursive:!0});}let i;fs.writeFileSync(`${t}.tmp`,M(e),{encoding:r.encoding,flag:r.flag}),o&&!r.overwrite&&(i=fs.statSync(t),r.chown===void 0&&(r.chown={gid:i.gid,uid:i.uid}),fs.renameSync(t,`${t}.bak`));let s=`${t}.tmp`;if(r.chown)try{fs.chownSync(s,r.chown.uid,r.chown.gid);}catch{}fs.chmodSync(s,i&&!r.mode?i.mode:r.mode??438),fs.renameSync(s,t);}catch(o){throw new Error(`Failed to write file at: ${t} - ${o.message}`,{cause:o})}finally{O(`${t}.tmp`)&&fs.unlinkSync(`${t}.tmp`);}},J=Xr;var Hr=/^(?:( )+|\t+)/,Y="space",dt="tab";function lt(t,e){let r=new Map,o=0,i,s;for(let m of t.split(/\n/g)){if(!m)continue;let p,d,a,y,n,u=m.match(Hr);if(u===null)o=0,i="";else {if(p=u[0].length,d=u[1]?Y:dt,e&&d===Y&&p===1)continue;d!==i&&(o=0),i=d,a=1,y=0;let _=p-o;if(o=p,_===0)a=0,y=1;else {let gt=_>0?_:-_;s=Gr(d,gt);}n=r.get(s),n=n===void 0?[1,0]:[n[0]+a,n[1]+y],r.set(s,n);}}return r}function Gr(t,e){return (t===Y?"s":"t")+String(e)}function qr(t){let r=t[0]==="s"?Y:dt,o=Number(t.slice(1));return {type:r,amount:o}}function Qr(t){let e,r=0,o=0;for(let[i,[s,m]]of t)(s>r||s===r&&m>o)&&(r=s,o=m,e=i);return e}function Zr(t,e){return (t===Y?" ":" ").repeat(e)}function W(t){if(typeof t!="string")throw new TypeError("Expected a string");let e=lt(t,!0);e.size===0&&(e=lt(t,!1));let r=Qr(e),o,i=0,s="";return r!==void 0&&({type:o,amount:i}=qr(r),s=Zr(o,i)),{amount:i,type:o,indent:s}}var eo=async(t,e,r={})=>{let{detectIndent:o,indent:i,replacer:s,stringify:m=JSON.stringify,...p}={indent:" ",...r},d=i,a=`
|
|
17
|
+
`;if(await h(t,4))try{let n=await promises.readFile(t,"utf8");if(o){let{indent:u}=W(n);d=u;}a=n.endsWith(`
|
|
18
18
|
`)?`
|
|
19
|
-
`:"";}catch(
|
|
20
|
-
`;if(
|
|
19
|
+
`:"";}catch(n){if(n.code!=="ENOENT")throw n}let y=m(e,s,d);await A(t,`${y}${a}`,p);},ro=eo;var io=(t,e,r={})=>{let{detectIndent:o,indent:i,replacer:s,stringify:m=JSON.stringify,...p}={indent:" ",...r},d=i,a=`
|
|
20
|
+
`;if(O(t,4))try{let n=fs.readFileSync(t,"utf8");if(o){let{indent:u}=W(n);d=u;}a=n.endsWith(`
|
|
21
21
|
`)?`
|
|
22
|
-
`:"";}catch(
|
|
22
|
+
`:"";}catch(n){if(n.code!=="ENOENT")throw n}let y=m(e,s,d);J(t,`${y}${a}`,p);},no=io;async function so(t,e,r,o){let i=typeof r=="function"||Array.isArray(r)?yaml.stringify(e,r,o):yaml.stringify(e,r);await A(t,i);}var ao=so;function fo(t,e,r,o){let i=typeof r=="function"||Array.isArray(r)?yaml.stringify(e,r,o):yaml.stringify(e,r);J(t,i);}var co=fo;
|
|
23
23
|
|
|
24
|
-
exports.CRLF =
|
|
25
|
-
exports.EOL =
|
|
26
|
-
exports.FIND_UP_STOP =
|
|
27
|
-
exports.F_OK =
|
|
28
|
-
exports.LF =
|
|
29
|
-
exports.R_OK =
|
|
30
|
-
exports.W_OK =
|
|
31
|
-
exports.X_OK =
|
|
32
|
-
exports.collect =
|
|
33
|
-
exports.collectSync =
|
|
34
|
-
exports.detect =
|
|
35
|
-
exports.emptyDir =
|
|
36
|
-
exports.emptyDirSync =
|
|
37
|
-
exports.ensureDir =
|
|
38
|
-
exports.ensureDirSync =
|
|
39
|
-
exports.ensureFile =
|
|
40
|
-
exports.ensureFileSync =
|
|
41
|
-
exports.ensureLink =
|
|
42
|
-
exports.ensureLinkSync =
|
|
43
|
-
exports.
|
|
44
|
-
exports.
|
|
45
|
-
exports.
|
|
46
|
-
exports.
|
|
47
|
-
exports.
|
|
48
|
-
exports.
|
|
49
|
-
exports.
|
|
50
|
-
exports.
|
|
51
|
-
exports.
|
|
52
|
-
exports.
|
|
53
|
-
exports.
|
|
54
|
-
exports.
|
|
55
|
-
exports.
|
|
56
|
-
exports.
|
|
57
|
-
exports.
|
|
58
|
-
exports.
|
|
59
|
-
exports.
|
|
60
|
-
exports.
|
|
61
|
-
exports.
|
|
62
|
-
exports.
|
|
63
|
-
exports.
|
|
24
|
+
exports.CRLF = K;
|
|
25
|
+
exports.EOL = ne;
|
|
26
|
+
exports.FIND_UP_STOP = D;
|
|
27
|
+
exports.F_OK = R;
|
|
28
|
+
exports.LF = G;
|
|
29
|
+
exports.R_OK = T;
|
|
30
|
+
exports.W_OK = wt;
|
|
31
|
+
exports.X_OK = St;
|
|
32
|
+
exports.collect = he;
|
|
33
|
+
exports.collectSync = Te;
|
|
34
|
+
exports.detect = se;
|
|
35
|
+
exports.emptyDir = ur;
|
|
36
|
+
exports.emptyDirSync = xr;
|
|
37
|
+
exports.ensureDir = x;
|
|
38
|
+
exports.ensureDirSync = F;
|
|
39
|
+
exports.ensureFile = kt;
|
|
40
|
+
exports.ensureFileSync = Ut;
|
|
41
|
+
exports.ensureLink = Wt;
|
|
42
|
+
exports.ensureLinkSync = Ct;
|
|
43
|
+
exports.ensureSymlink = Gt;
|
|
44
|
+
exports.ensureSymlinkSync = oe;
|
|
45
|
+
exports.findUp = Ae;
|
|
46
|
+
exports.findUpSync = $e;
|
|
47
|
+
exports.format = ae;
|
|
48
|
+
exports.isAccessible = h;
|
|
49
|
+
exports.isAccessibleSync = O;
|
|
50
|
+
exports.readFile = U;
|
|
51
|
+
exports.readFileSync = I;
|
|
52
|
+
exports.readJson = rr;
|
|
53
|
+
exports.readJsonSync = ir;
|
|
54
|
+
exports.readYaml = sr;
|
|
55
|
+
exports.readYamlSync = fr;
|
|
56
|
+
exports.remove = Er;
|
|
57
|
+
exports.removeSync = Lr;
|
|
58
|
+
exports.walk = L;
|
|
59
|
+
exports.walkSync = v;
|
|
60
|
+
exports.writeFile = A;
|
|
61
|
+
exports.writeFileSync = J;
|
|
62
|
+
exports.writeJson = ro;
|
|
63
|
+
exports.writeJsonSync = no;
|
|
64
|
+
exports.writeYaml = ao;
|
|
65
|
+
exports.writeYamlSync = co;
|
|
64
66
|
//# sourceMappingURL=out.js.map
|
|
65
67
|
//# sourceMappingURL=index.cjs.map
|