@jadeja/ts 1.0.0-alpha.5 → 1.0.0-alpha.7
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 +13 -1
- package/CONTRIBUTING.md +2 -2
- package/README.md +4 -4
- package/dist/configs/oxfmt/base.d.ts +0 -1
- package/dist/configs/oxfmt/lib.d.ts +0 -1
- package/dist/configs/oxfmt/next.d.ts +6 -6
- package/dist/configs/oxfmt/next.js +5 -5
- package/dist/configs/oxfmt/next.js.map +1 -1
- package/dist/configs/oxlint/base.d.ts +3 -1
- package/dist/configs/oxlint/base.js +1 -0
- package/dist/configs/oxlint/base.js.map +1 -1
- package/dist/configs/oxlint/lib.d.ts +3 -1
- package/dist/configs/oxlint/next.d.ts +75 -62
- package/dist/configs/oxlint/next.js +11 -14
- package/dist/configs/oxlint/next.js.map +1 -1
- package/dist/configs/ts/lib.json +0 -2
- package/dist/configs/vite/base.d.ts +0 -1
- package/dist/configs/vite/lib.d.ts +4 -5
- package/dist/configs/vite/lib.js +25 -31
- package/dist/configs/vite/lib.js.map +1 -1
- package/dist/lib/debounce.d.ts +0 -1
- package/dist/lib/logger.d.ts +26 -27
- package/dist/lib/logger.js +4 -6
- package/dist/lib/logger.js.map +1 -1
- package/dist/lib/operations.d.ts +10 -11
- package/dist/lib/operations.js +17 -14
- package/dist/lib/operations.js.map +1 -1
- package/dist/lib/singleton.d.ts +0 -1
- package/dist/lib/types.d.ts +11 -11
- package/dist/lib/types.js.map +1 -1
- package/dist/lib/utils.d.ts +1 -2
- package/dist/lib/utils.js +6 -6
- package/dist/lib/utils.js.map +1 -1
- package/dist/plugins/vite/copy-folders.d.ts +0 -1
- package/dist/plugins/vite/copy-folders.js.map +1 -1
- package/dist/plugins/vite/remove-folders.d.ts +0 -1
- package/dist/types/data.d.ts +29 -0
- package/dist/types/utils.d.ts +13 -0
- package/dist/types/utils.js +0 -0
- package/package.json +16 -9
- package/dist/configs/oxfmt/base.d.ts.map +0 -1
- package/dist/configs/oxfmt/lib.d.ts.map +0 -1
- package/dist/configs/oxfmt/next.d.ts.map +0 -1
- package/dist/configs/oxlint/base.d.ts.map +0 -1
- package/dist/configs/oxlint/lib.d.ts.map +0 -1
- package/dist/configs/oxlint/next.d.ts.map +0 -1
- package/dist/configs/vite/base.d.ts.map +0 -1
- package/dist/configs/vite/lib.d.ts.map +0 -1
- package/dist/lib/debounce.d.ts.map +0 -1
- package/dist/lib/logger.d.ts.map +0 -1
- package/dist/lib/operations.d.ts.map +0 -1
- package/dist/lib/singleton.d.ts.map +0 -1
- package/dist/lib/types.d.ts.map +0 -1
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/plugins/vite/copy-folders.d.ts.map +0 -1
- package/dist/plugins/vite/remove-folders.d.ts.map +0 -1
- package/dist/types/util.d.ts +0 -33
- package/dist/types/util.d.ts.map +0 -1
- /package/dist/types/{util.js → data.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.0-alpha.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fix: generated `.d.ts` files location, other fixes
|
|
8
|
+
|
|
9
|
+
## 1.0.0-alpha.6
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- refactor: improve full project
|
|
14
|
+
|
|
3
15
|
## 1.0.0-alpha.5
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -48,7 +60,7 @@
|
|
|
48
60
|
|
|
49
61
|
---
|
|
50
62
|
|
|
51
|
-
|
|
63
|
+
**`@jadeja/ts`**
|
|
52
64
|
|
|
53
65
|
All notable changes to this project is documented in this file.
|
|
54
66
|
|
package/CONTRIBUTING.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Contributing
|
|
2
2
|
|
|
3
|
-
Thanks for your interest in contributing to
|
|
3
|
+
Thanks for your interest in contributing to `@jadeja/ts`. Contributions are welcome! 🤗
|
|
4
4
|
|
|
5
5
|
We appreciate bug reports, feature requests, code improvements, and any other forms of contribution.
|
|
6
6
|
|
|
@@ -100,4 +100,4 @@ subject to the terms outlined in the project's
|
|
|
100
100
|
|
|
101
101
|
Thank you for your time 🙂
|
|
102
102
|
|
|
103
|
-
_Last updated on
|
|
103
|
+
_Last updated on June 13, 2026_
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @jadeja/ts
|
|
2
2
|
|
|
3
3
|
_an opinionated TypeScript toolkit_
|
|
4
4
|
|
|
@@ -8,7 +8,7 @@ _an opinionated TypeScript toolkit_
|
|
|
8
8
|
|
|
9
9
|
## Documentation
|
|
10
10
|
|
|
11
|
-
Documentation will be added in future releases.
|
|
11
|
+
ℹ️ Documentation will be added in future releases.
|
|
12
12
|
|
|
13
13
|
### See In Action
|
|
14
14
|
|
|
@@ -20,13 +20,13 @@ Documentation will be added in future releases.
|
|
|
20
20
|
## Community
|
|
21
21
|
|
|
22
22
|
For help, discussion, or any other conversation, see
|
|
23
|
-
[Discuss
|
|
23
|
+
[Discuss `@jadeja/ts` on GitHub](https://github.com/JadejaHQ/ts/discussions)
|
|
24
24
|
|
|
25
25
|
<br />
|
|
26
26
|
|
|
27
27
|
## Contributing
|
|
28
28
|
|
|
29
|
-
If you're interested in contributing to
|
|
29
|
+
If you're interested in contributing to `@jadeja/ts`, please read our
|
|
30
30
|
[Contributing Guidelines](https://github.com/JadejaHQ/ts/blob/main/CONTRIBUTING.md) **before
|
|
31
31
|
submitting a pull request**.
|
|
32
32
|
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
declare const oxfmtNext: {
|
|
2
|
-
bracketSameLine: false;
|
|
3
|
-
embeddedLanguageFormatting: "auto";
|
|
4
|
-
htmlWhitespaceSensitivity: "css";
|
|
5
|
-
jsxSingleQuote: false;
|
|
6
|
-
singleAttributePerLine: false;
|
|
7
2
|
arrowParens: "always";
|
|
8
3
|
bracketSpacing: true;
|
|
9
4
|
endOfLine: "lf";
|
|
@@ -42,6 +37,11 @@ declare const oxfmtNext: {
|
|
|
42
37
|
tabWidth: number;
|
|
43
38
|
trailingComma: "all";
|
|
44
39
|
useTabs: false;
|
|
40
|
+
} & {
|
|
41
|
+
bracketSameLine: false;
|
|
42
|
+
embeddedLanguageFormatting: "auto";
|
|
43
|
+
htmlWhitespaceSensitivity: "css";
|
|
44
|
+
jsxSingleQuote: false;
|
|
45
|
+
singleAttributePerLine: false;
|
|
45
46
|
};
|
|
46
47
|
export default oxfmtNext;
|
|
47
|
-
//# sourceMappingURL=next.d.ts.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import e from "
|
|
1
|
+
import { deepMergeObj as e } from "../../lib/operations.js";
|
|
2
|
+
import t from "./base.js";
|
|
2
3
|
//#region src/configs/oxfmt/next.ts
|
|
3
|
-
var
|
|
4
|
-
...e,
|
|
4
|
+
var n = e(t, {
|
|
5
5
|
bracketSameLine: !1,
|
|
6
6
|
embeddedLanguageFormatting: "auto",
|
|
7
7
|
htmlWhitespaceSensitivity: "css",
|
|
8
8
|
jsxSingleQuote: !1,
|
|
9
9
|
singleAttributePerLine: !1
|
|
10
|
-
};
|
|
10
|
+
});
|
|
11
11
|
//#endregion
|
|
12
|
-
export {
|
|
12
|
+
export { n as default };
|
|
13
13
|
|
|
14
14
|
//# sourceMappingURL=next.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"next.js","names":[],"sources":["../../../src/configs/oxfmt/next.ts"],"sourcesContent":["import oxfmtBase from \"./base.ts\";\n\nimport type { OxfmtConfig } from \"oxfmt\";\n\n/* ============================================================================================= */\n\nconst oxfmtNext = {\n
|
|
1
|
+
{"version":3,"file":"next.js","names":[],"sources":["../../../src/configs/oxfmt/next.ts"],"sourcesContent":["import { deepMergeObj } from \"../../lib/operations.ts\";\n\nimport oxfmtBase from \"./base.ts\";\n\nimport type { OxfmtConfig } from \"oxfmt\";\n\n/* ============================================================================================= */\n\nconst oxfmtNext = deepMergeObj(oxfmtBase, {\n bracketSameLine: false,\n embeddedLanguageFormatting: \"auto\",\n htmlWhitespaceSensitivity: \"css\",\n jsxSingleQuote: false,\n singleAttributePerLine: false,\n} satisfies OxfmtConfig);\n\n/* ============================================================================================= */\n\nexport default oxfmtNext;\n"],"mappings":";;;AAQA,IAAM,IAAY,EAAa,GAAW;CACxC,iBAAiB;CACjB,4BAA4B;CAC5B,2BAA2B;CAC3B,gBAAgB;CAChB,wBAAwB;AAC1B,CAAuB"}
|
|
@@ -101,10 +101,12 @@ declare const oxlintBase: {
|
|
|
101
101
|
"typescript/prefer-readonly-parameter-types": "off";
|
|
102
102
|
"typescript/restrict-template-expressions": "off";
|
|
103
103
|
"typescript/strict-boolean-expressions": "off";
|
|
104
|
+
"unicorn/catch-error-name": ["error", {
|
|
105
|
+
ignore: string[];
|
|
106
|
+
}];
|
|
104
107
|
"unicorn/no-null": "off";
|
|
105
108
|
"unicorn/no-lonely-if": "off";
|
|
106
109
|
"unicorn/switch-case-braces": "off";
|
|
107
110
|
};
|
|
108
111
|
};
|
|
109
112
|
export default oxlintBase;
|
|
110
|
-
//# sourceMappingURL=base.d.ts.map
|
|
@@ -112,6 +112,7 @@ var e = {
|
|
|
112
112
|
"typescript/prefer-readonly-parameter-types": "off",
|
|
113
113
|
"typescript/restrict-template-expressions": "off",
|
|
114
114
|
"typescript/strict-boolean-expressions": "off",
|
|
115
|
+
"unicorn/catch-error-name": ["error", { ignore: ["err"] }],
|
|
115
116
|
"unicorn/no-null": "off",
|
|
116
117
|
"unicorn/no-lonely-if": "off",
|
|
117
118
|
"unicorn/switch-case-braces": "off"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.js","names":[],"sources":["../../../src/configs/oxlint/base.ts"],"sourcesContent":["import type { OxlintConfig } from \"oxlint\";\n\n/* ============================================================================================= */\n\nconst oxlintBase = {\n categories: {\n correctness: \"error\",\n nursery: \"warn\",\n pedantic: \"error\",\n perf: \"error\",\n restriction: \"error\",\n style: \"error\",\n suspicious: \"error\",\n },\n env: {\n builtin: true,\n node: true,\n },\n options: {\n denyWarnings: false,\n reportUnusedDisableDirectives: \"error\",\n respectEslintDisableDirectives: false,\n typeAware: true,\n typeCheck: false,\n },\n plugins: [\"eslint\", \"import\", \"jsdoc\", \"node\", \"oxc\", \"promise\", \"typescript\", \"unicorn\"],\n rules: {\n \"eslint/arrow-body-style\": [\"error\", \"always\", { requireReturnForObjectLiteral: false }],\n \"eslint/capitalized-comments\": [\n \"error\",\n \"never\",\n {\n block: {\n ignorePattern: \"/\\\\/\\\\*\\\\s*=+\\\\s*[\\\\r\\\\n]+(?:[\\\\s\\\\S]*?)[\\\\r\\\\n]+\\\\s*=+\\\\s*\\\\*\\\\//m\",\n },\n ignorePattern: \"^([A-Z]{2,}|[A-Z][A-Z0-9_-]*)(\\\\b|:)\",\n },\n ],\n \"eslint/class-methods-use-this\": \"off\",\n \"eslint/complexity\": [\"error\", { max: 30 }],\n \"eslint/id-length\": [\n \"error\",\n {\n checkGeneric: false,\n exceptions: [\"a\", \"b\", \"i\", \"j\", \"K\", \"T\", \"U\", \"x\"],\n },\n ],\n \"eslint/init-declarations\": \"off\",\n \"eslint/max-lines-per-function\": [\n \"error\",\n { max: 120, skipBlankLines: true, skipComments: true },\n ],\n \"eslint/max-params\": [\"error\", { max: 4 }],\n \"eslint/max-statements\": [\"error\", { max: 40 }],\n \"eslint/no-await-in-loop\": \"off\",\n \"eslint/no-continue\": \"off\",\n \"eslint/no-duplicate-imports\": [\"error\", { allowSeparateTypeImports: true }],\n \"eslint/no-magic-numbers\": \"off\",\n \"eslint/no-plusplus\": \"off\",\n \"eslint/no-ternary\": \"off\",\n \"eslint/no-undefined\": \"off\",\n \"eslint/no-underscore-dangle\": [\"error\", { allow: [] }],\n \"eslint/no-use-before-define\": \"off\",\n \"eslint/no-warning-comments\": \"off\",\n \"eslint/require-unicode-regexp\": \"off\",\n \"eslint/sort-imports\": \"off\",\n \"eslint/sort-keys\": \"off\",\n \"import/exports-last\": \"off\",\n \"import/group-exports\": \"off\",\n \"import/max-dependencies\": [\"error\", { max: 30 }],\n \"import/no-default-export\": \"off\",\n \"import/no-named-default\": \"off\",\n \"import/no-named-export\": \"off\",\n \"import/no-nodejs-modules\": \"off\",\n \"import/prefer-default-export\": \"off\",\n \"jsdoc/require-param-type\": \"off\",\n \"jsdoc/require-returns\": \"off\",\n \"jsdoc/require-returns-type\": \"off\",\n \"no-unused-vars\": [\n \"error\",\n {\n args: \"all\",\n argsIgnorePattern: \"^_\",\n caughtErrors: \"all\",\n caughtErrorsIgnorePattern: \"^_\",\n destructuredArrayIgnorePattern: \"^_\",\n },\n ],\n \"oxc/no-async-await\": \"off\",\n \"oxc/no-optional-chaining\": \"off\",\n \"oxc/no-rest-spread-properties\": \"off\",\n \"promise/avoid-new\": \"off\",\n \"typescript/explicit-function-return-type\": \"off\",\n \"typescript/explicit-module-boundary-types\": \"off\",\n \"typescript/no-inferrable-types\": \"off\",\n \"typescript/no-unnecessary-condition\": \"off\",\n \"typescript/no-unnecessary-type-parameters\": \"off\",\n \"typescript/no-unsafe-type-assertion\": \"off\",\n \"typescript/no-useless-default-assignment\": \"off\",\n \"typescript/prefer-readonly-parameter-types\": \"off\",\n \"typescript/restrict-template-expressions\": \"off\",\n \"typescript/strict-boolean-expressions\": \"off\",\n \"unicorn/no-null\": \"off\",\n \"unicorn/no-lonely-if\": \"off\",\n \"unicorn/switch-case-braces\": \"off\",\n },\n} satisfies OxlintConfig;\n\n/* ============================================================================================= */\n\nexport default oxlintBase;\n"],"mappings":";AAIA,IAAM,IAAa;CACjB,YAAY;EACV,aAAa;EACb,SAAS;EACT,UAAU;EACV,MAAM;EACN,aAAa;EACb,OAAO;EACP,YAAY;CACd;CACA,KAAK;EACH,SAAS;EACT,MAAM;CACR;CACA,SAAS;EACP,cAAc;EACd,+BAA+B;EAC/B,gCAAgC;EAChC,WAAW;EACX,WAAW;CACb;CACA,SAAS;EAAC;EAAU;EAAU;EAAS;EAAQ;EAAO;EAAW;EAAc;CAAS;CACxF,OAAO;EACL,2BAA2B;GAAC;GAAS;GAAU,EAAE,+BAA+B,GAAM;EAAC;EACvF,+BAA+B;GAC7B;GACA;GACA;IACE,OAAO,EACL,eAAe,sEACjB;IACA,eAAe;GACjB;EACF;EACA,iCAAiC;EACjC,qBAAqB,CAAC,SAAS,EAAE,KAAK,GAAG,CAAC;EAC1C,oBAAoB,CAClB,SACA;GACE,cAAc;GACd,YAAY;IAAC;IAAK;IAAK;IAAK;IAAK;IAAK;IAAK;IAAK;GAAG;EACrD,CACF;EACA,4BAA4B;EAC5B,iCAAiC,CAC/B,SACA;GAAE,KAAK;GAAK,gBAAgB;GAAM,cAAc;EAAK,CACvD;EACA,qBAAqB,CAAC,SAAS,EAAE,KAAK,EAAE,CAAC;EACzC,yBAAyB,CAAC,SAAS,EAAE,KAAK,GAAG,CAAC;EAC9C,2BAA2B;EAC3B,sBAAsB;EACtB,+BAA+B,CAAC,SAAS,EAAE,0BAA0B,GAAK,CAAC;EAC3E,2BAA2B;EAC3B,sBAAsB;EACtB,qBAAqB;EACrB,uBAAuB;EACvB,+BAA+B,CAAC,SAAS,EAAE,OAAO,CAAC,EAAE,CAAC;EACtD,+BAA+B;EAC/B,8BAA8B;EAC9B,iCAAiC;EACjC,uBAAuB;EACvB,oBAAoB;EACpB,uBAAuB;EACvB,wBAAwB;EACxB,2BAA2B,CAAC,SAAS,EAAE,KAAK,GAAG,CAAC;EAChD,4BAA4B;EAC5B,2BAA2B;EAC3B,0BAA0B;EAC1B,4BAA4B;EAC5B,gCAAgC;EAChC,4BAA4B;EAC5B,yBAAyB;EACzB,8BAA8B;EAC9B,kBAAkB,CAChB,SACA;GACE,MAAM;GACN,mBAAmB;GACnB,cAAc;GACd,2BAA2B;GAC3B,gCAAgC;EAClC,CACF;EACA,sBAAsB;EACtB,4BAA4B;EAC5B,iCAAiC;EACjC,qBAAqB;EACrB,4CAA4C;EAC5C,6CAA6C;EAC7C,kCAAkC;EAClC,uCAAuC;EACvC,6CAA6C;EAC7C,uCAAuC;EACvC,4CAA4C;EAC5C,8CAA8C;EAC9C,4CAA4C;EAC5C,yCAAyC;EACzC,mBAAmB;EACnB,wBAAwB;EACxB,8BAA8B;CAChC;AACF"}
|
|
1
|
+
{"version":3,"file":"base.js","names":[],"sources":["../../../src/configs/oxlint/base.ts"],"sourcesContent":["import type { OxlintConfig } from \"oxlint\";\n\n/* ============================================================================================= */\n\nconst oxlintBase = {\n categories: {\n correctness: \"error\",\n nursery: \"warn\",\n pedantic: \"error\",\n perf: \"error\",\n restriction: \"error\",\n style: \"error\",\n suspicious: \"error\",\n },\n env: {\n builtin: true,\n node: true,\n },\n options: {\n denyWarnings: false,\n reportUnusedDisableDirectives: \"error\",\n respectEslintDisableDirectives: false,\n typeAware: true,\n typeCheck: false,\n },\n plugins: [\"eslint\", \"import\", \"jsdoc\", \"node\", \"oxc\", \"promise\", \"typescript\", \"unicorn\"],\n rules: {\n \"eslint/arrow-body-style\": [\"error\", \"always\", { requireReturnForObjectLiteral: false }],\n \"eslint/capitalized-comments\": [\n \"error\",\n \"never\",\n {\n block: {\n ignorePattern: \"/\\\\/\\\\*\\\\s*=+\\\\s*[\\\\r\\\\n]+(?:[\\\\s\\\\S]*?)[\\\\r\\\\n]+\\\\s*=+\\\\s*\\\\*\\\\//m\",\n },\n ignorePattern: \"^([A-Z]{2,}|[A-Z][A-Z0-9_-]*)(\\\\b|:)\",\n },\n ],\n \"eslint/class-methods-use-this\": \"off\",\n \"eslint/complexity\": [\"error\", { max: 30 }],\n \"eslint/id-length\": [\n \"error\",\n {\n checkGeneric: false,\n exceptions: [\"a\", \"b\", \"i\", \"j\", \"K\", \"T\", \"U\", \"x\"],\n },\n ],\n \"eslint/init-declarations\": \"off\",\n \"eslint/max-lines-per-function\": [\n \"error\",\n { max: 120, skipBlankLines: true, skipComments: true },\n ],\n \"eslint/max-params\": [\"error\", { max: 4 }],\n \"eslint/max-statements\": [\"error\", { max: 40 }],\n \"eslint/no-await-in-loop\": \"off\",\n \"eslint/no-continue\": \"off\",\n \"eslint/no-duplicate-imports\": [\"error\", { allowSeparateTypeImports: true }],\n \"eslint/no-magic-numbers\": \"off\",\n \"eslint/no-plusplus\": \"off\",\n \"eslint/no-ternary\": \"off\",\n \"eslint/no-undefined\": \"off\",\n \"eslint/no-underscore-dangle\": [\"error\", { allow: [] }],\n \"eslint/no-use-before-define\": \"off\",\n \"eslint/no-warning-comments\": \"off\",\n \"eslint/require-unicode-regexp\": \"off\",\n \"eslint/sort-imports\": \"off\",\n \"eslint/sort-keys\": \"off\",\n \"import/exports-last\": \"off\",\n \"import/group-exports\": \"off\",\n \"import/max-dependencies\": [\"error\", { max: 30 }],\n \"import/no-default-export\": \"off\",\n \"import/no-named-default\": \"off\",\n \"import/no-named-export\": \"off\",\n \"import/no-nodejs-modules\": \"off\",\n \"import/prefer-default-export\": \"off\",\n \"jsdoc/require-param-type\": \"off\",\n \"jsdoc/require-returns\": \"off\",\n \"jsdoc/require-returns-type\": \"off\",\n \"no-unused-vars\": [\n \"error\",\n {\n args: \"all\",\n argsIgnorePattern: \"^_\",\n caughtErrors: \"all\",\n caughtErrorsIgnorePattern: \"^_\",\n destructuredArrayIgnorePattern: \"^_\",\n },\n ],\n \"oxc/no-async-await\": \"off\",\n \"oxc/no-optional-chaining\": \"off\",\n \"oxc/no-rest-spread-properties\": \"off\",\n \"promise/avoid-new\": \"off\",\n \"typescript/explicit-function-return-type\": \"off\",\n \"typescript/explicit-module-boundary-types\": \"off\",\n \"typescript/no-inferrable-types\": \"off\",\n \"typescript/no-unnecessary-condition\": \"off\",\n \"typescript/no-unnecessary-type-parameters\": \"off\",\n \"typescript/no-unsafe-type-assertion\": \"off\",\n \"typescript/no-useless-default-assignment\": \"off\",\n \"typescript/prefer-readonly-parameter-types\": \"off\",\n \"typescript/restrict-template-expressions\": \"off\",\n \"typescript/strict-boolean-expressions\": \"off\",\n \"unicorn/catch-error-name\": [\"error\", { ignore: [\"err\"] }],\n \"unicorn/no-null\": \"off\",\n \"unicorn/no-lonely-if\": \"off\",\n \"unicorn/switch-case-braces\": \"off\",\n },\n} satisfies OxlintConfig;\n\n/* ============================================================================================= */\n\nexport default oxlintBase;\n"],"mappings":";AAIA,IAAM,IAAa;CACjB,YAAY;EACV,aAAa;EACb,SAAS;EACT,UAAU;EACV,MAAM;EACN,aAAa;EACb,OAAO;EACP,YAAY;CACd;CACA,KAAK;EACH,SAAS;EACT,MAAM;CACR;CACA,SAAS;EACP,cAAc;EACd,+BAA+B;EAC/B,gCAAgC;EAChC,WAAW;EACX,WAAW;CACb;CACA,SAAS;EAAC;EAAU;EAAU;EAAS;EAAQ;EAAO;EAAW;EAAc;CAAS;CACxF,OAAO;EACL,2BAA2B;GAAC;GAAS;GAAU,EAAE,+BAA+B,GAAM;EAAC;EACvF,+BAA+B;GAC7B;GACA;GACA;IACE,OAAO,EACL,eAAe,sEACjB;IACA,eAAe;GACjB;EACF;EACA,iCAAiC;EACjC,qBAAqB,CAAC,SAAS,EAAE,KAAK,GAAG,CAAC;EAC1C,oBAAoB,CAClB,SACA;GACE,cAAc;GACd,YAAY;IAAC;IAAK;IAAK;IAAK;IAAK;IAAK;IAAK;IAAK;GAAG;EACrD,CACF;EACA,4BAA4B;EAC5B,iCAAiC,CAC/B,SACA;GAAE,KAAK;GAAK,gBAAgB;GAAM,cAAc;EAAK,CACvD;EACA,qBAAqB,CAAC,SAAS,EAAE,KAAK,EAAE,CAAC;EACzC,yBAAyB,CAAC,SAAS,EAAE,KAAK,GAAG,CAAC;EAC9C,2BAA2B;EAC3B,sBAAsB;EACtB,+BAA+B,CAAC,SAAS,EAAE,0BAA0B,GAAK,CAAC;EAC3E,2BAA2B;EAC3B,sBAAsB;EACtB,qBAAqB;EACrB,uBAAuB;EACvB,+BAA+B,CAAC,SAAS,EAAE,OAAO,CAAC,EAAE,CAAC;EACtD,+BAA+B;EAC/B,8BAA8B;EAC9B,iCAAiC;EACjC,uBAAuB;EACvB,oBAAoB;EACpB,uBAAuB;EACvB,wBAAwB;EACxB,2BAA2B,CAAC,SAAS,EAAE,KAAK,GAAG,CAAC;EAChD,4BAA4B;EAC5B,2BAA2B;EAC3B,0BAA0B;EAC1B,4BAA4B;EAC5B,gCAAgC;EAChC,4BAA4B;EAC5B,yBAAyB;EACzB,8BAA8B;EAC9B,kBAAkB,CAChB,SACA;GACE,MAAM;GACN,mBAAmB;GACnB,cAAc;GACd,2BAA2B;GAC3B,gCAAgC;EAClC,CACF;EACA,sBAAsB;EACtB,4BAA4B;EAC5B,iCAAiC;EACjC,qBAAqB;EACrB,4CAA4C;EAC5C,6CAA6C;EAC7C,kCAAkC;EAClC,uCAAuC;EACvC,6CAA6C;EAC7C,uCAAuC;EACvC,4CAA4C;EAC5C,8CAA8C;EAC9C,4CAA4C;EAC5C,yCAAyC;EACzC,4BAA4B,CAAC,SAAS,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAC;EACzD,mBAAmB;EACnB,wBAAwB;EACxB,8BAA8B;CAChC;AACF"}
|
|
@@ -101,10 +101,12 @@ declare const oxlintLib: {
|
|
|
101
101
|
"typescript/prefer-readonly-parameter-types": "off";
|
|
102
102
|
"typescript/restrict-template-expressions": "off";
|
|
103
103
|
"typescript/strict-boolean-expressions": "off";
|
|
104
|
+
"unicorn/catch-error-name": ["error", {
|
|
105
|
+
ignore: string[];
|
|
106
|
+
}];
|
|
104
107
|
"unicorn/no-null": "off";
|
|
105
108
|
"unicorn/no-lonely-if": "off";
|
|
106
109
|
"unicorn/switch-case-braces": "off";
|
|
107
110
|
};
|
|
108
111
|
};
|
|
109
112
|
export default oxlintLib;
|
|
110
|
-
//# sourceMappingURL=lib.d.ts.map
|
|
@@ -1,56 +1,26 @@
|
|
|
1
1
|
declare const oxlintNext: {
|
|
2
|
+
categories: {
|
|
3
|
+
correctness: "error";
|
|
4
|
+
nursery: "warn";
|
|
5
|
+
pedantic: "error";
|
|
6
|
+
perf: "error";
|
|
7
|
+
restriction: "error";
|
|
8
|
+
style: "error";
|
|
9
|
+
suspicious: "error";
|
|
10
|
+
};
|
|
2
11
|
env: {
|
|
3
|
-
browser: true;
|
|
4
12
|
builtin: true;
|
|
5
13
|
node: true;
|
|
6
14
|
};
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
15
|
+
options: {
|
|
16
|
+
denyWarnings: false;
|
|
17
|
+
reportUnusedDisableDirectives: "error";
|
|
18
|
+
respectEslintDisableDirectives: false;
|
|
19
|
+
typeAware: true;
|
|
20
|
+
typeCheck: false;
|
|
21
|
+
};
|
|
22
|
+
plugins: ("jsdoc" | "node" | "eslint" | "unicorn" | "typescript" | "oxc" | "import" | "promise")[];
|
|
12
23
|
rules: {
|
|
13
|
-
"eslint/no-undefined": "off";
|
|
14
|
-
"import/no-unassigned-import": ["error", {
|
|
15
|
-
allow: string[];
|
|
16
|
-
}];
|
|
17
|
-
"react/forbid-component-props": ["error", {
|
|
18
|
-
forbid: string[];
|
|
19
|
-
}];
|
|
20
|
-
"react/jsx-filename-extension": ["error", {
|
|
21
|
-
extensions: string[];
|
|
22
|
-
}];
|
|
23
|
-
"react/jsx-pascal-case": ["error", {
|
|
24
|
-
allowAllCaps: boolean;
|
|
25
|
-
}];
|
|
26
|
-
"react/jsx-props-no-spreading": "off";
|
|
27
|
-
"react/jsx-max-depth": ["error", {
|
|
28
|
-
max: number;
|
|
29
|
-
}];
|
|
30
|
-
"react/no-multi-comp": ["error", {
|
|
31
|
-
ignoreStateless: boolean;
|
|
32
|
-
}];
|
|
33
|
-
"react/only-export-components": ["error", {
|
|
34
|
-
allowExportNames: string[];
|
|
35
|
-
}];
|
|
36
|
-
"react/react-in-jsx-scope": "off";
|
|
37
|
-
"react-hooks-js/error-boundaries": "error";
|
|
38
|
-
"react-hooks-js/config": "error";
|
|
39
|
-
"react-hooks-js/globals": "error";
|
|
40
|
-
"react-hooks-js/immutability": "error";
|
|
41
|
-
"react-hooks-js/incompatible-library": "error";
|
|
42
|
-
"react-hooks-js/preserve-manual-memoization": "error";
|
|
43
|
-
"react-hooks-js/purity": "error";
|
|
44
|
-
"react-hooks-js/refs": "error";
|
|
45
|
-
"react-hooks-js/set-state-in-effect": "error";
|
|
46
|
-
"react-hooks-js/set-state-in-render": "error";
|
|
47
|
-
"react-hooks-js/static-components": "error";
|
|
48
|
-
"react-hooks-js/unsupported-syntax": "error";
|
|
49
|
-
"react-hooks-js/use-memo": "error";
|
|
50
|
-
"react-perf/jsx-no-jsx-as-prop": "off";
|
|
51
|
-
"react-perf/jsx-no-new-array-as-prop": "off";
|
|
52
|
-
"react-perf/jsx-no-new-function-as-prop": "off";
|
|
53
|
-
"react-perf/jsx-no-new-object-as-prop": "off";
|
|
54
24
|
"eslint/arrow-body-style": ["error", string, {
|
|
55
25
|
requireReturnForObjectLiteral: boolean;
|
|
56
26
|
}];
|
|
@@ -88,6 +58,7 @@ declare const oxlintNext: {
|
|
|
88
58
|
"eslint/no-magic-numbers": "off";
|
|
89
59
|
"eslint/no-plusplus": "off";
|
|
90
60
|
"eslint/no-ternary": "off";
|
|
61
|
+
"eslint/no-undefined": "off";
|
|
91
62
|
"eslint/no-underscore-dangle": ["error", {
|
|
92
63
|
allow: never[];
|
|
93
64
|
}];
|
|
@@ -130,26 +101,68 @@ declare const oxlintNext: {
|
|
|
130
101
|
"typescript/prefer-readonly-parameter-types": "off";
|
|
131
102
|
"typescript/restrict-template-expressions": "off";
|
|
132
103
|
"typescript/strict-boolean-expressions": "off";
|
|
104
|
+
"unicorn/catch-error-name": ["error", {
|
|
105
|
+
ignore: string[];
|
|
106
|
+
}];
|
|
133
107
|
"unicorn/no-null": "off";
|
|
134
108
|
"unicorn/no-lonely-if": "off";
|
|
135
109
|
"unicorn/switch-case-braces": "off";
|
|
136
110
|
};
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
pedantic: "error";
|
|
141
|
-
perf: "error";
|
|
142
|
-
restriction: "error";
|
|
143
|
-
style: "error";
|
|
144
|
-
suspicious: "error";
|
|
111
|
+
} & {
|
|
112
|
+
env: {
|
|
113
|
+
browser: true;
|
|
145
114
|
};
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
115
|
+
jsPlugins: {
|
|
116
|
+
name: string;
|
|
117
|
+
specifier: string;
|
|
118
|
+
}[];
|
|
119
|
+
plugins: ("jsdoc" | "node" | "eslint" | "react" | "unicorn" | "typescript" | "oxc" | "import" | "jsx-a11y" | "nextjs" | "react-perf" | "promise")[];
|
|
120
|
+
rules: {
|
|
121
|
+
"eslint/id-length": ["error", {
|
|
122
|
+
checkGeneric: boolean;
|
|
123
|
+
exceptions: string[];
|
|
124
|
+
}];
|
|
125
|
+
"eslint/no-undefined": "off";
|
|
126
|
+
"import/no-unassigned-import": ["error", {
|
|
127
|
+
allow: string[];
|
|
128
|
+
}];
|
|
129
|
+
"react/forbid-component-props": ["error", {
|
|
130
|
+
forbid: string[];
|
|
131
|
+
}];
|
|
132
|
+
"react/jsx-filename-extension": ["error", {
|
|
133
|
+
extensions: string[];
|
|
134
|
+
}];
|
|
135
|
+
"react/jsx-pascal-case": ["error", {
|
|
136
|
+
allowAllCaps: boolean;
|
|
137
|
+
}];
|
|
138
|
+
"react/jsx-props-no-spreading": "off";
|
|
139
|
+
"react/jsx-max-depth": ["error", {
|
|
140
|
+
max: number;
|
|
141
|
+
}];
|
|
142
|
+
"react/no-multi-comp": ["error", {
|
|
143
|
+
ignoreStateless: boolean;
|
|
144
|
+
}];
|
|
145
|
+
"react/only-export-components": ["error", {
|
|
146
|
+
allowExportNames: string[];
|
|
147
|
+
}];
|
|
148
|
+
"react/react-in-jsx-scope": "off";
|
|
149
|
+
"react-hooks-js/error-boundaries": "error";
|
|
150
|
+
"react-hooks-js/config": "error";
|
|
151
|
+
"react-hooks-js/globals": "error";
|
|
152
|
+
"react-hooks-js/immutability": "error";
|
|
153
|
+
"react-hooks-js/incompatible-library": "error";
|
|
154
|
+
"react-hooks-js/preserve-manual-memoization": "error";
|
|
155
|
+
"react-hooks-js/purity": "error";
|
|
156
|
+
"react-hooks-js/refs": "error";
|
|
157
|
+
"react-hooks-js/set-state-in-effect": "error";
|
|
158
|
+
"react-hooks-js/set-state-in-render": "error";
|
|
159
|
+
"react-hooks-js/static-components": "error";
|
|
160
|
+
"react-hooks-js/unsupported-syntax": "error";
|
|
161
|
+
"react-hooks-js/use-memo": "error";
|
|
162
|
+
"react-perf/jsx-no-jsx-as-prop": "off";
|
|
163
|
+
"react-perf/jsx-no-new-array-as-prop": "off";
|
|
164
|
+
"react-perf/jsx-no-new-function-as-prop": "off";
|
|
165
|
+
"react-perf/jsx-no-new-object-as-prop": "off";
|
|
152
166
|
};
|
|
153
167
|
};
|
|
154
168
|
export default oxlintNext;
|
|
155
|
-
//# sourceMappingURL=next.d.ts.map
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import e from "
|
|
1
|
+
import { deepMergeObj as e } from "../../lib/operations.js";
|
|
2
|
+
import t from "./base.js";
|
|
2
3
|
//#region src/configs/oxlint/next.ts
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
...
|
|
4
|
+
var n = t.rules["eslint/id-length"];
|
|
5
|
+
n[1].exceptions = [
|
|
6
|
+
...n[1].exceptions,
|
|
6
7
|
"h",
|
|
7
8
|
"m",
|
|
8
9
|
"p",
|
|
@@ -10,25 +11,21 @@ t[1].exceptions = [
|
|
|
10
11
|
"y",
|
|
11
12
|
"z"
|
|
12
13
|
];
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
env: {
|
|
16
|
-
...e.env,
|
|
17
|
-
browser: !0
|
|
18
|
-
},
|
|
14
|
+
var r = e(t, {
|
|
15
|
+
env: { browser: !0 },
|
|
19
16
|
jsPlugins: [{
|
|
20
17
|
name: "react-hooks-js",
|
|
21
18
|
specifier: "eslint-plugin-react-hooks"
|
|
22
19
|
}],
|
|
23
20
|
plugins: [
|
|
24
|
-
...
|
|
21
|
+
...t.plugins,
|
|
25
22
|
"jsx-a11y",
|
|
26
23
|
"nextjs",
|
|
27
24
|
"react",
|
|
28
25
|
"react-perf"
|
|
29
26
|
],
|
|
30
27
|
rules: {
|
|
31
|
-
|
|
28
|
+
"eslint/id-length": n,
|
|
32
29
|
"eslint/no-undefined": "off",
|
|
33
30
|
"import/no-unassigned-import": ["error", { allow: ["**/*.css"] }],
|
|
34
31
|
"react/forbid-component-props": ["error", { forbid: ["style"] }],
|
|
@@ -63,8 +60,8 @@ var n = {
|
|
|
63
60
|
"react-perf/jsx-no-new-function-as-prop": "off",
|
|
64
61
|
"react-perf/jsx-no-new-object-as-prop": "off"
|
|
65
62
|
}
|
|
66
|
-
};
|
|
63
|
+
});
|
|
67
64
|
//#endregion
|
|
68
|
-
export {
|
|
65
|
+
export { r as default };
|
|
69
66
|
|
|
70
67
|
//# sourceMappingURL=next.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"next.js","names":[],"sources":["../../../src/configs/oxlint/next.ts"],"sourcesContent":["import oxlintBase from \"./base.ts\";\n\nimport type { OxlintConfig } from \"oxlint\";\n\n/* ============================================================================================= */\n\nconst eslintIdLength = oxlintBase.rules[\"eslint/id-length\"];\neslintIdLength[1].exceptions = [...eslintIdLength[1].exceptions, \"h\", \"m\", \"p\", \"w\", \"y\", \"z\"];\n\n/* ============================================================================================= */\n\nconst oxlintNext = {\n
|
|
1
|
+
{"version":3,"file":"next.js","names":[],"sources":["../../../src/configs/oxlint/next.ts"],"sourcesContent":["import { deepMergeObj } from \"../../lib/operations.ts\";\n\nimport oxlintBase from \"./base.ts\";\n\nimport type { OxlintConfig } from \"oxlint\";\n\n/* ============================================================================================= */\n\nconst eslintIdLength = oxlintBase.rules[\"eslint/id-length\"];\neslintIdLength[1].exceptions = [...eslintIdLength[1].exceptions, \"h\", \"m\", \"p\", \"w\", \"y\", \"z\"];\n\n/* ============================================================================================= */\n\nconst oxlintNext = deepMergeObj(oxlintBase, {\n env: {\n browser: true,\n },\n\n jsPlugins: [\n {\n name: \"react-hooks-js\",\n specifier: \"eslint-plugin-react-hooks\",\n },\n ],\n\n plugins: [...oxlintBase.plugins, \"jsx-a11y\", \"nextjs\", \"react\", \"react-perf\"],\n\n rules: {\n \"eslint/id-length\": eslintIdLength,\n \"eslint/no-undefined\": \"off\",\n \"import/no-unassigned-import\": [\"error\", { allow: [\"**/*.css\"] }],\n \"react/forbid-component-props\": [\"error\", { forbid: [\"style\"] }],\n \"react/jsx-filename-extension\": [\"error\", { extensions: [\"jsx\", \"tsx\"] }],\n \"react/jsx-pascal-case\": [\"error\", { allowAllCaps: true }],\n \"react/jsx-props-no-spreading\": \"off\",\n \"react/jsx-max-depth\": [\"error\", { max: 6 }],\n \"react/no-multi-comp\": [\"error\", { ignoreStateless: true }],\n \"react/only-export-components\": [\n \"error\",\n {\n allowExportNames: [\n \"dynamicParams\",\n \"generateMetadata\",\n \"generateStaticParams\",\n \"metadata\",\n \"variants\",\n ],\n },\n ],\n \"react/react-in-jsx-scope\": \"off\",\n \"react-hooks-js/error-boundaries\": \"error\",\n \"react-hooks-js/config\": \"error\",\n \"react-hooks-js/globals\": \"error\",\n \"react-hooks-js/immutability\": \"error\",\n \"react-hooks-js/incompatible-library\": \"error\",\n \"react-hooks-js/preserve-manual-memoization\": \"error\",\n \"react-hooks-js/purity\": \"error\",\n \"react-hooks-js/refs\": \"error\",\n \"react-hooks-js/set-state-in-effect\": \"error\",\n \"react-hooks-js/set-state-in-render\": \"error\",\n \"react-hooks-js/static-components\": \"error\",\n \"react-hooks-js/unsupported-syntax\": \"error\",\n \"react-hooks-js/use-memo\": \"error\",\n \"react-perf/jsx-no-jsx-as-prop\": \"off\",\n \"react-perf/jsx-no-new-array-as-prop\": \"off\",\n \"react-perf/jsx-no-new-function-as-prop\": \"off\",\n \"react-perf/jsx-no-new-object-as-prop\": \"off\",\n },\n} satisfies OxlintConfig);\n\n/* ============================================================================================= */\n\nexport default oxlintNext;\n"],"mappings":";;;AAQA,IAAM,IAAiB,EAAW,MAAM;AACxC,EAAe,GAAG,aAAa;CAAC,GAAG,EAAe,GAAG;CAAY;CAAK;CAAK;CAAK;CAAK;CAAK;AAAG;AAI7F,IAAM,IAAa,EAAa,GAAY;CAC1C,KAAK,EACH,SAAS,GACX;CAEA,WAAW,CACT;EACE,MAAM;EACN,WAAW;CACb,CACF;CAEA,SAAS;EAAC,GAAG,EAAW;EAAS;EAAY;EAAU;EAAS;CAAY;CAE5E,OAAO;EACL,oBAAoB;EACpB,uBAAuB;EACvB,+BAA+B,CAAC,SAAS,EAAE,OAAO,CAAC,UAAU,EAAE,CAAC;EAChE,gCAAgC,CAAC,SAAS,EAAE,QAAQ,CAAC,OAAO,EAAE,CAAC;EAC/D,gCAAgC,CAAC,SAAS,EAAE,YAAY,CAAC,OAAO,KAAK,EAAE,CAAC;EACxE,yBAAyB,CAAC,SAAS,EAAE,cAAc,GAAK,CAAC;EACzD,gCAAgC;EAChC,uBAAuB,CAAC,SAAS,EAAE,KAAK,EAAE,CAAC;EAC3C,uBAAuB,CAAC,SAAS,EAAE,iBAAiB,GAAK,CAAC;EAC1D,gCAAgC,CAC9B,SACA,EACE,kBAAkB;GAChB;GACA;GACA;GACA;GACA;EACF,EACF,CACF;EACA,4BAA4B;EAC5B,mCAAmC;EACnC,yBAAyB;EACzB,0BAA0B;EAC1B,+BAA+B;EAC/B,uCAAuC;EACvC,8CAA8C;EAC9C,yBAAyB;EACzB,uBAAuB;EACvB,sCAAsC;EACtC,sCAAsC;EACtC,oCAAoC;EACpC,qCAAqC;EACrC,2BAA2B;EAC3B,iCAAiC;EACjC,uCAAuC;EACvC,0CAA0C;EAC1C,wCAAwC;CAC1C;AACF,CAAwB"}
|
package/dist/configs/ts/lib.json
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { UserConfig } from 'vite';
|
|
2
|
+
export type ViteLib = (options: {
|
|
3
|
+
peerDependencies?: Record<string, string>;
|
|
4
|
+
}) => UserConfig;
|
|
5
|
+
declare const viteLib: ViteLib;
|
|
2
6
|
export interface CreateInputEntriesOptions {
|
|
3
7
|
/**
|
|
4
8
|
* `import.meta.dirname`
|
|
@@ -10,9 +14,4 @@ export interface CreateInputEntriesOptions {
|
|
|
10
14
|
entries: string[];
|
|
11
15
|
}
|
|
12
16
|
export declare const createInputEntries: ({ dirname, entries }: CreateInputEntriesOptions) => Record<string, string>;
|
|
13
|
-
export type ViteLib = (options: {
|
|
14
|
-
peerDependencies: Record<string, string>;
|
|
15
|
-
}) => UserConfig;
|
|
16
|
-
export declare const viteLib: ViteLib;
|
|
17
17
|
export default viteLib;
|
|
18
|
-
//# sourceMappingURL=lib.d.ts.map
|
package/dist/configs/vite/lib.js
CHANGED
|
@@ -1,38 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { extractExtensions as
|
|
3
|
-
import
|
|
4
|
-
import { relative as
|
|
5
|
-
import { glob as
|
|
1
|
+
import { deepMergeObj as e, freshRegex as t } from "../../lib/operations.js";
|
|
2
|
+
import { extractExtensions as n } from "../../lib/utils.js";
|
|
3
|
+
import r from "./base.js";
|
|
4
|
+
import { relative as i, resolve as a } from "node:path";
|
|
5
|
+
import { glob as o } from "glob";
|
|
6
6
|
//#region src/configs/vite/lib.ts
|
|
7
|
-
var
|
|
7
|
+
var s = ({ peerDependencies: n = {} }) => e(r, { build: {
|
|
8
|
+
sourcemap: !0,
|
|
9
|
+
lib: {
|
|
10
|
+
entry: "",
|
|
11
|
+
formats: ["es"]
|
|
12
|
+
},
|
|
13
|
+
rolldownOptions: {
|
|
14
|
+
external: [...r.build?.rolldownOptions?.external ?? [], ...Object.keys(n).flatMap((e) => [e, t(`^${e}/`)])],
|
|
15
|
+
output: {
|
|
16
|
+
preserveModules: !0,
|
|
17
|
+
preserveModulesRoot: "src",
|
|
18
|
+
entryFileNames: "[name].js"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
} }), c = ({ dirname: e, entries: r }) => {
|
|
8
22
|
let s = {};
|
|
9
|
-
for (let c of
|
|
10
|
-
let
|
|
11
|
-
s[
|
|
23
|
+
for (let c of r) for (let r of o.sync(c)) {
|
|
24
|
+
let o = i("src", r).replace(t(`\\.(${n(r).join("|")})$`), "");
|
|
25
|
+
s[o] = a(e, r);
|
|
12
26
|
}
|
|
13
27
|
return s;
|
|
14
|
-
}
|
|
15
|
-
...n,
|
|
16
|
-
build: {
|
|
17
|
-
...n.build,
|
|
18
|
-
sourcemap: !0,
|
|
19
|
-
lib: {
|
|
20
|
-
entry: "",
|
|
21
|
-
formats: ["es"]
|
|
22
|
-
},
|
|
23
|
-
rolldownOptions: {
|
|
24
|
-
...n.build?.rolldownOptions,
|
|
25
|
-
external: [...n.build?.rolldownOptions?.external ?? [], ...Object.keys(t).flatMap((t) => [t, e(`^${t}/`)])],
|
|
26
|
-
output: {
|
|
27
|
-
...n.build?.rolldownOptions?.output,
|
|
28
|
-
preserveModules: !0,
|
|
29
|
-
preserveModulesRoot: "src",
|
|
30
|
-
entryFileNames: "[name].js"
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
});
|
|
28
|
+
};
|
|
35
29
|
//#endregion
|
|
36
|
-
export {
|
|
30
|
+
export { c as createInputEntries, s as default };
|
|
37
31
|
|
|
38
32
|
//# sourceMappingURL=lib.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib.js","names":[],"sources":["../../../src/configs/vite/lib.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"lib.js","names":[],"sources":["../../../src/configs/vite/lib.ts"],"sourcesContent":["import { relative, resolve } from \"node:path\";\n\nimport { glob } from \"glob\";\n\nimport { deepMergeObj, freshRegex } from \"../../lib/operations.ts\";\nimport { extractExtensions } from \"../../lib/utils.ts\";\n\nimport viteBase from \"./base.ts\";\n\nimport type { UserConfig } from \"vite\";\n\n/* ============================================================================================= */\n\nexport type ViteLib = (options: { peerDependencies?: Record<string, string> }) => UserConfig;\n\nconst viteLib: ViteLib = ({ peerDependencies = {} }) => {\n //\n\n return deepMergeObj(viteBase, {\n //\n\n build: {\n //\n\n // enable source map for library\n sourcemap: true,\n\n // mark as library\n lib: {\n // using `config.build.rolldownOptions.input`\n entry: \"\",\n\n // minify whitespace is disabled for es format\n // https://vite.dev/config/build-options#build-minify\n formats: [\"es\"],\n },\n\n // tansformer options\n rolldownOptions: {\n //\n // force these to be external (don't bundle them)\n external: [\n //\n // @ts-expect-error iterator issue\n // oxlint-disable-next-line typescript/no-misused-spread\n ...(viteBase.build?.rolldownOptions?.external ?? []),\n\n // exclude all peerDependencies (as strings or Regex)\n ...Object.keys(peerDependencies).flatMap((dep) => {\n return [dep, freshRegex(`^${dep}/`)];\n }),\n ],\n\n // input will be added in actual `vite.config.ts`\n // input: createInputEntries({dirname: import.meta.dirname, entries: []})\n\n output: {\n preserveModules: true,\n preserveModulesRoot: \"src\",\n entryFileNames: \"[name].js\",\n },\n },\n },\n } satisfies UserConfig);\n};\n\n/* ============================================================================================= */\n\nexport interface CreateInputEntriesOptions {\n /**\n * `import.meta.dirname`\n */\n dirname: string;\n\n /**\n * paths to create input entry\n */\n entries: string[];\n}\n\nexport const createInputEntries = ({ dirname, entries }: CreateInputEntriesOptions) => {\n //\n const paths: Record<string, string> = {};\n\n for (const entry of entries) {\n //\n for (const file of glob.sync(entry)) {\n // 1. get path relative to 'src' (e.g., 'components/button.tsx')\n // 2. remove the extension\n const key = relative(\"src\", file).replace(\n freshRegex(`\\\\.(${extractExtensions(file).join(\"|\")})$`),\n \"\",\n );\n\n // the absolute path to the file\n const value = resolve(dirname, file);\n\n paths[key] = value;\n }\n }\n\n return paths;\n};\n\n/* ============================================================================================= */\n\nexport default viteLib;\n"],"mappings":";;;;;;AAeA,IAAM,KAAoB,EAAE,sBAAmB,CAAC,QAGvC,EAAa,GAAU,EAG5B,OAAO;CAIL,WAAW;CAGX,KAAK;EAEH,OAAO;EAIP,SAAS,CAAC,IAAI;CAChB;CAGA,iBAAiB;EAGf,UAAU,CAIR,GAAI,EAAS,OAAO,iBAAiB,YAAY,CAAC,GAGlD,GAAG,OAAO,KAAK,CAAgB,EAAE,SAAS,MACjC,CAAC,GAAK,EAAW,IAAI,EAAI,EAAE,CAAC,CACpC,CACH;EAKA,QAAQ;GACN,iBAAiB;GACjB,qBAAqB;GACrB,gBAAgB;EAClB;CACF;AACF,EACF,CAAsB,GAiBX,KAAsB,EAAE,YAAS,iBAAyC;CAErF,IAAM,IAAgC,CAAC;CAEvC,KAAK,IAAM,KAAS,GAElB,KAAK,IAAM,KAAQ,EAAK,KAAK,CAAK,GAAG;EAGnC,IAAM,IAAM,EAAS,OAAO,CAAI,EAAE,QAChC,EAAW,OAAO,EAAkB,CAAI,EAAE,KAAK,GAAG,EAAE,GAAG,GACvD,EACF;EAKA,EAAM,KAFQ,EAAQ,GAAS,CAElB;CACf;CAGF,OAAO;AACT"}
|
package/dist/lib/debounce.d.ts
CHANGED
package/dist/lib/logger.d.ts
CHANGED
|
@@ -1,44 +1,43 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* throws an error with the provided message.
|
|
3
3
|
*
|
|
4
|
-
* @param err -
|
|
4
|
+
* @param err - the error message to throw.
|
|
5
5
|
*/
|
|
6
6
|
export declare const throwError: <T>(err: T) => never;
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* prints a message to the console.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
10
|
+
* this will bypass `eslint/no-console`
|
|
11
|
+
*
|
|
12
|
+
* @param msg - the message to print.
|
|
11
13
|
*/
|
|
12
14
|
export declare const log: {
|
|
13
15
|
(...data: any[]): void;
|
|
14
16
|
(message?: any, ...optionalParams: any[]): void;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
export declare const logDivider: (divider?: string, count?: number) => void;
|
|
23
|
-
/**
|
|
24
|
-
* logs a new line with an optional message to the console.
|
|
25
|
-
*
|
|
26
|
-
* @param msg - The message to include in the new line (optional).
|
|
27
|
-
*/
|
|
28
|
-
export declare const logNewLine: <T>(msg?: T) => void;
|
|
29
|
-
/**
|
|
30
|
-
* logs a warning message to the console.
|
|
31
|
-
*
|
|
32
|
-
* @param msg - The warning message to log.
|
|
33
|
-
*/
|
|
34
|
-
export declare const warn: {
|
|
17
|
+
}, warn: {
|
|
18
|
+
(...data: any[]): void;
|
|
19
|
+
(message?: any, ...optionalParams: any[]): void;
|
|
20
|
+
}, error: {
|
|
21
|
+
(...data: any[]): void;
|
|
22
|
+
(message?: any, ...optionalParams: any[]): void;
|
|
23
|
+
}, info: {
|
|
35
24
|
(...data: any[]): void;
|
|
36
25
|
(message?: any, ...optionalParams: any[]): void;
|
|
26
|
+
}, debug: {
|
|
27
|
+
(...data: any[]): void;
|
|
28
|
+
(message?: any, ...optionalParams: any[]): void;
|
|
29
|
+
}, dir: {
|
|
30
|
+
(item?: any, options?: any): void;
|
|
31
|
+
(obj: any, options?: import('util').InspectOptions): void;
|
|
37
32
|
};
|
|
38
33
|
/**
|
|
39
|
-
*
|
|
34
|
+
* prints a separator line to the console.
|
|
40
35
|
*
|
|
41
|
-
* @param
|
|
36
|
+
* @param separator - the character to use for the separator (default is "─").
|
|
37
|
+
* @param count - the number of times to repeat the separator character (default is 80).
|
|
38
|
+
*/
|
|
39
|
+
export declare const printSeparator: (separator?: string, count?: number) => void;
|
|
40
|
+
/**
|
|
41
|
+
* print a blank line to the console.
|
|
42
42
|
*/
|
|
43
|
-
export declare const
|
|
44
|
-
//# sourceMappingURL=logger.d.ts.map
|
|
43
|
+
export declare const printBlankLine: () => void;
|
package/dist/lib/logger.js
CHANGED
|
@@ -2,14 +2,12 @@
|
|
|
2
2
|
var e = (e) => {
|
|
3
3
|
let t;
|
|
4
4
|
throw t = e instanceof Error ? e.message : typeof e == "string" ? e : String(e), Error(t);
|
|
5
|
-
}, { log: t } = console,
|
|
5
|
+
}, { log: t, warn: n, error: r, info: i, debug: a, dir: o } = console, s = (e = "─", n = 80) => {
|
|
6
6
|
t(e.repeat(n));
|
|
7
|
-
},
|
|
8
|
-
t(
|
|
9
|
-
}, { warn: i } = console, a = (e) => {
|
|
10
|
-
i(`\n${e}\n`);
|
|
7
|
+
}, c = () => {
|
|
8
|
+
t("");
|
|
11
9
|
};
|
|
12
10
|
//#endregion
|
|
13
|
-
export {
|
|
11
|
+
export { a as debug, o as dir, r as error, i as info, t as log, c as printBlankLine, s as printSeparator, e as throwError, n as warn };
|
|
14
12
|
|
|
15
13
|
//# sourceMappingURL=logger.js.map
|
package/dist/lib/logger.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.js","names":[],"sources":["../../src/lib/logger.ts"],"sourcesContent":["/**\n * throws an error with the provided message.\n *\n * @param err -
|
|
1
|
+
{"version":3,"file":"logger.js","names":[],"sources":["../../src/lib/logger.ts"],"sourcesContent":["/**\n * throws an error with the provided message.\n *\n * @param err - the error message to throw.\n */\nexport const throwError = <T>(err: T) => {\n //\n let errMsg: string;\n\n if (err instanceof Error) {\n errMsg = err.message;\n } else if (typeof err === \"string\") {\n errMsg = err;\n } else {\n errMsg = String(err);\n }\n\n throw new Error(errMsg);\n};\n\n/* ============================================================================================= */\n\n/**\n * prints a message to the console.\n *\n * this will bypass `eslint/no-console`\n *\n * @param msg - the message to print.\n */\nexport const { log, warn, error, info, debug, dir } = console;\n\n/* ============================================================================================= */\n\n/**\n * prints a separator line to the console.\n *\n * @param separator - the character to use for the separator (default is \"─\").\n * @param count - the number of times to repeat the separator character (default is 80).\n */\nexport const printSeparator = (separator = \"─\", count = 80) => {\n log(separator.repeat(count));\n};\n\n/* ============================================================================================= */\n\n/**\n * print a blank line to the console.\n */\nexport const printBlankLine = () => {\n log(\"\");\n};\n"],"mappings":";AAKA,IAAa,KAAiB,MAAW;CAEvC,IAAI;CAUJ,MARA,AAKE,IALE,aAAe,QACR,EAAI,UACJ,OAAO,KAAQ,WACf,IAEA,OAAO,CAAG,GAGX,MAAM,CAAM;AACxB,GAWa,EAAE,QAAK,SAAM,UAAO,SAAM,UAAO,WAAQ,SAUzC,KAAkB,IAAY,KAAK,IAAQ,OAAO;CAC7D,EAAI,EAAU,OAAO,CAAK,CAAC;AAC7B,GAOa,UAAuB;CAClC,EAAI,EAAE;AACR"}
|
package/dist/lib/operations.d.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* recursively merges the properties of the source object into the target object.
|
|
3
3
|
*
|
|
4
|
-
* @param target -
|
|
5
|
-
* @param source -
|
|
4
|
+
* @param target - the target object to merge into. Must be an object.
|
|
5
|
+
* @param source - the source object to merge from. Must be an object.
|
|
6
6
|
*
|
|
7
7
|
* @returns `source` object deep (nested) merge into `target` object.
|
|
8
8
|
*
|
|
9
|
-
* @throws {
|
|
9
|
+
* @throws { TypeError } if either `target` or `source` is not an object.
|
|
10
10
|
*/
|
|
11
|
-
export declare const deepMergeObj: <T, U>(target: T, source: U) => T & U;
|
|
11
|
+
export declare const deepMergeObj: <T extends object, U extends object>(target: T, source: U) => T & U;
|
|
12
12
|
/**
|
|
13
13
|
* creates a deep copy of the given data using `structuredClone`.
|
|
14
14
|
*
|
|
15
|
-
*
|
|
15
|
+
* if the input is not an object or array, the original data is returned.
|
|
16
16
|
*
|
|
17
|
-
* @param data -
|
|
17
|
+
* @param data - the data to be copied. Can be an object or array.
|
|
18
18
|
*
|
|
19
|
-
* @returns
|
|
19
|
+
* @returns a deep copy of the input data.
|
|
20
20
|
*
|
|
21
|
-
* @throws {
|
|
21
|
+
* @throws { DataCloneError } if any part of the input data (i.e., function) is not serializable.
|
|
22
22
|
*/
|
|
23
23
|
export declare const deepCopy: <T>(data: T) => T;
|
|
24
24
|
/**
|
|
@@ -30,12 +30,11 @@ export declare const deepCopy: <T>(data: T) => T;
|
|
|
30
30
|
* The returned RegExp preserves: - pattern source - flags (g, i, m, s, u, y, d, etc.)
|
|
31
31
|
*
|
|
32
32
|
* @example
|
|
33
|
-
*
|
|
34
|
-
*
|
|
33
|
+
* fresh(LCH_COLOR_FORMAT_PATTERN).test(rawColor);
|
|
34
|
+
* text.replace(fresh(LCH_COLOR_FORMAT_PATTERN), transformer);
|
|
35
35
|
*
|
|
36
36
|
* @param regex - The RegExp instance to clone.
|
|
37
37
|
*
|
|
38
38
|
* @returns A new RegExp instance with identical pattern and flags.
|
|
39
39
|
*/
|
|
40
40
|
export declare const freshRegex: (regex: RegExp | string) => RegExp;
|
|
41
|
-
//# sourceMappingURL=operations.d.ts.map
|
package/dist/lib/operations.js
CHANGED
|
@@ -1,21 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { isArr as
|
|
1
|
+
import { error as e, log as t, printBlankLine as n, printSeparator as r, throwError as i } from "./logger.js";
|
|
2
|
+
import { isArr as a, isObj as o } from "./types.js";
|
|
3
3
|
//#region src/lib/operations.ts
|
|
4
|
-
var
|
|
5
|
-
if (!
|
|
6
|
-
if (!
|
|
7
|
-
for (let
|
|
4
|
+
var s = (e, t) => {
|
|
5
|
+
if (!o(e)) return i("target must be an object");
|
|
6
|
+
if (!o(t)) return i("source must be an object");
|
|
7
|
+
for (let n in t) {
|
|
8
|
+
if (!Object.hasOwn(t, n)) continue;
|
|
9
|
+
let r = e[n], i = t[n];
|
|
10
|
+
n in e && o(r) && o(i) ? s(r, i) : e[n] = i;
|
|
11
|
+
}
|
|
8
12
|
return e;
|
|
9
|
-
},
|
|
13
|
+
}, c = (s) => {
|
|
10
14
|
try {
|
|
11
|
-
if (
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
e("Any part of the input data is not serializable."), t(n);
|
|
15
|
+
if (o(s) || a(s)) return structuredClone(s);
|
|
16
|
+
} catch (a) {
|
|
17
|
+
return r(), e("DEEP COPY :: Any part of the input data is not serializable."), n(), t(s), r(), i(a);
|
|
15
18
|
}
|
|
16
|
-
return
|
|
17
|
-
},
|
|
19
|
+
return s;
|
|
20
|
+
}, l = (e) => new RegExp(e);
|
|
18
21
|
//#endregion
|
|
19
|
-
export {
|
|
22
|
+
export { c as deepCopy, s as deepMergeObj, l as freshRegex };
|
|
20
23
|
|
|
21
24
|
//# sourceMappingURL=operations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.js","names":[],"sources":["../../src/lib/operations.ts"],"sourcesContent":["import { log, throwError } from \"./logger.ts\";\nimport { isArr, isObj } from \"./types.ts\";\n\n/* ============================================================================================= */\n\n/**\n * recursively merges the properties of the source object into the target object.\n *\n * @param target -
|
|
1
|
+
{"version":3,"file":"operations.js","names":[],"sources":["../../src/lib/operations.ts"],"sourcesContent":["import { error, log, printBlankLine, printSeparator, throwError } from \"./logger.ts\";\nimport { isArr, isObj } from \"./types.ts\";\n\nimport type { AnyObject } from \"../types/data.ts\";\n\n/* ============================================================================================= */\n\n/**\n * recursively merges the properties of the source object into the target object.\n *\n * @param target - the target object to merge into. Must be an object.\n * @param source - the source object to merge from. Must be an object.\n *\n * @returns `source` object deep (nested) merge into `target` object.\n *\n * @throws { TypeError } if either `target` or `source` is not an object.\n */\nexport const deepMergeObj = <T extends object, U extends object>(target: T, source: U) => {\n //\n if (!isObj(target)) {\n return throwError(\"target must be an object\");\n }\n if (!isObj(source)) {\n return throwError(\"source must be an object\");\n }\n\n for (const key in source) {\n //\n if (!Object.hasOwn(source, key)) {\n continue;\n }\n\n const targetValue = target[key];\n const sourceValue = source[key];\n\n if (key in target && isObj(targetValue) && isObj(sourceValue)) {\n deepMergeObj(targetValue, sourceValue);\n } else {\n (target as AnyObject)[key] = sourceValue;\n }\n }\n\n return target as T & U;\n};\n\n/* ============================================================================================= */\n\n/**\n * creates a deep copy of the given data using `structuredClone`.\n *\n * if the input is not an object or array, the original data is returned.\n *\n * @param data - the data to be copied. Can be an object or array.\n *\n * @returns a deep copy of the input data.\n *\n * @throws { DataCloneError } if any part of the input data (i.e., function) is not serializable.\n */\nexport const deepCopy = <T>(data: T): T => {\n //\n try {\n //\n if (isObj(data) || isArr(data)) {\n return structuredClone(data);\n }\n //\n } catch (err) {\n printSeparator();\n error(\"DEEP COPY :: Any part of the input data is not serializable.\");\n printBlankLine();\n log(data);\n printSeparator();\n return throwError(err);\n }\n\n return data;\n};\n\n/* ============================================================================================= */\n\n/**\n * returns a fresh RegExp instance cloned from the provided input. This ensures the internal\n * `lastIndex` state is reset to `0`, making the regex safe to reuse with stateful flags like `g` or\n * `y` across multiple operations (e.g. `test`, `replace`, `exec`), particularly in long-lived\n * runtimes such as HMR or shared modules.\n *\n * The returned RegExp preserves: - pattern source - flags (g, i, m, s, u, y, d, etc.)\n *\n * @example\n * fresh(LCH_COLOR_FORMAT_PATTERN).test(rawColor);\n * text.replace(fresh(LCH_COLOR_FORMAT_PATTERN), transformer);\n *\n * @param regex - The RegExp instance to clone.\n *\n * @returns A new RegExp instance with identical pattern and flags.\n */\n// reset lastIndex via new instance\nexport const freshRegex = (regex: RegExp | string) => {\n return new RegExp(regex);\n};\n"],"mappings":";;;AAiBA,IAAa,KAAoD,GAAW,MAAc;CAExF,IAAI,CAAC,EAAM,CAAM,GACf,OAAO,EAAW,0BAA0B;CAE9C,IAAI,CAAC,EAAM,CAAM,GACf,OAAO,EAAW,0BAA0B;CAG9C,KAAK,IAAM,KAAO,GAAQ;EAExB,IAAI,CAAC,OAAO,OAAO,GAAQ,CAAG,GAC5B;EAGF,IAAM,IAAc,EAAO,IACrB,IAAc,EAAO;EAE3B,AAAI,KAAO,KAAU,EAAM,CAAW,KAAK,EAAM,CAAW,IAC1D,EAAa,GAAa,CAAW,IAErC,EAAsB,KAAO;CAEjC;CAEA,OAAO;AACT,GAea,KAAe,MAAe;CAEzC,IAAI;EAEF,IAAI,EAAM,CAAI,KAAK,EAAM,CAAI,GAC3B,OAAO,gBAAgB,CAAI;CAG/B,SAAS,GAAK;EAMZ,OALA,EAAe,GACf,EAAM,8DAA8D,GACpE,EAAe,GACf,EAAI,CAAI,GACR,EAAe,GACR,EAAW,CAAG;CACvB;CAEA,OAAO;AACT,GAqBa,KAAc,MAClB,IAAI,OAAO,CAAK"}
|
package/dist/lib/singleton.d.ts
CHANGED
package/dist/lib/types.d.ts
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
+
import { AnyArray, AnyFunction, AnyObject } from '../types/data.ts';
|
|
1
2
|
/**
|
|
2
3
|
* checks if the provided data is a string.
|
|
3
4
|
*
|
|
4
|
-
* @param arg -
|
|
5
|
+
* @param arg - the data to check.
|
|
5
6
|
*
|
|
6
7
|
* @returns `true` if the data is a string, otherwise `false`.
|
|
7
8
|
*/
|
|
8
|
-
export declare const isStr:
|
|
9
|
+
export declare const isStr: (arg: unknown) => arg is string;
|
|
9
10
|
/**
|
|
10
11
|
* checks if the provided data is a number.
|
|
11
12
|
*
|
|
12
|
-
* @param arg -
|
|
13
|
+
* @param arg - the data to check.
|
|
13
14
|
*
|
|
14
15
|
* @returns `true` if the data is a number, otherwise `false`.
|
|
15
16
|
*/
|
|
16
|
-
export declare const isNum:
|
|
17
|
+
export declare const isNum: (arg: unknown) => arg is number;
|
|
17
18
|
/**
|
|
18
19
|
* checks if the provided data is a function.
|
|
19
20
|
*
|
|
20
|
-
* @param arg -
|
|
21
|
+
* @param arg - the data to check.
|
|
21
22
|
*
|
|
22
23
|
* @returns `true` if the data is a function, otherwise `false`.
|
|
23
24
|
*/
|
|
24
|
-
export declare const isFn:
|
|
25
|
+
export declare const isFn: (arg: unknown) => arg is AnyFunction;
|
|
25
26
|
/**
|
|
26
27
|
* checks if the provided data is an array.
|
|
27
28
|
*
|
|
28
|
-
* @param arg -
|
|
29
|
+
* @param arg - the data to check.
|
|
29
30
|
*
|
|
30
31
|
* @returns `true` if the data is an array, otherwise `false`.
|
|
31
32
|
*/
|
|
32
|
-
export declare const isArr:
|
|
33
|
+
export declare const isArr: (arg: unknown) => arg is AnyArray;
|
|
33
34
|
/**
|
|
34
35
|
* checks if the provided data is an object (not an array, or null).
|
|
35
36
|
*
|
|
36
|
-
* @param arg -
|
|
37
|
+
* @param arg - the data to check.
|
|
37
38
|
*
|
|
38
39
|
* @returns `true` if the data is an object, otherwise `false`.
|
|
39
40
|
*/
|
|
40
|
-
export declare const isObj:
|
|
41
|
-
//# sourceMappingURL=types.d.ts.map
|
|
41
|
+
export declare const isObj: (arg: unknown) => arg is AnyObject;
|
package/dist/lib/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../src/lib/types.ts"],"sourcesContent":["/**\n * checks if the provided data is a string.\n *\n * @param arg -
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../src/lib/types.ts"],"sourcesContent":["import type { AnyArray, AnyFunction, AnyObject } from \"../types/data.ts\";\n\n/* ============================================================================================= */\n\n/**\n * checks if the provided data is a string.\n *\n * @param arg - the data to check.\n *\n * @returns `true` if the data is a string, otherwise `false`.\n */\nexport const isStr = (arg: unknown): arg is string => {\n return typeof arg === \"string\";\n};\n\n/* ============================================================================================= */\n\n/**\n * checks if the provided data is a number.\n *\n * @param arg - the data to check.\n *\n * @returns `true` if the data is a number, otherwise `false`.\n */\nexport const isNum = (arg: unknown): arg is number => {\n return typeof arg === \"number\";\n};\n\n/* ============================================================================================= */\n\n/**\n * checks if the provided data is a function.\n *\n * @param arg - the data to check.\n *\n * @returns `true` if the data is a function, otherwise `false`.\n */\nexport const isFn = (arg: unknown): arg is AnyFunction => {\n return typeof arg === \"function\";\n};\n\n/* ============================================================================================= */\n\n/**\n * checks if the provided data is an array.\n *\n * @param arg - the data to check.\n *\n * @returns `true` if the data is an array, otherwise `false`.\n */\nexport const isArr = (arg: unknown): arg is AnyArray => {\n return Array.isArray(arg);\n};\n\n/* ============================================================================================= */\n\n/**\n * checks if the provided data is an object (not an array, or null).\n *\n * @param arg - the data to check.\n *\n * @returns `true` if the data is an object, otherwise `false`.\n */\nexport const isObj = (arg: unknown): arg is AnyObject => {\n return Boolean(arg) && typeof arg === \"object\" && !isArr(arg);\n};\n"],"mappings":";AAWA,IAAa,KAAS,MACb,OAAO,KAAQ,UAYX,KAAS,MACb,OAAO,KAAQ,UAYX,KAAQ,MACZ,OAAO,KAAQ,YAYX,KAAS,MACb,MAAM,QAAQ,CAAG,GAYb,KAAS,MACb,EAAQ,KAAQ,OAAO,KAAQ,YAAY,CAAC,EAAM,CAAG"}
|
package/dist/lib/utils.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ export declare const sleep: (time?: number) => Promise<void>;
|
|
|
7
7
|
/**
|
|
8
8
|
* extracts extensions from a string pattern like ".ext" or ".{ext1,ext2}"
|
|
9
9
|
*
|
|
10
|
-
* @param str -
|
|
10
|
+
* @param str - the pattern string (e.g., "*.{ts,tsx}")
|
|
11
11
|
*/
|
|
12
12
|
export declare const extractExtensions: (str: string) => string[];
|
|
13
|
-
//# sourceMappingURL=utils.d.ts.map
|
package/dist/lib/utils.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { printBlankLine as e, printSeparator as t, throwError as n } from "./logger.js";
|
|
2
2
|
//#region src/lib/utils.ts
|
|
3
|
-
var
|
|
3
|
+
var r = async (e = 250) => new Promise((t) => {
|
|
4
4
|
setTimeout(() => {
|
|
5
5
|
t();
|
|
6
6
|
}, e);
|
|
7
|
-
}),
|
|
8
|
-
let
|
|
9
|
-
return
|
|
7
|
+
}), i = (r) => {
|
|
8
|
+
let i = /\.(\{?[\w,]+\}?)$/.exec(r);
|
|
9
|
+
return i ? i[1].replaceAll(/[{}]/g, "").split(",") : (t(), e(), n(`extension(s) are required! :: ${r}`));
|
|
10
10
|
};
|
|
11
11
|
//#endregion
|
|
12
|
-
export {
|
|
12
|
+
export { i as extractExtensions, r as sleep };
|
|
13
13
|
|
|
14
14
|
//# sourceMappingURL=utils.js.map
|
package/dist/lib/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","names":[],"sources":["../../src/lib/utils.ts"],"sourcesContent":["import { throwError } from \"./logger.ts\";\n\n/* ============================================================================================= */\n\n/**\n * put the app to sleep for defined time for artificial delay to improve the UX\n *\n * @param time - time for artificial delay (default `250)\n */\n// oxlint-disable-next-line require-await\nexport const sleep = async (time = 250): Promise<void> => {\n //\n return new Promise<void>((resolve) => {\n setTimeout(() => {\n resolve();\n }, time);\n });\n};\n\n/* ============================================================================================= */\n\n/**\n * extracts extensions from a string pattern like \".ext\" or \".{ext1,ext2}\"\n *\n * @param str -
|
|
1
|
+
{"version":3,"file":"utils.js","names":[],"sources":["../../src/lib/utils.ts"],"sourcesContent":["import { printBlankLine, printSeparator, throwError } from \"./logger.ts\";\n\n/* ============================================================================================= */\n\n/**\n * put the app to sleep for defined time for artificial delay to improve the UX\n *\n * @param time - time for artificial delay (default `250)\n */\n// oxlint-disable-next-line require-await\nexport const sleep = async (time = 250): Promise<void> => {\n //\n return new Promise<void>((resolve) => {\n setTimeout(() => {\n resolve();\n }, time);\n });\n};\n\n/* ============================================================================================= */\n\n/**\n * extracts extensions from a string pattern like \".ext\" or \".{ext1,ext2}\"\n *\n * @param str - the pattern string (e.g., \"*.{ts,tsx}\")\n */\nexport const extractExtensions = (str: string) => {\n // regex explanation:\n // 1. \\. : Match a literal dot\n // 2. \\{? : Optionally match an opening curly brace\n // 3. ([\\w,]+) : Capture group for the extensions (alphanumeric and commas)\n // 4. \\}? : Optionally match a closing curly brace\n // 5. $ : Ensure we are at the end of the string\n const match = /\\.(\\{?[\\w,]+\\}?)$/.exec(str);\n\n if (!match) {\n printSeparator();\n printBlankLine();\n return throwError(`extension(s) are required! :: ${str}`);\n }\n\n // match[1] contains the extension part (e.g., \"ts\" or \"{ts,tsx}\")\n // we remove '{' and '}' and split by comma\n return match[1].replaceAll(/[{}]/g, \"\").split(\",\");\n};\n"],"mappings":";;AAUA,IAAa,IAAQ,OAAO,IAAO,QAE1B,IAAI,SAAe,MAAY;CACpC,iBAAiB;EACf,EAAQ;CACV,GAAG,CAAI;AACT,CAAC,GAUU,KAAqB,MAAgB;CAOhD,IAAM,IAAQ,oBAAoB,KAAK,CAAG;CAU1C,OARK,IAQE,EAAM,GAAG,WAAW,SAAS,EAAE,EAAE,MAAM,GAAG,KAP/C,EAAe,GACf,EAAe,GACR,EAAW,iCAAiC,GAAK;AAM5D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copy-folders.js","names":[],"sources":["../../../src/plugins/vite/copy-folders.ts"],"sourcesContent":["import { existsSync, mkdirSync, readdirSync, copyFileSync } from \"node:fs\";\nimport { join, resolve } from \"node:path\";\n\n/* ============================================================================================= */\n\n/**\n * copies entire folders and its contents to a destination folders (post build)\n *\n * @param dirname - `import.meta.dirname`\n * @param folders - an array of folder object containing `src` and `dest` property\n */\nconst vitePluginCopyFolders = (dirname: string, folders: { src: string; dest: string }[]) => {\n return {\n name: \"vite-plugin-copy-folders\",\n apply: \"build\",\n enforce: \"post\",\n\n closeBundle() {\n for (const folder of folders) {\n copyFolderSync(resolve(dirname, folder.src), resolve(dirname, folder.dest));\n }\n },\n };\n};\n\n/* ============================================================================================= */\n\n/**\n * copies an entire folder and its contents to a destination folder\n *\n *
|
|
1
|
+
{"version":3,"file":"copy-folders.js","names":[],"sources":["../../../src/plugins/vite/copy-folders.ts"],"sourcesContent":["import { existsSync, mkdirSync, readdirSync, copyFileSync } from \"node:fs\";\nimport { join, resolve } from \"node:path\";\n\n/* ============================================================================================= */\n\n/**\n * copies entire folders and its contents to a destination folders (post build)\n *\n * @param dirname - `import.meta.dirname`\n * @param folders - an array of folder object containing `src` and `dest` property\n */\nconst vitePluginCopyFolders = (dirname: string, folders: { src: string; dest: string }[]) => {\n return {\n name: \"vite-plugin-copy-folders\",\n apply: \"build\",\n enforce: \"post\",\n\n closeBundle() {\n for (const folder of folders) {\n copyFolderSync(resolve(dirname, folder.src), resolve(dirname, folder.dest));\n }\n },\n };\n};\n\n/* ============================================================================================= */\n\n/**\n * copies an entire folder and its contents to a destination folder\n *\n * if the destination directory does not exist, it will be created automatically.\n *\n * @param src - the source directory path.\n * @param dest - the destination directory path.\n */\nconst copyFolderSync = (src: string, dest: string) => {\n //\n if (!existsSync(dest)) {\n mkdirSync(dest, { recursive: true });\n }\n\n const entries = readdirSync(src, { withFileTypes: true });\n\n for (const entry of entries) {\n //\n const srcPath = join(src, entry.name);\n const destPath = join(dest, entry.name);\n\n if (entry.isDirectory()) {\n copyFolderSync(srcPath, destPath);\n } else {\n copyFileSync(srcPath, destPath);\n }\n }\n};\n\n/* ============================================================================================= */\n\nexport default vitePluginCopyFolders;\n"],"mappings":";;;AAWA,IAAM,KAAyB,GAAiB,OACvC;CACL,MAAM;CACN,OAAO;CACP,SAAS;CAET,cAAc;EACZ,KAAK,IAAM,KAAU,GACnB,EAAe,EAAQ,GAAS,EAAO,GAAG,GAAG,EAAQ,GAAS,EAAO,IAAI,CAAC;CAE9E;AACF,IAaI,KAAkB,GAAa,MAAiB;CAEpD,AAAK,EAAW,CAAI,KAClB,EAAU,GAAM,EAAE,WAAW,GAAK,CAAC;CAGrC,IAAM,IAAU,EAAY,GAAK,EAAE,eAAe,GAAK,CAAC;CAExD,KAAK,IAAM,KAAS,GAAS;EAE3B,IAAM,IAAU,EAAK,GAAK,EAAM,IAAI,GAC9B,IAAW,EAAK,GAAM,EAAM,IAAI;EAEtC,AAAI,EAAM,YAAY,IACpB,EAAe,GAAS,CAAQ,IAEhC,EAAa,GAAS,CAAQ;CAElC;AACF"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* recursive object where each key maps to a nested object or a final value.
|
|
3
|
+
*/
|
|
4
|
+
export interface NestedObject<T> {
|
|
5
|
+
/**
|
|
6
|
+
* dynamic key for a nested branch or leaf value.
|
|
7
|
+
*/
|
|
8
|
+
[key: string]: NestedObject<T> | T;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* use `AnyFunction` instead of banned `Function` type as it's too wide
|
|
12
|
+
*/
|
|
13
|
+
export type AnyFunction = (...args: unknown[]) => unknown;
|
|
14
|
+
/**
|
|
15
|
+
* use `AnyObject` instead of `object`
|
|
16
|
+
*/
|
|
17
|
+
export type AnyObject = Record<string, unknown>;
|
|
18
|
+
/**
|
|
19
|
+
* use `AnyArray` instead of `Array`
|
|
20
|
+
*/
|
|
21
|
+
export type AnyArray = unknown[];
|
|
22
|
+
/**
|
|
23
|
+
* primitive data types
|
|
24
|
+
*/
|
|
25
|
+
export type Primitive = string | number | boolean | bigint | symbol | null | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* extract element type from array
|
|
28
|
+
*/
|
|
29
|
+
export type ArrayElementType<T> = T extends (infer U)[] ? U : never;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AnyFunction, AnyObject } from './data.ts';
|
|
2
|
+
/**
|
|
3
|
+
* ensures IDEs suggest literals but accept any base value.
|
|
4
|
+
*/
|
|
5
|
+
export type PrimitiveWithAutocomplete<T> = T extends string ? T | (string & {}) : T extends number ? T | (number & {}) : T extends bigint ? T | (bigint & {}) : T extends symbol ? T | (symbol & {}) : T;
|
|
6
|
+
/**
|
|
7
|
+
* extend recursive structural mapper. K is the union of keys that MUST be required.
|
|
8
|
+
*/
|
|
9
|
+
export type Extend<T, K extends keyof T = never> = T extends AnyFunction ? T : T extends (infer U)[] ? Extend<U>[] : T extends object ? {
|
|
10
|
+
-readonly [U in K]-?: Extend<T[U]>;
|
|
11
|
+
} & {
|
|
12
|
+
-readonly [U in Exclude<keyof T, K>]?: Extend<T[U]>;
|
|
13
|
+
} & AnyObject : PrimitiveWithAutocomplete<T>;
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jadeja/ts",
|
|
3
3
|
"description": "an opinionated TypeScript toolkit",
|
|
4
|
-
"version": "1.0.0-alpha.
|
|
4
|
+
"version": "1.0.0-alpha.7",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
7
7
|
"./configs/ts/*": {
|
|
@@ -33,18 +33,18 @@
|
|
|
33
33
|
"@types/node": "^24.6.2",
|
|
34
34
|
"husky": "^9.1.7",
|
|
35
35
|
"lint-staged": "^17.0.7",
|
|
36
|
-
"oxfmt": "
|
|
37
|
-
"oxlint": "
|
|
38
|
-
"oxlint-tsgolint": "
|
|
36
|
+
"oxfmt": "~0.48.0",
|
|
37
|
+
"oxlint": "~1.65.0",
|
|
38
|
+
"oxlint-tsgolint": "~0.22.1",
|
|
39
39
|
"typescript": "^6.0.3",
|
|
40
40
|
"unplugin-dts": "^1.0.2",
|
|
41
41
|
"vite": "^8.0.16"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"glob": "
|
|
45
|
-
"oxfmt": "
|
|
46
|
-
"oxlint": "
|
|
47
|
-
"oxlint-tsgolint": "
|
|
44
|
+
"glob": "~13.0.6",
|
|
45
|
+
"oxfmt": "~0.48.0",
|
|
46
|
+
"oxlint": "~1.65.0",
|
|
47
|
+
"oxlint-tsgolint": "~0.22.1"
|
|
48
48
|
},
|
|
49
49
|
"keywords": [
|
|
50
50
|
"ts",
|
|
@@ -55,7 +55,9 @@
|
|
|
55
55
|
"oxlint",
|
|
56
56
|
"tsconfig",
|
|
57
57
|
"lib",
|
|
58
|
-
"plugins"
|
|
58
|
+
"plugins",
|
|
59
|
+
"vite",
|
|
60
|
+
"jadeja"
|
|
59
61
|
],
|
|
60
62
|
"files": [
|
|
61
63
|
"CHANGELOG.md",
|
|
@@ -96,6 +98,11 @@
|
|
|
96
98
|
"name": "node",
|
|
97
99
|
"version": ">=24",
|
|
98
100
|
"onFail": "error"
|
|
101
|
+
},
|
|
102
|
+
"packageManager": {
|
|
103
|
+
"name": "pnpm",
|
|
104
|
+
"version": ">=10",
|
|
105
|
+
"onFail": "error"
|
|
99
106
|
}
|
|
100
107
|
},
|
|
101
108
|
"scripts": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../src/configs/oxfmt/base.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDQ,CAAC;AAIxB,eAAe,SAAS,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../../../src/configs/oxfmt/lib.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAyC,CAAC;AAIxD,eAAe,QAAQ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"next.d.ts","sourceRoot":"","sources":["../../../../src/configs/oxfmt/next.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWQ,CAAC;AAIxB,eAAe,SAAS,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../src/configs/oxlint/base.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsGQ,CAAC;AAIzB,eAAe,UAAU,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../../../src/configs/oxlint/lib.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAA2C,CAAC;AAI3D,eAAe,SAAS,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"next.d.ts","sourceRoot":"","sources":["../../../../src/configs/oxlint/next.ts"],"names":[],"mappings":"AAWA,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+DQ,CAAC;AAIzB,eAAe,UAAU,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../src/configs/vite/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAIvC,QAAA,MAAM,QAAQ,EAAE,UAgBf,CAAC;AAIF,eAAe,QAAQ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../../../src/configs/vite/lib.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAIvC,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,eAAO,MAAM,kBAAkB,GAAI,sBAAsB,yBAAyB,2BAqBjF,CAAC;AAIF,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,EAAE;IAAE,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,KAAK,UAAU,CAAC;AAE5F,eAAO,MAAM,OAAO,EAAE,OAiErB,CAAC;AAIF,eAAe,OAAO,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"debounce.d.ts","sourceRoot":"","sources":["../../../src/lib/debounce.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,QAAA,MAAM,QAAQ,GAAI,IAAI,MAAM,IAAI,EAAE,cAAY,SAQ7C,CAAC;AAIF,eAAe,QAAQ,CAAC"}
|
package/dist/lib/logger.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/lib/logger.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,CAAC,EAAE,KAAK,CAAC,UAanC,CAAC;AAIF;;;;GAIG;AACH,eAAO,MAAQ,GAAG;;;CAAY,CAAC;AAI/B;;;;;GAKG;AACH,eAAO,MAAM,UAAU,GAAI,gBAAa,EAAE,cAAU,SAEnD,CAAC;AAIF;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,CAAC,EAAE,MAAM,CAAC,SAEpC,CAAC;AAIF;;;;GAIG;AACH,eAAO,MAAQ,IAAI;;;CAAY,CAAC;AAIhC;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,CAAC,EAAE,MAAM,CAAC,SAErC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../src/lib/operations.ts"],"names":[],"mappings":"AAKA;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY,GAAI,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,EAAE,QAAQ,CAAC,UAmBtD,CAAC;AAIF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ,GAAI,CAAC,EAAE,MAAM,CAAC,KAAG,CAgBrC,CAAC;AAIF;;;;;;;;;;;;;;;GAeG;AAEH,eAAO,MAAM,UAAU,GAAI,OAAO,MAAM,GAAG,MAAM,WAEhD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"singleton.d.ts","sourceRoot":"","sources":["../../../src/lib/singleton.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,SAAS;IAEpB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAgC;WAEnD,GAAG,CAAC,CAAC,SAAS,SAAS,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC;IAiB/C,GAAG,CAAC,CAAC,SAAS,MAAM,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC;IAIzD,GAAG,CAAC,CAAC,SAAS,MAAM,IAAI,EAAE,GAAG,EAAE,CAAC;IAQhC,QAAQ,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM;IASvC,eAAe,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE;CAMzD"}
|
package/dist/lib/types.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,GAAI,CAAC,EAAE,KAAK,CAAC,sBAE9B,CAAC;AAIF;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,GAAI,CAAC,EAAE,KAAK,CAAC,sBAE9B,CAAC;AAIF;;;;;;GAMG;AACH,eAAO,MAAM,IAAI,GAAI,CAAC,EAAE,KAAK,CAAC,wBAE7B,CAAC;AAIF;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,GAAI,CAAC,EAAE,KAAK,CAAC,qBAE9B,CAAC;AAIF;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,GAAI,CAAC,EAAE,KAAK,CAAC,YAE9B,CAAC"}
|
package/dist/lib/utils.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/lib/utils.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AAEH,eAAO,MAAM,KAAK,GAAU,aAAU,KAAG,OAAO,CAAC,IAAI,CAOpD,CAAC;AAIF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAAI,KAAK,MAAM,aAgB5C,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"copy-folders.d.ts","sourceRoot":"","sources":["../../../../src/plugins/vite/copy-folders.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,QAAA,MAAM,qBAAqB,GAAI,SAAS,MAAM,EAAE,SAAS;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE;;;;;CAYvF,CAAC;AAkCF,eAAe,qBAAqB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"remove-folders.d.ts","sourceRoot":"","sources":["../../../../src/plugins/vite/remove-folders.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,QAAA,MAAM,uBAAuB,GAAI,SAAS,MAAM,EAAE,SAAS,MAAM,EAAE;;;;;CAclE,CAAC;AAIF,eAAe,uBAAuB,CAAC"}
|
package/dist/types/util.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* recursive object where each key maps to a nested object or a final value.
|
|
3
|
-
*/
|
|
4
|
-
export interface NestedObject<T> {
|
|
5
|
-
/**
|
|
6
|
-
* dynamic key for a nested branch or leaf value.
|
|
7
|
-
*/
|
|
8
|
-
[key: string]: NestedObject<T> | T;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* package version pattern
|
|
12
|
-
*
|
|
13
|
-
* - "1.0.0",
|
|
14
|
-
* - "1.0.0-alpha.0"
|
|
15
|
-
*/
|
|
16
|
-
export type PackageVersion = `${number}.${number}.${number}${`-${string}.${number}` | ""}`;
|
|
17
|
-
/**
|
|
18
|
-
* primitive data types
|
|
19
|
-
*/
|
|
20
|
-
export type Primitive = string | number | boolean | bigint | symbol | null | undefined;
|
|
21
|
-
/**
|
|
22
|
-
* ensures IDEs suggest literals but accept any base value.
|
|
23
|
-
*/
|
|
24
|
-
export type PrimitiveWithAutocomplete<T> = T extends string ? T | (string & {}) : T extends number ? T | (number & {}) : T extends bigint ? T | (bigint & {}) : T extends symbol ? T | (symbol & {}) : T;
|
|
25
|
-
/**
|
|
26
|
-
* extend recursive structural mapper. K is the union of keys that MUST be required.
|
|
27
|
-
*/
|
|
28
|
-
export type Extend<T, K extends keyof T = never> = T extends (...args: any[]) => any ? T : T extends (infer U)[] ? Extend<U>[] : T extends object ? {
|
|
29
|
-
-readonly [U in K]-?: Extend<T[U]>;
|
|
30
|
-
} & {
|
|
31
|
-
-readonly [U in Exclude<keyof T, K>]?: Extend<T[U]>;
|
|
32
|
-
} & Record<string, any> : PrimitiveWithAutocomplete<T>;
|
|
33
|
-
//# sourceMappingURL=util.d.ts.map
|
package/dist/types/util.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../src/types/util.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B;;OAEG;IACH,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CACpC;AAED;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,GAAG,MAAM,IAAI,MAAM,IAAI,MAAM,GAAG,IAAI,MAAM,IAAI,MAAM,EAAE,GAAG,EAAE,EAAE,CAAC;AAE3F;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;AAEvF;;GAEG;AACH,MAAM,MAAM,yBAAyB,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,GAGrD,CAAC,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,GACnB,CAAC,SAAS,MAAM,GAGZ,CAAC,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,GACnB,CAAC,SAAS,MAAM,GAGZ,CAAC,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,GACnB,CAAC,SAAS,MAAM,GAGZ,CAAC,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,GACnB,CAAC,CAAC;AAEZ;;GAEG;AAEH,MAAM,MAAM,MAAM,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,GAAG,KAAK,IAAI,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,GAChF,CAAC,GACD,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,GACnB,MAAM,CAAC,CAAC,CAAC,EAAE,GACX,CAAC,SAAS,MAAM,GACd;IAEE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACnC,GAAG;IAEF,CAAC,UAAU,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAGpD,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACvB,yBAAyB,CAAC,CAAC,CAAC,CAAC"}
|
|
File without changes
|