@powerlines/plugin-eslint 0.8.226 → 0.8.228

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.
Files changed (49) hide show
  1. package/dist/index.cjs +2 -2
  2. package/dist/index.d.cts +2 -1
  3. package/dist/index.d.mts +2 -1
  4. package/dist/index.mjs +1 -1
  5. package/dist/types/plugin.d.cts +3 -3
  6. package/dist/types/plugin.d.mts +3 -3
  7. package/package.json +2 -2
  8. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.20/node_modules/@stryke/type-checks/dist/get-object-tag.cjs +0 -15
  9. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.20/node_modules/@stryke/type-checks/dist/get-object-tag.mjs +0 -14
  10. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.20/node_modules/@stryke/type-checks/dist/is-empty.cjs +0 -20
  11. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.20/node_modules/@stryke/type-checks/dist/is-empty.mjs +0 -20
  12. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.20/node_modules/@stryke/type-checks/dist/is-non-null-object.cjs +0 -16
  13. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.20/node_modules/@stryke/type-checks/dist/is-non-null-object.mjs +0 -16
  14. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.20/node_modules/@stryke/type-checks/dist/is-null.cjs +0 -12
  15. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.20/node_modules/@stryke/type-checks/dist/is-null.mjs +0 -11
  16. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.20/node_modules/@stryke/type-checks/dist/is-object.cjs +0 -19
  17. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.20/node_modules/@stryke/type-checks/dist/is-object.mjs +0 -19
  18. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.20/node_modules/@stryke/type-checks/dist/is-plain-object.cjs +0 -63
  19. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.20/node_modules/@stryke/type-checks/dist/is-plain-object.mjs +0 -63
  20. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.20/node_modules/@stryke/type-checks/dist/is-set-object.cjs +0 -19
  21. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.20/node_modules/@stryke/type-checks/dist/is-set-object.mjs +0 -19
  22. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.20/node_modules/@stryke/type-checks/dist/is-set.cjs +0 -19
  23. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.20/node_modules/@stryke/type-checks/dist/is-set.mjs +0 -19
  24. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.20/node_modules/@stryke/type-checks/dist/is-undefined.cjs +0 -8
  25. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.20/node_modules/@stryke/type-checks/dist/is-undefined.mjs +0 -7
  26. package/dist/packages/powerlines/src/internal/helpers/hooks.d.mts +0 -47
  27. package/dist/packages/powerlines/src/types/api.d.mts +0 -104
  28. package/dist/packages/powerlines/src/types/build.d.mts +0 -185
  29. package/dist/packages/powerlines/src/types/commands.d.mts +0 -8
  30. package/dist/packages/powerlines/src/types/config.d.mts +0 -424
  31. package/dist/packages/powerlines/src/types/context.d.mts +0 -514
  32. package/dist/packages/powerlines/src/types/fs.d.mts +0 -486
  33. package/dist/packages/powerlines/src/types/hooks.d.mts +0 -32
  34. package/dist/packages/powerlines/src/types/plugin.d.mts +0 -205
  35. package/dist/packages/powerlines/src/types/resolved.d.mts +0 -93
  36. package/dist/packages/powerlines/src/types/tsconfig.d.mts +0 -69
  37. package/dist/packages/powerlines/src/types/unplugin.d.mts +0 -22
  38. package/dist/powerlines/src/internal/helpers/hooks.d.cts +0 -47
  39. package/dist/powerlines/src/types/api.d.cts +0 -104
  40. package/dist/powerlines/src/types/build.d.cts +0 -185
  41. package/dist/powerlines/src/types/commands.d.cts +0 -8
  42. package/dist/powerlines/src/types/config.d.cts +0 -424
  43. package/dist/powerlines/src/types/context.d.cts +0 -514
  44. package/dist/powerlines/src/types/fs.d.cts +0 -486
  45. package/dist/powerlines/src/types/hooks.d.cts +0 -32
  46. package/dist/powerlines/src/types/plugin.d.cts +0 -205
  47. package/dist/powerlines/src/types/resolved.d.cts +0 -93
  48. package/dist/powerlines/src/types/tsconfig.d.cts +0 -69
  49. package/dist/powerlines/src/types/unplugin.d.cts +0 -22
package/dist/index.cjs CHANGED
@@ -1,5 +1,4 @@
1
1
  Object.defineProperty(exports, '__esModule', { value: true });
2
- const require_is_set_object = require('./node_modules/.pnpm/@stryke_type-checks@0.5.20/node_modules/@stryke/type-checks/dist/is-set-object.cjs');
3
2
  const require_helpers_format_message = require('./helpers/format-message.cjs');
4
3
  require('./helpers/index.cjs');
5
4
  let __stryke_fs_exists = require("@stryke/fs/exists");
@@ -8,6 +7,7 @@ let __stryke_fs_package_fns = require("@stryke/fs/package-fns");
8
7
  let __stryke_fs_read_file = require("@stryke/fs/read-file");
9
8
  let __stryke_fs_semver_fns = require("@stryke/fs/semver-fns");
10
9
  let __stryke_path_find = require("@stryke/path/find");
10
+ let __stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
11
11
  let defu = require("defu");
12
12
 
13
13
  //#region src/index.ts
@@ -46,7 +46,7 @@ function plugin(options = {}) {
46
46
  }) } };
47
47
  },
48
48
  async configResolved() {
49
- if (!require_is_set_object.isSetObject(this.packageJson.eslintConfig) && (!this.config.lint.eslint.configFile || !(0, __stryke_fs_exists.existsSync)(this.config.lint.eslint.configFile))) throw new Error("No ESLint configuration file could be found");
49
+ if (!(0, __stryke_type_checks_is_set_object.isSetObject)(this.packageJson.eslintConfig) && (!this.config.lint.eslint.configFile || !(0, __stryke_fs_exists.existsSync)(this.config.lint.eslint.configFile))) throw new Error("No ESLint configuration file could be found");
50
50
  else if (this.config.lint.eslint.configFile && (0, __stryke_fs_exists.existsSync)(this.config.lint.eslint.configFile)) {
51
51
  const content = await (0, __stryke_fs_read_file.readFile)(this.config.lint.eslint.configFile);
52
52
  if (content?.trim().replace(/\s/g, "") || content?.trim().replace(/\s/g, "") === "---" || content?.trim().replace(/\s/g, "") === "{}" || content?.trim().replace(/\s/g, "") === "module.exports={}") throw new Error(`The ESLint configuration file at "${this.config.lint.eslint.configFile}" is empty`);
package/dist/index.d.cts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { LintMessage, MessageSeverity, __ΩLintMessage, __ΩMessageSeverity, formatMessage } from "./helpers/format-message.cjs";
2
- import { Plugin } from "./powerlines/src/types/plugin.cjs";
3
2
  import { ESLintPluginContext, ESLintPluginOptions, ESLintPluginResolvedConfig, ESLintPluginUserConfig, __ΩESLintPluginContext, __ΩESLintPluginOptions, __ΩESLintPluginResolvedConfig, __ΩESLintPluginUserConfig } from "./types/plugin.cjs";
3
+ import "./types/index.cjs";
4
+ import { Plugin } from "powerlines/types/plugin";
4
5
 
5
6
  //#region src/index.d.ts
6
7
 
package/dist/index.d.mts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { LintMessage, MessageSeverity, __ΩLintMessage, __ΩMessageSeverity, formatMessage } from "./helpers/format-message.mjs";
2
- import { Plugin } from "./packages/powerlines/src/types/plugin.mjs";
3
2
  import { ESLintPluginContext, ESLintPluginOptions, ESLintPluginResolvedConfig, ESLintPluginUserConfig, __ΩESLintPluginContext, __ΩESLintPluginOptions, __ΩESLintPluginResolvedConfig, __ΩESLintPluginUserConfig } from "./types/plugin.mjs";
3
+ import "./types/index.mjs";
4
+ import { Plugin } from "powerlines/types/plugin";
4
5
 
5
6
  //#region src/index.d.ts
6
7
 
package/dist/index.mjs CHANGED
@@ -1,4 +1,3 @@
1
- import { isSetObject } from "./node_modules/.pnpm/@stryke_type-checks@0.5.20/node_modules/@stryke/type-checks/dist/is-set-object.mjs";
2
1
  import { MessageSeverity, formatMessage } from "./helpers/format-message.mjs";
3
2
  import "./helpers/index.mjs";
4
3
  import { existsSync } from "@stryke/fs/exists";
@@ -7,6 +6,7 @@ import { isPackageExists } from "@stryke/fs/package-fns";
7
6
  import { readFile } from "@stryke/fs/read-file";
8
7
  import { parseVersion } from "@stryke/fs/semver-fns";
9
8
  import { findFileName } from "@stryke/path/find";
9
+ import { isSetObject } from "@stryke/type-checks/is-set-object";
10
10
  import { defu } from "defu";
11
11
 
12
12
  //#region src/index.ts
@@ -1,8 +1,8 @@
1
- import { UserConfig } from "../powerlines/src/types/config.cjs";
2
- import { ResolvedConfig } from "../powerlines/src/types/resolved.cjs";
3
- import { PluginContext } from "../powerlines/src/types/context.cjs";
4
1
  import { ESLint } from "eslint";
5
2
  import { LegacyESLint } from "eslint/use-at-your-own-risk";
3
+ import { UserConfig } from "powerlines/types/config";
4
+ import { PluginContext } from "powerlines/types/context";
5
+ import { ResolvedConfig } from "powerlines/types/resolved";
6
6
 
7
7
  //#region src/types/plugin.d.ts
8
8
  interface ESLintPluginOptions {
@@ -1,8 +1,8 @@
1
- import { UserConfig } from "../packages/powerlines/src/types/config.mjs";
2
- import { ResolvedConfig } from "../packages/powerlines/src/types/resolved.mjs";
3
- import { PluginContext } from "../packages/powerlines/src/types/context.mjs";
4
1
  import { ESLint } from "eslint";
5
2
  import { LegacyESLint } from "eslint/use-at-your-own-risk";
3
+ import { UserConfig } from "powerlines/types/config";
4
+ import { PluginContext } from "powerlines/types/context";
5
+ import { ResolvedConfig } from "powerlines/types/resolved";
6
6
 
7
7
  //#region src/types/plugin.d.ts
8
8
  interface ESLintPluginOptions {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-eslint",
3
- "version": "0.8.226",
3
+ "version": "0.8.228",
4
4
  "type": "module",
5
5
  "description": "A package containing a Powerlines plugin for running ESLint on the codebase.",
6
6
  "repository": {
@@ -109,5 +109,5 @@
109
109
  },
110
110
  "devDependencies": { "@types/node": "^24.10.9" },
111
111
  "publishConfig": { "access": "public" },
112
- "gitHead": "f7483367fc2dba244e8d11af31db5b1071e0a888"
112
+ "gitHead": "f153baa7a374fe331eeb1b8ea37c30c379c5efce"
113
113
  }
@@ -1,15 +0,0 @@
1
-
2
- //#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.20/node_modules/@stryke/type-checks/dist/get-object-tag.mjs
3
- /**
4
- * Gets the `toStringTag` of `obj`.
5
- *
6
- * @param value - The obj to query.
7
- * @returns Returns the `toStringTag`.
8
- */
9
- const getObjectTag = (value) => {
10
- if (value == null) return value === void 0 ? "[object Undefined]" : "[object Null]";
11
- return Object.prototype.toString.call(value);
12
- };
13
-
14
- //#endregion
15
- exports.getObjectTag = getObjectTag;
@@ -1,14 +0,0 @@
1
- //#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.20/node_modules/@stryke/type-checks/dist/get-object-tag.mjs
2
- /**
3
- * Gets the `toStringTag` of `obj`.
4
- *
5
- * @param value - The obj to query.
6
- * @returns Returns the `toStringTag`.
7
- */
8
- const getObjectTag = (value) => {
9
- if (value == null) return value === void 0 ? "[object Undefined]" : "[object Null]";
10
- return Object.prototype.toString.call(value);
11
- };
12
-
13
- //#endregion
14
- export { getObjectTag };
@@ -1,20 +0,0 @@
1
- const require_is_null = require('./is-null.cjs');
2
- const require_is_undefined = require('./is-undefined.cjs');
3
-
4
- //#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.20/node_modules/@stryke/type-checks/dist/is-empty.mjs
5
- /**
6
- * Check if the provided value's type is `null` or `undefined`
7
- *
8
- * @param value - The value to type check
9
- * @returns An indicator specifying if the value provided is of type `null` or `undefined`
10
- */
11
- const isEmpty = (value) => {
12
- try {
13
- return require_is_undefined.isUndefined(value) || require_is_null.isNull(value);
14
- } catch {
15
- return false;
16
- }
17
- };
18
-
19
- //#endregion
20
- exports.isEmpty = isEmpty;
@@ -1,20 +0,0 @@
1
- import { isNull } from "./is-null.mjs";
2
- import { isUndefined } from "./is-undefined.mjs";
3
-
4
- //#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.20/node_modules/@stryke/type-checks/dist/is-empty.mjs
5
- /**
6
- * Check if the provided value's type is `null` or `undefined`
7
- *
8
- * @param value - The value to type check
9
- * @returns An indicator specifying if the value provided is of type `null` or `undefined`
10
- */
11
- const isEmpty = (value) => {
12
- try {
13
- return isUndefined(value) || isNull(value);
14
- } catch {
15
- return false;
16
- }
17
- };
18
-
19
- //#endregion
20
- export { isEmpty };
@@ -1,16 +0,0 @@
1
- const require_is_object = require('./is-object.cjs');
2
- const require_is_set = require('./is-set.cjs');
3
-
4
- //#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.20/node_modules/@stryke/type-checks/dist/is-non-null-object.mjs
5
- /**
6
- * Check if the provided value's type is `Object` and is not `null` or `undefined`
7
- *
8
- * @param value - The value to type check
9
- * @returns An indicator specifying if the value provided is of type `Object` and is not `null` or `undefined`
10
- */
11
- const isNonNullObject = (value) => {
12
- return require_is_set.isSet(value) && require_is_object.isObject(value);
13
- };
14
-
15
- //#endregion
16
- exports.isNonNullObject = isNonNullObject;
@@ -1,16 +0,0 @@
1
- import { isObject } from "./is-object.mjs";
2
- import { isSet } from "./is-set.mjs";
3
-
4
- //#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.20/node_modules/@stryke/type-checks/dist/is-non-null-object.mjs
5
- /**
6
- * Check if the provided value's type is `Object` and is not `null` or `undefined`
7
- *
8
- * @param value - The value to type check
9
- * @returns An indicator specifying if the value provided is of type `Object` and is not `null` or `undefined`
10
- */
11
- const isNonNullObject = (value) => {
12
- return isSet(value) && isObject(value);
13
- };
14
-
15
- //#endregion
16
- export { isNonNullObject };
@@ -1,12 +0,0 @@
1
-
2
- //#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.20/node_modules/@stryke/type-checks/dist/is-null.mjs
3
- const isNull = (value) => {
4
- try {
5
- return value === null;
6
- } catch {
7
- return false;
8
- }
9
- };
10
-
11
- //#endregion
12
- exports.isNull = isNull;
@@ -1,11 +0,0 @@
1
- //#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.20/node_modules/@stryke/type-checks/dist/is-null.mjs
2
- const isNull = (value) => {
3
- try {
4
- return value === null;
5
- } catch {
6
- return false;
7
- }
8
- };
9
-
10
- //#endregion
11
- export { isNull };
@@ -1,19 +0,0 @@
1
- const require_is_plain_object = require('./is-plain-object.cjs');
2
-
3
- //#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.20/node_modules/@stryke/type-checks/dist/is-object.mjs
4
- /**
5
- * Check if the provided value's type is `Object`
6
- *
7
- * @param value - The value to type check
8
- * @returns An indicator specifying if the value provided is of type `Object`
9
- */
10
- const isObject = (value) => {
11
- try {
12
- return typeof value === "object" || Boolean(value) && value?.constructor === Object || require_is_plain_object.isPlainObject(value);
13
- } catch {
14
- return false;
15
- }
16
- };
17
-
18
- //#endregion
19
- exports.isObject = isObject;
@@ -1,19 +0,0 @@
1
- import { isPlainObject } from "./is-plain-object.mjs";
2
-
3
- //#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.20/node_modules/@stryke/type-checks/dist/is-object.mjs
4
- /**
5
- * Check if the provided value's type is `Object`
6
- *
7
- * @param value - The value to type check
8
- * @returns An indicator specifying if the value provided is of type `Object`
9
- */
10
- const isObject = (value) => {
11
- try {
12
- return typeof value === "object" || Boolean(value) && value?.constructor === Object || isPlainObject(value);
13
- } catch {
14
- return false;
15
- }
16
- };
17
-
18
- //#endregion
19
- export { isObject };
@@ -1,63 +0,0 @@
1
- const require_get_object_tag = require('./get-object-tag.cjs');
2
-
3
- //#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.20/node_modules/@stryke/type-checks/dist/is-plain-object.mjs
4
- /**
5
- * Checks if `value` is object-like. A value is object-like if it's not `null`
6
- * and has a `typeof` result of "object".
7
- *
8
- * @example
9
- * ```typescript
10
- * isObjectLike({})
11
- * // => true
12
- *
13
- * isObjectLike([1, 2, 3])
14
- * // => true
15
- *
16
- * isObjectLike(Function)
17
- * // => false
18
- *
19
- * isObjectLike(null)
20
- * // => false
21
- * ```
22
- *
23
- * @param value - The value to check.
24
- * @returns Returns `true` if `value` is object-like, else `false`.
25
- */
26
- const isObjectLike = (obj) => {
27
- return typeof obj === "object" && obj !== null;
28
- };
29
- /**
30
- * Checks if `obj` is a plain object, that is, an object created by the `Object` constructor or one with a `[[Prototype]]` of `null`.
31
- *
32
- * @example
33
- * ```typescript
34
- * function Foo() {
35
- * this.a = 1
36
- * }
37
- *
38
- * isPlainObject(new Foo)
39
- * // => false
40
- *
41
- * isPlainObject([1, 2, 3])
42
- * // => false
43
- *
44
- * isPlainObject({ 'x': 0, 'y': 0 })
45
- * // => true
46
- *
47
- * isPlainObject(Object.create(null))
48
- * // => true
49
- * ```
50
- *
51
- * @param obj - The value to check.
52
- * @returns Returns `true` if `obj` is a plain object, else `false`.
53
- */
54
- const isPlainObject = (obj) => {
55
- if (!isObjectLike(obj) || require_get_object_tag.getObjectTag(obj) !== "[object Object]") return false;
56
- if (Object.getPrototypeOf(obj) === null) return true;
57
- let proto = obj;
58
- while (Object.getPrototypeOf(proto) !== null) proto = Object.getPrototypeOf(proto);
59
- return Object.getPrototypeOf(obj) === proto;
60
- };
61
-
62
- //#endregion
63
- exports.isPlainObject = isPlainObject;
@@ -1,63 +0,0 @@
1
- import { getObjectTag } from "./get-object-tag.mjs";
2
-
3
- //#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.20/node_modules/@stryke/type-checks/dist/is-plain-object.mjs
4
- /**
5
- * Checks if `value` is object-like. A value is object-like if it's not `null`
6
- * and has a `typeof` result of "object".
7
- *
8
- * @example
9
- * ```typescript
10
- * isObjectLike({})
11
- * // => true
12
- *
13
- * isObjectLike([1, 2, 3])
14
- * // => true
15
- *
16
- * isObjectLike(Function)
17
- * // => false
18
- *
19
- * isObjectLike(null)
20
- * // => false
21
- * ```
22
- *
23
- * @param value - The value to check.
24
- * @returns Returns `true` if `value` is object-like, else `false`.
25
- */
26
- const isObjectLike = (obj) => {
27
- return typeof obj === "object" && obj !== null;
28
- };
29
- /**
30
- * Checks if `obj` is a plain object, that is, an object created by the `Object` constructor or one with a `[[Prototype]]` of `null`.
31
- *
32
- * @example
33
- * ```typescript
34
- * function Foo() {
35
- * this.a = 1
36
- * }
37
- *
38
- * isPlainObject(new Foo)
39
- * // => false
40
- *
41
- * isPlainObject([1, 2, 3])
42
- * // => false
43
- *
44
- * isPlainObject({ 'x': 0, 'y': 0 })
45
- * // => true
46
- *
47
- * isPlainObject(Object.create(null))
48
- * // => true
49
- * ```
50
- *
51
- * @param obj - The value to check.
52
- * @returns Returns `true` if `obj` is a plain object, else `false`.
53
- */
54
- const isPlainObject = (obj) => {
55
- if (!isObjectLike(obj) || getObjectTag(obj) !== "[object Object]") return false;
56
- if (Object.getPrototypeOf(obj) === null) return true;
57
- let proto = obj;
58
- while (Object.getPrototypeOf(proto) !== null) proto = Object.getPrototypeOf(proto);
59
- return Object.getPrototypeOf(obj) === proto;
60
- };
61
-
62
- //#endregion
63
- export { isPlainObject };
@@ -1,19 +0,0 @@
1
- const require_is_non_null_object = require('./is-non-null-object.cjs');
2
-
3
- //#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.20/node_modules/@stryke/type-checks/dist/is-set-object.mjs
4
- /**
5
- * Check if the provided value's type is an object with some fields set
6
- *
7
- * @param value - The value to type check
8
- * @returns An indicator specifying if the value provided is an object with some fields se
9
- */
10
- const isSetObject = (value) => {
11
- try {
12
- return require_is_non_null_object.isNonNullObject(value) && Object.keys(value).length > 0;
13
- } catch {
14
- return false;
15
- }
16
- };
17
-
18
- //#endregion
19
- exports.isSetObject = isSetObject;
@@ -1,19 +0,0 @@
1
- import { isNonNullObject } from "./is-non-null-object.mjs";
2
-
3
- //#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.20/node_modules/@stryke/type-checks/dist/is-set-object.mjs
4
- /**
5
- * Check if the provided value's type is an object with some fields set
6
- *
7
- * @param value - The value to type check
8
- * @returns An indicator specifying if the value provided is an object with some fields se
9
- */
10
- const isSetObject = (value) => {
11
- try {
12
- return isNonNullObject(value) && Object.keys(value).length > 0;
13
- } catch {
14
- return false;
15
- }
16
- };
17
-
18
- //#endregion
19
- export { isSetObject };
@@ -1,19 +0,0 @@
1
- const require_is_empty = require('./is-empty.cjs');
2
-
3
- //#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.20/node_modules/@stryke/type-checks/dist/is-set.mjs
4
- /**
5
- * The inverse of the `isEmpty` function
6
- *
7
- * @param value - The value to type check
8
- * @returns An indicator specifying if the value provided is **NOT** of type `null` or `undefined`
9
- */
10
- const isSet = (value) => {
11
- try {
12
- return !require_is_empty.isEmpty(value);
13
- } catch {
14
- return false;
15
- }
16
- };
17
-
18
- //#endregion
19
- exports.isSet = isSet;
@@ -1,19 +0,0 @@
1
- import { isEmpty } from "./is-empty.mjs";
2
-
3
- //#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.20/node_modules/@stryke/type-checks/dist/is-set.mjs
4
- /**
5
- * The inverse of the `isEmpty` function
6
- *
7
- * @param value - The value to type check
8
- * @returns An indicator specifying if the value provided is **NOT** of type `null` or `undefined`
9
- */
10
- const isSet = (value) => {
11
- try {
12
- return !isEmpty(value);
13
- } catch {
14
- return false;
15
- }
16
- };
17
-
18
- //#endregion
19
- export { isSet };
@@ -1,8 +0,0 @@
1
-
2
- //#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.20/node_modules/@stryke/type-checks/dist/is-undefined.mjs
3
- const isUndefined = (value) => {
4
- return value === void 0;
5
- };
6
-
7
- //#endregion
8
- exports.isUndefined = isUndefined;
@@ -1,7 +0,0 @@
1
- //#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.20/node_modules/@stryke/type-checks/dist/is-undefined.mjs
2
- const isUndefined = (value) => {
3
- return value === void 0;
4
- };
5
-
6
- //#endregion
7
- export { isUndefined };
@@ -1,47 +0,0 @@
1
- import { SelectHooksOptions } from "../../types/context.mjs";
2
- import { MaybePromise } from "@stryke/types/base";
3
-
4
- //#region ../powerlines/src/internal/helpers/hooks.d.ts
5
- type CallHookOptions = SelectHooksOptions & (({
6
- /**
7
- * Whether to call the hooks sequentially or in parallel.
8
- *
9
- * @defaultValue true
10
- */
11
- sequential?: true;
12
- } & ({
13
- /**
14
- * How to handle multiple return values from hooks.
15
- * - "merge": Merge all non-undefined return values (if they are objects).
16
- * - "first": Return the first non-undefined value.
17
- *
18
- * @remarks
19
- * Merging only works if the return values are objects.
20
- *
21
- * @defaultValue "merge"
22
- */
23
- result: "first";
24
- } | {
25
- /**
26
- * How to handle multiple return values from hooks.
27
- * - "merge": Merge all non-undefined return values (if they are objects).
28
- * - "first": Return the first non-undefined value.
29
- *
30
- * @remarks
31
- * Merging only works if the return values are objects.
32
- *
33
- * @defaultValue "merge"
34
- */
35
- result?: "merge" | "last";
36
- /**
37
- * An indicator specifying if the results of the previous hook should be provided as the **first** parameter of the next hook function, or a function to process the result of the previous hook function and pass the returned value as the next hook's **first** parameter
38
- */
39
- asNextParam?: false | ((previousResult: any) => MaybePromise<any>);
40
- })) | {
41
- /**
42
- * Whether to call the hooks sequentially or in parallel.
43
- */
44
- sequential: false;
45
- });
46
- //#endregion
47
- export { CallHookOptions };
@@ -1,104 +0,0 @@
1
- import { BuildInlineConfig, CleanInlineConfig, DeployInlineConfig, DocsInlineConfig, LintInlineConfig, NewInlineConfig, PrepareInlineConfig } from "./config.mjs";
2
- import { InferHookParameters, InferHookReturnType } from "./hooks.mjs";
3
- import { ResolvedConfig } from "./resolved.mjs";
4
- import { APIContext, EnvironmentContext, PluginContext } from "./context.mjs";
5
- import { CallHookOptions } from "../internal/helpers/hooks.mjs";
6
-
7
- //#region ../powerlines/src/types/api.d.ts
8
-
9
- /**
10
- * Powerlines API Interface
11
- */
12
- interface API<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
13
- /**
14
- * The Powerlines shared API context
15
- */
16
- context: APIContext<TResolvedConfig>;
17
- /**
18
- * Prepare the Powerlines API
19
- *
20
- * @remarks
21
- * This method will prepare the Powerlines API for use, initializing any necessary resources.
22
- *
23
- * @param inlineConfig - The inline configuration for the prepare command
24
- */
25
- prepare: (inlineConfig: PrepareInlineConfig | NewInlineConfig | CleanInlineConfig | BuildInlineConfig | LintInlineConfig | DocsInlineConfig | DeployInlineConfig) => Promise<void>;
26
- /**
27
- * Create a new Powerlines project
28
- *
29
- * @remarks
30
- * This method will create a new Powerlines project in the current directory.
31
- *
32
- * @param inlineConfig - The inline configuration for the new command
33
- * @returns A promise that resolves when the project has been created
34
- */
35
- new: (inlineConfig: NewInlineConfig) => Promise<void>;
36
- /**
37
- * Clean any previously prepared artifacts
38
- *
39
- * @remarks
40
- * This method will remove the previous Powerlines artifacts from the project.
41
- *
42
- * @param inlineConfig - The inline configuration for the clean command
43
- * @returns A promise that resolves when the clean command has completed
44
- */
45
- clean: (inlineConfig: CleanInlineConfig | PrepareInlineConfig) => Promise<void>;
46
- /**
47
- * Lint the project source code
48
- *
49
- * @param inlineConfig - The inline configuration for the lint command
50
- * @returns A promise that resolves when the lint command has completed
51
- */
52
- lint: (inlineConfig: LintInlineConfig) => Promise<void>;
53
- /**
54
- * Build the project
55
- *
56
- * @remarks
57
- * This method will build the Powerlines project, generating the necessary artifacts.
58
- *
59
- * @param inlineConfig - The inline configuration for the build command
60
- * @returns A promise that resolves when the build command has completed
61
- */
62
- build: (inlineConfig: BuildInlineConfig) => Promise<void>;
63
- /**
64
- * Prepare the documentation for the project
65
- *
66
- * @param inlineConfig - The inline configuration for the docs command
67
- * @returns A promise that resolves when the documentation generation has completed
68
- */
69
- docs: (inlineConfig: DocsInlineConfig) => Promise<void>;
70
- /**
71
- * Deploy the project source code
72
- *
73
- * @remarks
74
- * This method will prepare and build the Powerlines project, generating the necessary artifacts for the deployment.
75
- *
76
- * @param inlineConfig - The inline configuration for the deploy command
77
- */
78
- deploy: (inlineConfig: DeployInlineConfig) => Promise<void>;
79
- /**
80
- * Finalization process
81
- *
82
- * @remarks
83
- * This step includes any final processes or clean up required by Powerlines. It will be run after each Powerlines command.
84
- *
85
- * @returns A promise that resolves when the finalization process has completed
86
- */
87
- finalize: () => Promise<void>;
88
- /**
89
- * Invokes the configured plugin hooks
90
- *
91
- * @remarks
92
- * By default, it will call the `"pre"`, `"normal"`, and `"post"` ordered hooks in sequence
93
- *
94
- * @param hook - The hook to call
95
- * @param options - The options to provide to the hook
96
- * @param args - The arguments to pass to the hook
97
- * @returns The result of the hook call
98
- */
99
- callHook: <TKey extends string>(hook: TKey, options: CallHookOptions & {
100
- environment?: string | EnvironmentContext<TResolvedConfig>;
101
- }, ...args: InferHookParameters<PluginContext<TResolvedConfig>, TKey>) => Promise<InferHookReturnType<PluginContext<TResolvedConfig>, TKey> | undefined>;
102
- }
103
- //#endregion
104
- export { API };