@powerlines/plugin-env 0.15.135 → 0.15.136

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 (53) hide show
  1. package/dist/babel/plugin.cjs +3 -3
  2. package/dist/babel/plugin.d.cts +2 -2
  3. package/dist/babel/plugin.d.mts +2 -3
  4. package/dist/babel/plugin.mjs +1 -1
  5. package/dist/helpers/automd-generator.cjs +2 -2
  6. package/dist/helpers/automd-generator.d.cts +1 -1
  7. package/dist/helpers/automd-generator.d.mts +1 -1
  8. package/dist/helpers/automd-generator.mjs +1 -1
  9. package/dist/helpers/load.cjs +4 -4
  10. package/dist/helpers/load.mjs +2 -2
  11. package/dist/helpers/persistence.cjs +5 -5
  12. package/dist/helpers/persistence.d.cts +1 -1
  13. package/dist/helpers/persistence.d.mts +1 -1
  14. package/dist/helpers/persistence.mjs +1 -1
  15. package/dist/index.d.cts +1 -1
  16. package/dist/index.d.mts +1 -1
  17. package/dist/types/plugin.d.cts +1 -1
  18. package/package.json +7 -7
  19. package/dist/powerlines/src/internal/helpers/hooks.d.cts +0 -47
  20. package/dist/powerlines/src/internal/helpers/hooks.d.mts +0 -49
  21. package/dist/powerlines/src/lib/constants/environments.cjs +0 -6
  22. package/dist/powerlines/src/lib/constants/environments.mjs +0 -5
  23. package/dist/powerlines/src/types/api.d.cts +0 -104
  24. package/dist/powerlines/src/types/api.d.mts +0 -104
  25. package/dist/powerlines/src/types/babel.cjs +0 -11
  26. package/dist/powerlines/src/types/babel.d.cts +0 -21
  27. package/dist/powerlines/src/types/babel.d.mts +0 -21
  28. package/dist/powerlines/src/types/babel.mjs +0 -10
  29. package/dist/powerlines/src/types/build.d.cts +0 -185
  30. package/dist/powerlines/src/types/build.d.mts +0 -185
  31. package/dist/powerlines/src/types/commands.d.cts +0 -8
  32. package/dist/powerlines/src/types/commands.d.mts +0 -9
  33. package/dist/powerlines/src/types/config.cjs +0 -30
  34. package/dist/powerlines/src/types/config.d.cts +0 -424
  35. package/dist/powerlines/src/types/config.d.mts +0 -426
  36. package/dist/powerlines/src/types/config.mjs +0 -29
  37. package/dist/powerlines/src/types/context.cjs +0 -285
  38. package/dist/powerlines/src/types/context.d.cts +0 -514
  39. package/dist/powerlines/src/types/context.d.mts +0 -514
  40. package/dist/powerlines/src/types/context.mjs +0 -283
  41. package/dist/powerlines/src/types/fs.d.cts +0 -486
  42. package/dist/powerlines/src/types/fs.d.mts +0 -486
  43. package/dist/powerlines/src/types/hooks.d.cts +0 -32
  44. package/dist/powerlines/src/types/hooks.d.mts +0 -32
  45. package/dist/powerlines/src/types/index.d.mts +0 -12
  46. package/dist/powerlines/src/types/plugin.d.cts +0 -205
  47. package/dist/powerlines/src/types/plugin.d.mts +0 -205
  48. package/dist/powerlines/src/types/resolved.d.cts +0 -93
  49. package/dist/powerlines/src/types/resolved.d.mts +0 -93
  50. package/dist/powerlines/src/types/tsconfig.d.cts +0 -69
  51. package/dist/powerlines/src/types/tsconfig.d.mts +0 -69
  52. package/dist/powerlines/src/types/unplugin.d.cts +0 -22
  53. package/dist/powerlines/src/types/unplugin.d.mts +0 -23
@@ -1,6 +1,6 @@
1
1
  const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
2
  const require_types_plugin = require('../types/plugin.cjs');
3
- const require_babel = require('../powerlines/src/types/babel.cjs');
3
+ let powerlines_types_babel = require("powerlines/types/babel");
4
4
  let __babel_core = require("@babel/core");
5
5
  let __powerlines_deepkit_utilities = require("@powerlines/deepkit/utilities");
6
6
  let __powerlines_plugin_babel_helpers_create_plugin = require("@powerlines/plugin-babel/helpers/create-plugin");
@@ -91,7 +91,7 @@ const envBabelPlugin = (__powerlines_plugin_babel_helpers_create_plugin.createBa
91
91
  }
92
92
  extractEnv.__type = [
93
93
  "node",
94
- () => require_babel.__ΩBabelPluginPass,
94
+ () => powerlines_types_babel.__ΩBabelPluginPass,
95
95
  "pass",
96
96
  "isInjectable",
97
97
  "extractEnv",
@@ -126,7 +126,7 @@ const envBabelPlugin = (__powerlines_plugin_babel_helpers_create_plugin.createBa
126
126
  }, [
127
127
  () => __babel_core.NodePath,
128
128
  "path",
129
- () => require_babel.__ΩBabelPluginPass,
129
+ () => powerlines_types_babel.__ΩBabelPluginPass,
130
130
  "pass",
131
131
  "MemberExpression",
132
132
  "PP!7!2\"n#2$\"/%"
@@ -1,8 +1,8 @@
1
- import { DeclareBabelTransformPluginReturn } from "../powerlines/src/types/babel.cjs";
2
1
  import { EnvPluginContext, EnvPluginResolvedConfig } from "../types/plugin.cjs";
3
2
  import "../index.cjs";
3
+ import * as powerlines_types0 from "powerlines/types";
4
4
 
5
5
  //#region src/babel/plugin.d.ts
6
- declare const envBabelPlugin: DeclareBabelTransformPluginReturn<EnvPluginContext<EnvPluginResolvedConfig>, Record<string, any>>;
6
+ declare const envBabelPlugin: powerlines_types0.DeclareBabelTransformPluginReturn<EnvPluginContext<EnvPluginResolvedConfig>, Record<string, any>>;
7
7
  //#endregion
8
8
  export { envBabelPlugin };
@@ -1,9 +1,8 @@
1
- import { DeclareBabelTransformPluginReturn } from "../powerlines/src/types/babel.mjs";
2
1
  import { EnvPluginContext, EnvPluginResolvedConfig } from "../types/plugin.mjs";
3
2
  import "../index.mjs";
4
- import "../powerlines/src/types/index.mjs";
3
+ import * as powerlines_types0 from "powerlines/types";
5
4
 
6
5
  //#region src/babel/plugin.d.ts
7
- declare const envBabelPlugin: DeclareBabelTransformPluginReturn<EnvPluginContext<EnvPluginResolvedConfig>, Record<string, any>>;
6
+ declare const envBabelPlugin: powerlines_types0.DeclareBabelTransformPluginReturn<EnvPluginContext<EnvPluginResolvedConfig>, Record<string, any>>;
8
7
  //#endregion
9
8
  export { envBabelPlugin };
@@ -1,5 +1,5 @@
1
1
  import { __ΩEnvPluginContext } from "../types/plugin.mjs";
2
- import { __ΩBabelPluginPass } from "../powerlines/src/types/babel.mjs";
2
+ import { __ΩBabelPluginPass } from "powerlines/types/babel";
3
3
  import { NodePath } from "@babel/core";
4
4
  import { stringifyDefaultValue } from "@powerlines/deepkit/utilities";
5
5
  import { createBabelPlugin } from "@powerlines/plugin-babel/helpers/create-plugin";
@@ -1,5 +1,5 @@
1
1
  const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
- const require_context = require('../powerlines/src/types/context.cjs');
2
+ let powerlines_types_context = require("powerlines/types/context");
3
3
  let __stryke_path_join_paths = require("@stryke/path/join-paths");
4
4
  let automd = require("automd");
5
5
 
@@ -22,7 +22,7 @@ const env = __assignType((context) => (0, automd.defineGenerator)({
22
22
  return { contents: await context.fs.read(envDocFile) || "" };
23
23
  }, ["generate", "P\"/!"])
24
24
  }), [
25
- () => require_context.__ΩUnresolvedContext,
25
+ () => powerlines_types_context.__ΩUnresolvedContext,
26
26
  "context",
27
27
  "",
28
28
  "Pn!2\"\"/#"
@@ -1,4 +1,4 @@
1
- import { UnresolvedContext } from "../powerlines/src/types/context.cjs";
1
+ import { UnresolvedContext } from "powerlines/types/context";
2
2
  import * as automd0 from "automd";
3
3
 
4
4
  //#region src/helpers/automd-generator.d.ts
@@ -1,4 +1,4 @@
1
- import { UnresolvedContext } from "../powerlines/src/types/context.mjs";
1
+ import { UnresolvedContext } from "powerlines/types/context";
2
2
  import * as automd0 from "automd";
3
3
 
4
4
  //#region src/helpers/automd-generator.d.ts
@@ -1,4 +1,4 @@
1
- import { __ΩUnresolvedContext } from "../powerlines/src/types/context.mjs";
1
+ import { __ΩUnresolvedContext } from "powerlines/types/context";
2
2
  import { joinPaths } from "@stryke/path/join-paths";
3
3
  import { defineGenerator } from "automd";
4
4
 
@@ -1,15 +1,15 @@
1
1
  const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
2
  const require_types_plugin = require('../types/plugin.cjs');
3
3
  const require_helpers_source_file_env = require('./source-file-env.cjs');
4
- const require_config = require('../powerlines/src/types/config.cjs');
5
- const require_environments = require('../powerlines/src/lib/constants/environments.cjs');
6
4
  let __stryke_path_join_paths = require("@stryke/path/join-paths");
5
+ let powerlines_types_config = require("powerlines/types/config");
7
6
  let __stryke_env_load_env = require("@stryke/env/load-env");
8
7
  let __stryke_string_format_kebab_case = require("@stryke/string-format/kebab-case");
9
8
  let __stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
10
9
  let c12 = require("c12");
11
10
  let defu = require("defu");
12
11
  defu = require_rolldown_runtime.__toESM(defu);
12
+ let powerlines_lib_constants_environments = require("powerlines/lib/constants/environments");
13
13
 
14
14
  //#region src/helpers/load.ts
15
15
  function __assignType(fn, args) {
@@ -63,7 +63,7 @@ loadEnvDirectory.__type = [
63
63
  "mode",
64
64
  "cacheDir",
65
65
  "packageJson",
66
- () => require_config.__ΩWorkspaceConfig,
66
+ () => powerlines_types_config.__ΩWorkspaceConfig,
67
67
  "workspaceConfig",
68
68
  "loadEnvDirectory",
69
69
  "Pn!2\"&2#&2$&2%!2&n'2(\"`/)"
@@ -94,7 +94,7 @@ function loadEnvFromContext(context, parsed) {
94
94
  TEST: context.config.mode === "test",
95
95
  DEBUG: context.config.mode === "development",
96
96
  STACKTRACE: context.config.mode !== "production",
97
- ENVIRONMENT: !context.environment.name || context.environment.name === require_environments.DEFAULT_ENVIRONMENT ? context.config.mode : context.environment.name
97
+ ENVIRONMENT: !context.environment.name || context.environment.name === powerlines_lib_constants_environments.DEFAULT_ENVIRONMENT ? context.config.mode : context.environment.name
98
98
  }, (0, __stryke_type_checks_is_set_object.isSetObject)(context?.env?.types?.env) ? context.env.types.env?.getProperties().reduce(__assignType((ret, prop) => {
99
99
  ret[prop.name] = parsed[prop.name] ?? prop.getDefaultValue();
100
100
  return ret;
@@ -1,13 +1,13 @@
1
1
  import { __ΩEnvPluginContext, __ΩEnvPluginOptions } from "../types/plugin.mjs";
2
2
  import { removeEnvPrefix } from "./source-file-env.mjs";
3
- import { __ΩWorkspaceConfig } from "../powerlines/src/types/config.mjs";
4
- import { DEFAULT_ENVIRONMENT } from "../powerlines/src/lib/constants/environments.mjs";
5
3
  import { joinPaths } from "@stryke/path/join-paths";
4
+ import { __ΩWorkspaceConfig } from "powerlines/types/config";
6
5
  import { loadEnv as loadEnv$1, loadEnvFile } from "@stryke/env/load-env";
7
6
  import { kebabCase } from "@stryke/string-format/kebab-case";
8
7
  import { isSetObject } from "@stryke/type-checks/is-set-object";
9
8
  import { loadConfig } from "c12";
10
9
  import defu from "defu";
10
+ import { DEFAULT_ENVIRONMENT } from "powerlines/lib/constants/environments";
11
11
 
12
12
  //#region src/helpers/load.ts
13
13
  function __assignType(fn, args) {
@@ -1,8 +1,8 @@
1
1
  const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
2
  const require_types_plugin = require('../types/plugin.cjs');
3
- const require_context = require('../powerlines/src/types/context.cjs');
4
3
  const require_helpers_reflect = require('./reflect.cjs');
5
4
  let __powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
5
+ let powerlines_types_context = require("powerlines/types/context");
6
6
  let __powerlines_deepkit_capnp = require("@powerlines/deepkit/capnp");
7
7
  let __powerlines_deepkit_resolve_reflections = require("@powerlines/deepkit/resolve-reflections");
8
8
  let __powerlines_deepkit_schemas_reflection = require("@powerlines/deepkit/schemas/reflection");
@@ -26,7 +26,7 @@ async function resolveRuntimeTypeFile(context) {
26
26
  return resolved;
27
27
  }
28
28
  resolveRuntimeTypeFile.__type = [
29
- () => require_context.__ΩUnresolvedContext,
29
+ () => powerlines_types_context.__ΩUnresolvedContext,
30
30
  () => require_types_plugin.__ΩEnvPluginResolvedConfig,
31
31
  "context",
32
32
  "resolveRuntimeTypeFile",
@@ -46,7 +46,7 @@ async function getEnvDefaultTypeDefinition(context) {
46
46
  };
47
47
  }
48
48
  getEnvDefaultTypeDefinition.__type = [
49
- () => require_context.__ΩUnresolvedContext,
49
+ () => powerlines_types_context.__ΩUnresolvedContext,
50
50
  () => require_types_plugin.__ΩEnvPluginResolvedConfig,
51
51
  "context",
52
52
  "getEnvDefaultTypeDefinition",
@@ -65,7 +65,7 @@ async function getSecretsDefaultTypeDefinition(context) {
65
65
  };
66
66
  }
67
67
  getSecretsDefaultTypeDefinition.__type = [
68
- () => require_context.__ΩUnresolvedContext,
68
+ () => powerlines_types_context.__ΩUnresolvedContext,
69
69
  () => require_types_plugin.__ΩEnvPluginResolvedConfig,
70
70
  "context",
71
71
  "getSecretsDefaultTypeDefinition",
@@ -82,7 +82,7 @@ function getEnvTypeReflectionsPath(context, name = "env") {
82
82
  return (0, __stryke_path_join_paths.joinPaths)((0, __powerlines_deepkit_resolve_reflections.getReflectionsPath)(context), "env", `${name}-types.bin`);
83
83
  }
84
84
  getEnvTypeReflectionsPath.__type = [
85
- () => require_context.__ΩContext,
85
+ () => powerlines_types_context.__ΩContext,
86
86
  () => require_types_plugin.__ΩEnvPluginResolvedConfig,
87
87
  "context",
88
88
  () => require_types_plugin.__ΩEnvType,
@@ -1,7 +1,7 @@
1
- import { Context, UnresolvedContext } from "../powerlines/src/types/context.cjs";
2
1
  import { EnvPluginContext, EnvPluginResolvedConfig, EnvType } from "../types/plugin.cjs";
3
2
  import { TypeDefinition } from "@stryke/types/configuration";
4
3
  import { ReflectionClass } from "@powerlines/deepkit/vendor/type";
4
+ import { Context, UnresolvedContext } from "powerlines/types/context";
5
5
 
6
6
  //#region src/helpers/persistence.d.ts
7
7
 
@@ -1,6 +1,6 @@
1
- import { Context, UnresolvedContext } from "../powerlines/src/types/context.mjs";
2
1
  import { EnvPluginContext, EnvPluginResolvedConfig, EnvType } from "../types/plugin.mjs";
3
2
  import { ReflectionClass } from "@powerlines/deepkit/vendor/type";
3
+ import { Context, UnresolvedContext } from "powerlines/types/context";
4
4
  import { TypeDefinition } from "@stryke/types/configuration";
5
5
 
6
6
  //#region src/helpers/persistence.d.ts
@@ -1,7 +1,7 @@
1
1
  import { __ΩEnvPluginContext, __ΩEnvPluginResolvedConfig, __ΩEnvType } from "../types/plugin.mjs";
2
- import { __ΩContext, __ΩUnresolvedContext } from "../powerlines/src/types/context.mjs";
3
2
  import { createEnvReflection } from "./reflect.mjs";
4
3
  import { ReflectionClass, ReflectionKind, deserializeType, resolveClassType } from "@powerlines/deepkit/vendor/type";
4
+ import { __ΩContext, __ΩUnresolvedContext } from "powerlines/types/context";
5
5
  import { convertFromCapnp, convertToCapnp } from "@powerlines/deepkit/capnp";
6
6
  import { getReflectionsPath } from "@powerlines/deepkit/resolve-reflections";
7
7
  import { SerializedTypes } from "@powerlines/deepkit/schemas/reflection";
package/dist/index.d.cts CHANGED
@@ -1,4 +1,3 @@
1
- import { Plugin } from "./powerlines/src/types/plugin.cjs";
2
1
  import { EnvInterface, SecretsInterface, __ΩEnvInterface, __ΩSecretsInterface } from "./types/runtime.cjs";
3
2
  import { EnvPluginContext, EnvPluginOptions, EnvPluginResolvedConfig, EnvPluginUserConfig, EnvType, __ΩEnvPluginContext, __ΩEnvPluginOptions, __ΩEnvPluginResolvedConfig, __ΩEnvPluginUserConfig, __ΩEnvType } from "./types/plugin.cjs";
4
3
  import { EnvDocsFile, EnvDocsFileProps, __ΩEnvDocsFileProps } from "./components/docs.cjs";
@@ -14,6 +13,7 @@ import "./helpers/index.cjs";
14
13
  import "./types/index.cjs";
15
14
  import { envBabelPlugin } from "./babel/plugin.cjs";
16
15
  import "./babel/index.cjs";
16
+ import { Plugin } from "powerlines/types/plugin";
17
17
 
18
18
  //#region src/index.d.ts
19
19
  /**
package/dist/index.d.mts CHANGED
@@ -1,4 +1,3 @@
1
- import { Plugin } from "./powerlines/src/types/plugin.mjs";
2
1
  import { EnvInterface, SecretsInterface, __ΩEnvInterface, __ΩSecretsInterface } from "./types/runtime.mjs";
3
2
  import { EnvPluginContext, EnvPluginOptions, EnvPluginResolvedConfig, EnvPluginUserConfig, EnvType, __ΩEnvPluginContext, __ΩEnvPluginOptions, __ΩEnvPluginResolvedConfig, __ΩEnvPluginUserConfig, __ΩEnvType } from "./types/plugin.mjs";
4
3
  import { EnvDocsFile, EnvDocsFileProps, __ΩEnvDocsFileProps } from "./components/docs.mjs";
@@ -14,6 +13,7 @@ import "./helpers/index.mjs";
14
13
  import "./types/index.mjs";
15
14
  import { envBabelPlugin } from "./babel/plugin.mjs";
16
15
  import "./babel/index.mjs";
16
+ import { Plugin } from "powerlines/types/plugin";
17
17
 
18
18
  //#region src/index.d.ts
19
19
  /**
@@ -1,11 +1,11 @@
1
1
  import { EnvInterface, SecretsInterface } from "./runtime.cjs";
2
- import { DotenvConfiguration, TypeDefinition, TypeDefinitionParameter } from "@stryke/types/configuration";
3
2
  import { Children } from "@alloy-js/core";
4
3
  import { Reflection } from "@powerlines/deepkit/types";
5
4
  import { AlloyPluginContext, AlloyPluginOptions, AlloyPluginResolvedConfig, AlloyPluginUserConfig } from "@powerlines/plugin-alloy/types";
6
5
  import { AutoMDPluginOptions } from "@powerlines/plugin-automd/types/plugin";
7
6
  import { BabelPluginContext, BabelPluginOptions, BabelPluginResolvedConfig, BabelPluginUserConfig } from "@powerlines/plugin-babel/types";
8
7
  import { DotenvParseOutput } from "@stryke/env/types";
8
+ import { DotenvConfiguration, TypeDefinition, TypeDefinitionParameter } from "@stryke/types/configuration";
9
9
 
10
10
  //#region src/types/plugin.d.ts
11
11
  type EnvType = "env" | "secrets";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-env",
3
- "version": "0.15.135",
3
+ "version": "0.15.136",
4
4
  "type": "module",
5
5
  "description": "A package containing a Powerlines plugin for injecting static .env configuration values to the code so that they're accessible at runtime.",
6
6
  "repository": {
@@ -130,10 +130,10 @@
130
130
  "@alloy-js/typescript": "^0.22.0",
131
131
  "@babel/core": "^7.28.6",
132
132
  "@babel/types": "^7.28.6",
133
- "@powerlines/plugin-alloy": "^0.19.7",
134
- "@powerlines/plugin-automd": "^0.1.232",
135
- "@powerlines/plugin-babel": "^0.12.241",
136
- "@powerlines/plugin-plugin": "^0.12.183",
133
+ "@powerlines/plugin-alloy": "^0.19.8",
134
+ "@powerlines/plugin-automd": "^0.1.233",
135
+ "@powerlines/plugin-babel": "^0.12.242",
136
+ "@powerlines/plugin-plugin": "^0.12.184",
137
137
  "@storm-software/config-tools": "^1.189.0",
138
138
  "@stryke/capnp": "^0.12.63",
139
139
  "@stryke/env": "^0.20.55",
@@ -147,11 +147,11 @@
147
147
  },
148
148
  "devDependencies": {
149
149
  "@powerlines/deepkit": "^0.6.13",
150
- "@powerlines/plugin-deepkit": "^0.11.111",
150
+ "@powerlines/plugin-deepkit": "^0.11.112",
151
151
  "@types/node": "^24.10.9",
152
152
  "vite": "8.0.0-beta.2"
153
153
  },
154
154
  "publishConfig": { "access": "public" },
155
155
  "types": "./dist/index.d.cts",
156
- "gitHead": "2b025c75ca3472c6d322f6576f47ed70184abb1f"
156
+ "gitHead": "8a8bee34b0195608f4e45380ea3bcf33b9da18d7"
157
157
  }
@@ -1,47 +0,0 @@
1
- import { SelectHooksOptions } from "../../types/context.cjs";
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,49 +0,0 @@
1
- import "../../types/hooks.mjs";
2
- import "../../types/resolved.mjs";
3
- import { SelectHooksOptions } from "../../types/context.mjs";
4
- import { MaybePromise } from "@stryke/types/base";
5
-
6
- //#region ../powerlines/src/internal/helpers/hooks.d.ts
7
- type CallHookOptions = SelectHooksOptions & (({
8
- /**
9
- * Whether to call the hooks sequentially or in parallel.
10
- *
11
- * @defaultValue true
12
- */
13
- sequential?: true;
14
- } & ({
15
- /**
16
- * How to handle multiple return values from hooks.
17
- * - "merge": Merge all non-undefined return values (if they are objects).
18
- * - "first": Return the first non-undefined value.
19
- *
20
- * @remarks
21
- * Merging only works if the return values are objects.
22
- *
23
- * @defaultValue "merge"
24
- */
25
- result: "first";
26
- } | {
27
- /**
28
- * How to handle multiple return values from hooks.
29
- * - "merge": Merge all non-undefined return values (if they are objects).
30
- * - "first": Return the first non-undefined value.
31
- *
32
- * @remarks
33
- * Merging only works if the return values are objects.
34
- *
35
- * @defaultValue "merge"
36
- */
37
- result?: "merge" | "last";
38
- /**
39
- * 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
40
- */
41
- asNextParam?: false | ((previousResult: any) => MaybePromise<any>);
42
- })) | {
43
- /**
44
- * Whether to call the hooks sequentially or in parallel.
45
- */
46
- sequential: false;
47
- });
48
- //#endregion
49
- export { CallHookOptions };
@@ -1,6 +0,0 @@
1
-
2
- //#region ../powerlines/src/lib/constants/environments.ts
3
- const DEFAULT_ENVIRONMENT = "default";
4
-
5
- //#endregion
6
- exports.DEFAULT_ENVIRONMENT = DEFAULT_ENVIRONMENT;
@@ -1,5 +0,0 @@
1
- //#region ../powerlines/src/lib/constants/environments.ts
2
- const DEFAULT_ENVIRONMENT = "default";
3
-
4
- //#endregion
5
- export { DEFAULT_ENVIRONMENT };
@@ -1,104 +0,0 @@
1
- import { BuildInlineConfig, CleanInlineConfig, DeployInlineConfig, DocsInlineConfig, LintInlineConfig, NewInlineConfig, PrepareInlineConfig } from "./config.cjs";
2
- import { InferHookParameters, InferHookReturnType } from "./hooks.cjs";
3
- import { ResolvedConfig } from "./resolved.cjs";
4
- import { APIContext, EnvironmentContext, PluginContext } from "./context.cjs";
5
- import { CallHookOptions } from "../internal/helpers/hooks.cjs";
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 };
@@ -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 };
@@ -1,11 +0,0 @@
1
-
2
- //#region ../powerlines/src/types/babel.ts
3
- const __ΩBabelPluginPass = [
4
- "TState",
5
- "PluginPass",
6
- "BabelPluginPass",
7
- "#c!P\"w\"e\"!Kw#y"
8
- ];
9
-
10
- //#endregion
11
- exports.__ΩBabelPluginPass = __ΩBabelPluginPass;