@powerlines/nx 0.1.0

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 (128) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +490 -0
  3. package/dist/chunk-23KFTIT2.mjs +1 -0
  4. package/dist/chunk-2IKNOV7W.mjs +305 -0
  5. package/dist/chunk-326QB2VK.mjs +14 -0
  6. package/dist/chunk-3QPPK4K2.js +18 -0
  7. package/dist/chunk-5K7DMFAV.mjs +15 -0
  8. package/dist/chunk-6UG6SXHV.js +4307 -0
  9. package/dist/chunk-6ZABD5GY.js +18 -0
  10. package/dist/chunk-AKX3TTDA.js +18 -0
  11. package/dist/chunk-CQP2LCFV.mjs +19 -0
  12. package/dist/chunk-CYWOTYVX.mjs +108 -0
  13. package/dist/chunk-E6VIOC6R.mjs +19 -0
  14. package/dist/chunk-ED7GH5H4.js +30 -0
  15. package/dist/chunk-ESI25Y6Y.mjs +15 -0
  16. package/dist/chunk-FK3VJFET.mjs +28 -0
  17. package/dist/chunk-FXCIWWXO.mjs +15 -0
  18. package/dist/chunk-HHPODCTP.js +126 -0
  19. package/dist/chunk-N2YKXZ5R.js +2 -0
  20. package/dist/chunk-O6BSKBJP.js +26 -0
  21. package/dist/chunk-O6YSETKJ.mjs +4 -0
  22. package/dist/chunk-OOERKIVS.js +312 -0
  23. package/dist/chunk-OZMYXUES.mjs +4276 -0
  24. package/dist/chunk-SHUYVCID.js +6 -0
  25. package/dist/chunk-TCSCYVA7.mjs +76 -0
  26. package/dist/chunk-UV4HQO3Y.mjs +1 -0
  27. package/dist/chunk-WKH7IEJU.js +26 -0
  28. package/dist/chunk-WUJKJGEW.js +17 -0
  29. package/dist/chunk-XO62WWX4.js +2 -0
  30. package/dist/chunk-XPEFTYN7.js +82 -0
  31. package/dist/executor-B2Y0F4JC.d.ts +83 -0
  32. package/dist/executor-BAcpDLQu.d.ts +83 -0
  33. package/dist/executor-BHIUeaip.d.ts +93 -0
  34. package/dist/executor-BYGMOBlU.d.mts +83 -0
  35. package/dist/executor-Ba95I3EK.d.mts +93 -0
  36. package/dist/executor-CIEyQL42.d.mts +83 -0
  37. package/dist/executor-CkqLFUNx.d.ts +83 -0
  38. package/dist/executor-D055lNr2.d.ts +83 -0
  39. package/dist/executor-D0PJOQkn.d.mts +83 -0
  40. package/dist/executor-DsRaA9mk.d.mts +83 -0
  41. package/dist/executors.d.mts +12 -0
  42. package/dist/executors.d.ts +12 -0
  43. package/dist/executors.js +34 -0
  44. package/dist/executors.mjs +9 -0
  45. package/dist/generators.d.mts +19 -0
  46. package/dist/generators.d.ts +19 -0
  47. package/dist/generators.js +16 -0
  48. package/dist/generators.mjs +3 -0
  49. package/dist/index.d.mts +16 -0
  50. package/dist/index.d.ts +16 -0
  51. package/dist/index.js +53 -0
  52. package/dist/index.mjs +12 -0
  53. package/dist/src/base/base-executor.d.mts +27 -0
  54. package/dist/src/base/base-executor.d.ts +27 -0
  55. package/dist/src/base/base-executor.js +12 -0
  56. package/dist/src/base/base-executor.mjs +3 -0
  57. package/dist/src/base/base-executor.schema.d.d.mts +75 -0
  58. package/dist/src/base/base-executor.schema.d.d.ts +75 -0
  59. package/dist/src/base/base-executor.schema.d.js +2 -0
  60. package/dist/src/base/base-executor.schema.d.mjs +1 -0
  61. package/dist/src/base/base-executor.schema.d.ts +75 -0
  62. package/dist/src/base/base-executor.schema.json +77 -0
  63. package/dist/src/base/base-executor.untyped.d.mts +5 -0
  64. package/dist/src/base/base-executor.untyped.d.ts +5 -0
  65. package/dist/src/base/base-executor.untyped.js +10 -0
  66. package/dist/src/base/base-executor.untyped.mjs +2 -0
  67. package/dist/src/executors/build/executor.d.mts +8 -0
  68. package/dist/src/executors/build/executor.d.ts +8 -0
  69. package/dist/src/executors/build/executor.js +19 -0
  70. package/dist/src/executors/build/executor.mjs +4 -0
  71. package/dist/src/executors/build/untyped.d.mts +5 -0
  72. package/dist/src/executors/build/untyped.d.ts +5 -0
  73. package/dist/src/executors/build/untyped.js +37 -0
  74. package/dist/src/executors/build/untyped.mjs +33 -0
  75. package/dist/src/executors/clean/executor.d.mts +8 -0
  76. package/dist/src/executors/clean/executor.d.ts +8 -0
  77. package/dist/src/executors/clean/executor.js +19 -0
  78. package/dist/src/executors/clean/executor.mjs +4 -0
  79. package/dist/src/executors/clean/untyped.d.mts +5 -0
  80. package/dist/src/executors/clean/untyped.d.ts +5 -0
  81. package/dist/src/executors/clean/untyped.js +19 -0
  82. package/dist/src/executors/clean/untyped.mjs +15 -0
  83. package/dist/src/executors/docs/executor.d.mts +8 -0
  84. package/dist/src/executors/docs/executor.d.ts +8 -0
  85. package/dist/src/executors/docs/executor.js +19 -0
  86. package/dist/src/executors/docs/executor.mjs +4 -0
  87. package/dist/src/executors/docs/untyped.d.mts +5 -0
  88. package/dist/src/executors/docs/untyped.d.ts +5 -0
  89. package/dist/src/executors/docs/untyped.js +20 -0
  90. package/dist/src/executors/docs/untyped.mjs +16 -0
  91. package/dist/src/executors/lint/executor.d.mts +8 -0
  92. package/dist/src/executors/lint/executor.d.ts +8 -0
  93. package/dist/src/executors/lint/executor.js +19 -0
  94. package/dist/src/executors/lint/executor.mjs +4 -0
  95. package/dist/src/executors/lint/untyped.d.mts +5 -0
  96. package/dist/src/executors/lint/untyped.d.ts +5 -0
  97. package/dist/src/executors/lint/untyped.js +20 -0
  98. package/dist/src/executors/lint/untyped.mjs +16 -0
  99. package/dist/src/executors/prepare/executor.d.mts +8 -0
  100. package/dist/src/executors/prepare/executor.d.ts +8 -0
  101. package/dist/src/executors/prepare/executor.js +19 -0
  102. package/dist/src/executors/prepare/executor.mjs +4 -0
  103. package/dist/src/executors/prepare/untyped.d.mts +5 -0
  104. package/dist/src/executors/prepare/untyped.d.ts +5 -0
  105. package/dist/src/executors/prepare/untyped.js +11 -0
  106. package/dist/src/executors/prepare/untyped.mjs +3 -0
  107. package/dist/src/generators/sync/generator.d.mts +6 -0
  108. package/dist/src/generators/sync/generator.d.ts +6 -0
  109. package/dist/src/generators/sync/generator.js +17 -0
  110. package/dist/src/generators/sync/generator.mjs +2 -0
  111. package/dist/src/generators/sync/untyped.d.mts +5 -0
  112. package/dist/src/generators/sync/untyped.d.ts +5 -0
  113. package/dist/src/generators/sync/untyped.js +25 -0
  114. package/dist/src/generators/sync/untyped.mjs +21 -0
  115. package/dist/src/plugin/index.d.mts +8 -0
  116. package/dist/src/plugin/index.d.ts +8 -0
  117. package/dist/src/plugin/index.js +16 -0
  118. package/dist/src/plugin/index.mjs +3 -0
  119. package/docs/api/base-executor.schema.md +72 -0
  120. package/docs/api/build/schema.md +82 -0
  121. package/docs/api/clean/schema.md +72 -0
  122. package/docs/api/docs/schema.md +72 -0
  123. package/docs/api/lint/schema.md +72 -0
  124. package/docs/api/prepare/schema.md +72 -0
  125. package/docs/api/sync/schema.md +16 -0
  126. package/executors.json +30 -0
  127. package/generators.json +14 -0
  128. package/package.json +172 -0
@@ -0,0 +1,18 @@
1
+ 'use strict';
2
+
3
+ var chunk6UG6SXHV_js = require('./chunk-6UG6SXHV.js');
4
+ var chunkSHUYVCID_js = require('./chunk-SHUYVCID.js');
5
+
6
+ // src/executors/clean/executor.ts
7
+ async function executorFn(context, api) {
8
+ await api.clean(context.inlineConfig);
9
+ return {
10
+ success: true
11
+ };
12
+ }
13
+ chunkSHUYVCID_js.__name(executorFn, "executorFn");
14
+ var executor = chunk6UG6SXHV_js.withExecutor("clean", executorFn);
15
+ var executor_default = executor;
16
+
17
+ exports.executorFn = executorFn;
18
+ exports.executor_default = executor_default;
@@ -0,0 +1,18 @@
1
+ 'use strict';
2
+
3
+ var chunk6UG6SXHV_js = require('./chunk-6UG6SXHV.js');
4
+ var chunkSHUYVCID_js = require('./chunk-SHUYVCID.js');
5
+
6
+ // src/executors/docs/executor.ts
7
+ async function executorFn(context, api) {
8
+ await api.docs(context.inlineConfig);
9
+ return {
10
+ success: true
11
+ };
12
+ }
13
+ chunkSHUYVCID_js.__name(executorFn, "executorFn");
14
+ var executor = chunk6UG6SXHV_js.withExecutor("docs", executorFn);
15
+ var executor_default = executor;
16
+
17
+ exports.executorFn = executorFn;
18
+ exports.executor_default = executor_default;
@@ -0,0 +1,19 @@
1
+ import { withExecutor } from './chunk-OZMYXUES.mjs';
2
+ import { __name } from './chunk-O6YSETKJ.mjs';
3
+ import defu from 'defu';
4
+
5
+ async function executorFn(context, api) {
6
+ await api.prepare(defu({
7
+ command: "prepare",
8
+ skipCache: context.options.skipCache,
9
+ skipInstalls: context.options.skipInstalls
10
+ }, context.inlineConfig));
11
+ return {
12
+ success: true
13
+ };
14
+ }
15
+ __name(executorFn, "executorFn");
16
+ var executor = withExecutor("prepare", executorFn);
17
+ var executor_default = executor;
18
+
19
+ export { executorFn, executor_default };
@@ -0,0 +1,108 @@
1
+ import { __name } from './chunk-O6YSETKJ.mjs';
2
+ import { LogLevelLabel } from '@storm-software/config-tools/types';
3
+ import { existsSync } from '@stryke/fs/exists';
4
+ import '@stryke/fs/json';
5
+ import '@stryke/fs/list-files';
6
+ import '@stryke/fs/remove-file';
7
+ import { hashDirectory } from '@stryke/hash/hash-files';
8
+ import '@stryke/helpers/get-unique';
9
+ import '@stryke/path/file-path-fns';
10
+ import { joinPaths } from '@stryke/path/join-paths';
11
+ import { kebabCase } from '@stryke/string-format/kebab-case';
12
+ import { getWorkspaceConfig } from '@storm-software/config-tools/get-config';
13
+ import { isFunction } from '@stryke/type-checks/is-function';
14
+ import { isSetObject } from '@stryke/type-checks/is-set-object';
15
+ import { loadConfig } from 'c12';
16
+ import defu from 'defu';
17
+
18
+ // ../powerlines/src/types/vfs.ts
19
+ var __VFS_INIT__ = "__VFS_INIT__";
20
+ var __VFS_REVERT__ = "__VFS_REVERT__";
21
+ var __VFS_CACHE__ = "__VFS_CACHE__";
22
+ var __VFS_RESOLVER__ = "__VFS_RESOLVER__";
23
+ var __VFS_VIRTUAL__ = "__VFS_VIRTUAL__";
24
+ var __VFS_UNIFIED__ = "__VFS_UNIFIED__";
25
+
26
+ // ../powerlines/src/lib/utilities/meta.ts
27
+ var PROJECT_ROOT_HASH_LENGTH = 45;
28
+ var CACHE_HASH_LENGTH = 62;
29
+ function getPrefixedProjectRootHash(name, projectRootHash) {
30
+ const combined = `${kebabCase(name)}_${projectRootHash}`;
31
+ return combined.length > PROJECT_ROOT_HASH_LENGTH ? combined.slice(0, PROJECT_ROOT_HASH_LENGTH) : combined;
32
+ }
33
+ __name(getPrefixedProjectRootHash, "getPrefixedProjectRootHash");
34
+ async function getChecksum(path) {
35
+ return hashDirectory(path, {
36
+ ignore: [
37
+ "node_modules",
38
+ ".git",
39
+ ".nx",
40
+ ".cache",
41
+ ".storm",
42
+ "tmp",
43
+ "dist"
44
+ ]
45
+ });
46
+ }
47
+ __name(getChecksum, "getChecksum");
48
+ async function writeMetaFile(context) {
49
+ const metaFilePath = joinPaths(context.dataPath, "meta.json");
50
+ context.log(LogLevelLabel.DEBUG, `Writing runtime metadata to ${metaFilePath}`);
51
+ await context.fs.writeFileToDisk(metaFilePath, JSON.stringify({
52
+ ...context.meta,
53
+ builtinIdMap: Object.fromEntries(context.fs.builtinIdMap.entries()),
54
+ virtualFiles: context.fs[__VFS_VIRTUAL__].toJSON(context.artifactsPath)
55
+ }, null, 2));
56
+ }
57
+ __name(writeMetaFile, "writeMetaFile");
58
+ async function loadWorkspaceConfig(workspaceRoot, cwd) {
59
+ return defu({
60
+ workspaceRoot
61
+ }, await getWorkspaceConfig(true, {
62
+ cwd,
63
+ workspaceRoot,
64
+ useDefault: true
65
+ }));
66
+ }
67
+ __name(loadWorkspaceConfig, "loadWorkspaceConfig");
68
+ async function loadUserConfigFile(projectRoot, jiti, command, mode, configFile) {
69
+ let resolvedUserConfig = {};
70
+ const resolvedUserConfigFile = configFile && existsSync(configFile) ? configFile : configFile && existsSync(joinPaths(projectRoot, configFile)) ? joinPaths(projectRoot, configFile) : existsSync(joinPaths(projectRoot, "powerlines.config.ts")) ? joinPaths(projectRoot, "powerlines.config.ts") : existsSync(joinPaths(projectRoot, "powerlines.config.js")) ? joinPaths(projectRoot, "powerlines.config.js") : existsSync(joinPaths(projectRoot, "powerlines.config.mts")) ? joinPaths(projectRoot, "powerlines.config.mts") : existsSync(joinPaths(projectRoot, "powerlines.config.mjs")) ? joinPaths(projectRoot, "powerlines.config.mjs") : void 0;
71
+ if (resolvedUserConfigFile) {
72
+ const resolved = await jiti.import(jiti.esmResolve(resolvedUserConfigFile));
73
+ if (resolved) {
74
+ let config = {};
75
+ if (isFunction(resolved)) {
76
+ config = await Promise.resolve(resolved({
77
+ command,
78
+ mode: mode || "production",
79
+ isSsrBuild: false,
80
+ isPreview: false
81
+ }));
82
+ }
83
+ if (isSetObject(config)) {
84
+ resolvedUserConfig = {
85
+ ...config,
86
+ config,
87
+ configFile: resolvedUserConfigFile
88
+ };
89
+ }
90
+ }
91
+ }
92
+ const result = await loadConfig({
93
+ cwd: projectRoot,
94
+ name: "powerlines",
95
+ envName: mode,
96
+ globalRc: true,
97
+ packageJson: true,
98
+ dotenv: true,
99
+ jiti
100
+ });
101
+ return defu(resolvedUserConfig, isSetObject(result?.config) ? {
102
+ ...result.config,
103
+ ...result
104
+ } : {});
105
+ }
106
+ __name(loadUserConfigFile, "loadUserConfigFile");
107
+
108
+ export { CACHE_HASH_LENGTH, PROJECT_ROOT_HASH_LENGTH, __VFS_CACHE__, __VFS_INIT__, __VFS_RESOLVER__, __VFS_REVERT__, __VFS_UNIFIED__, __VFS_VIRTUAL__, getChecksum, getPrefixedProjectRootHash, loadUserConfigFile, loadWorkspaceConfig, writeMetaFile };
@@ -0,0 +1,19 @@
1
+ import { withExecutor } from './chunk-OZMYXUES.mjs';
2
+ import { __name } from './chunk-O6YSETKJ.mjs';
3
+ import defu from 'defu';
4
+
5
+ async function executorFn(context, api) {
6
+ await api.build(defu({
7
+ entry: context.options.entry,
8
+ skipCache: context.options.skipCache,
9
+ mode: context.options.mode
10
+ }, context.inlineConfig));
11
+ return {
12
+ success: true
13
+ };
14
+ }
15
+ __name(executorFn, "executorFn");
16
+ var executor = withExecutor("build", executorFn);
17
+ var executor_default = executor;
18
+
19
+ export { executorFn, executor_default };
@@ -0,0 +1,30 @@
1
+ 'use strict';
2
+
3
+ var chunkXPEFTYN7_js = require('./chunk-XPEFTYN7.js');
4
+ var untyped = require('untyped');
5
+
6
+ var untyped_default = untyped.defineUntypedSchema({
7
+ ...chunkXPEFTYN7_js.base_executor_untyped_default,
8
+ $schema: {
9
+ id: "PrepareExecutorSchema",
10
+ title: "Prepare Executor",
11
+ description: "A type definition for the Powerlines - Prepare executor schema",
12
+ required: []
13
+ },
14
+ skipCache: {
15
+ $schema: {
16
+ title: "Skip Cache",
17
+ type: "boolean",
18
+ description: "Skip the cache when building"
19
+ }
20
+ },
21
+ skipInstalls: {
22
+ $schema: {
23
+ title: "Skip Installs",
24
+ type: "boolean",
25
+ description: "Skip installing dependencies before building"
26
+ }
27
+ }
28
+ });
29
+
30
+ exports.untyped_default = untyped_default;
@@ -0,0 +1,15 @@
1
+ import { withExecutor } from './chunk-OZMYXUES.mjs';
2
+ import { __name } from './chunk-O6YSETKJ.mjs';
3
+
4
+ // src/executors/lint/executor.ts
5
+ async function executorFn(context, api) {
6
+ await api.lint(context.inlineConfig);
7
+ return {
8
+ success: true
9
+ };
10
+ }
11
+ __name(executorFn, "executorFn");
12
+ var executor = withExecutor("lint", executorFn);
13
+ var executor_default = executor;
14
+
15
+ export { executorFn, executor_default };
@@ -0,0 +1,28 @@
1
+ import { base_executor_untyped_default } from './chunk-TCSCYVA7.mjs';
2
+ import { defineUntypedSchema } from 'untyped';
3
+
4
+ var untyped_default = defineUntypedSchema({
5
+ ...base_executor_untyped_default,
6
+ $schema: {
7
+ id: "PrepareExecutorSchema",
8
+ title: "Prepare Executor",
9
+ description: "A type definition for the Powerlines - Prepare executor schema",
10
+ required: []
11
+ },
12
+ skipCache: {
13
+ $schema: {
14
+ title: "Skip Cache",
15
+ type: "boolean",
16
+ description: "Skip the cache when building"
17
+ }
18
+ },
19
+ skipInstalls: {
20
+ $schema: {
21
+ title: "Skip Installs",
22
+ type: "boolean",
23
+ description: "Skip installing dependencies before building"
24
+ }
25
+ }
26
+ });
27
+
28
+ export { untyped_default };
@@ -0,0 +1,15 @@
1
+ import { withExecutor } from './chunk-OZMYXUES.mjs';
2
+ import { __name } from './chunk-O6YSETKJ.mjs';
3
+
4
+ // src/executors/docs/executor.ts
5
+ async function executorFn(context, api) {
6
+ await api.docs(context.inlineConfig);
7
+ return {
8
+ success: true
9
+ };
10
+ }
11
+ __name(executorFn, "executorFn");
12
+ var executor = withExecutor("docs", executorFn);
13
+ var executor_default = executor;
14
+
15
+ export { executorFn, executor_default };
@@ -0,0 +1,126 @@
1
+ 'use strict';
2
+
3
+ var chunkSHUYVCID_js = require('./chunk-SHUYVCID.js');
4
+ var types = require('@storm-software/config-tools/types');
5
+ var exists = require('@stryke/fs/exists');
6
+ require('@stryke/fs/json');
7
+ require('@stryke/fs/list-files');
8
+ require('@stryke/fs/remove-file');
9
+ var hashFiles = require('@stryke/hash/hash-files');
10
+ require('@stryke/helpers/get-unique');
11
+ require('@stryke/path/file-path-fns');
12
+ var joinPaths = require('@stryke/path/join-paths');
13
+ var kebabCase = require('@stryke/string-format/kebab-case');
14
+ var getConfig = require('@storm-software/config-tools/get-config');
15
+ var isFunction = require('@stryke/type-checks/is-function');
16
+ var isSetObject = require('@stryke/type-checks/is-set-object');
17
+ var c12 = require('c12');
18
+ var defu = require('defu');
19
+
20
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
21
+
22
+ var defu__default = /*#__PURE__*/_interopDefault(defu);
23
+
24
+ // ../powerlines/src/types/vfs.ts
25
+ var __VFS_INIT__ = "__VFS_INIT__";
26
+ var __VFS_REVERT__ = "__VFS_REVERT__";
27
+ var __VFS_CACHE__ = "__VFS_CACHE__";
28
+ var __VFS_RESOLVER__ = "__VFS_RESOLVER__";
29
+ var __VFS_VIRTUAL__ = "__VFS_VIRTUAL__";
30
+ var __VFS_UNIFIED__ = "__VFS_UNIFIED__";
31
+
32
+ // ../powerlines/src/lib/utilities/meta.ts
33
+ var PROJECT_ROOT_HASH_LENGTH = 45;
34
+ var CACHE_HASH_LENGTH = 62;
35
+ function getPrefixedProjectRootHash(name, projectRootHash) {
36
+ const combined = `${kebabCase.kebabCase(name)}_${projectRootHash}`;
37
+ return combined.length > PROJECT_ROOT_HASH_LENGTH ? combined.slice(0, PROJECT_ROOT_HASH_LENGTH) : combined;
38
+ }
39
+ chunkSHUYVCID_js.__name(getPrefixedProjectRootHash, "getPrefixedProjectRootHash");
40
+ async function getChecksum(path) {
41
+ return hashFiles.hashDirectory(path, {
42
+ ignore: [
43
+ "node_modules",
44
+ ".git",
45
+ ".nx",
46
+ ".cache",
47
+ ".storm",
48
+ "tmp",
49
+ "dist"
50
+ ]
51
+ });
52
+ }
53
+ chunkSHUYVCID_js.__name(getChecksum, "getChecksum");
54
+ async function writeMetaFile(context) {
55
+ const metaFilePath = joinPaths.joinPaths(context.dataPath, "meta.json");
56
+ context.log(types.LogLevelLabel.DEBUG, `Writing runtime metadata to ${metaFilePath}`);
57
+ await context.fs.writeFileToDisk(metaFilePath, JSON.stringify({
58
+ ...context.meta,
59
+ builtinIdMap: Object.fromEntries(context.fs.builtinIdMap.entries()),
60
+ virtualFiles: context.fs[__VFS_VIRTUAL__].toJSON(context.artifactsPath)
61
+ }, null, 2));
62
+ }
63
+ chunkSHUYVCID_js.__name(writeMetaFile, "writeMetaFile");
64
+ async function loadWorkspaceConfig(workspaceRoot, cwd) {
65
+ return defu__default.default({
66
+ workspaceRoot
67
+ }, await getConfig.getWorkspaceConfig(true, {
68
+ cwd,
69
+ workspaceRoot,
70
+ useDefault: true
71
+ }));
72
+ }
73
+ chunkSHUYVCID_js.__name(loadWorkspaceConfig, "loadWorkspaceConfig");
74
+ async function loadUserConfigFile(projectRoot, jiti, command, mode, configFile) {
75
+ let resolvedUserConfig = {};
76
+ const resolvedUserConfigFile = configFile && exists.existsSync(configFile) ? configFile : configFile && exists.existsSync(joinPaths.joinPaths(projectRoot, configFile)) ? joinPaths.joinPaths(projectRoot, configFile) : exists.existsSync(joinPaths.joinPaths(projectRoot, "powerlines.config.ts")) ? joinPaths.joinPaths(projectRoot, "powerlines.config.ts") : exists.existsSync(joinPaths.joinPaths(projectRoot, "powerlines.config.js")) ? joinPaths.joinPaths(projectRoot, "powerlines.config.js") : exists.existsSync(joinPaths.joinPaths(projectRoot, "powerlines.config.mts")) ? joinPaths.joinPaths(projectRoot, "powerlines.config.mts") : exists.existsSync(joinPaths.joinPaths(projectRoot, "powerlines.config.mjs")) ? joinPaths.joinPaths(projectRoot, "powerlines.config.mjs") : void 0;
77
+ if (resolvedUserConfigFile) {
78
+ const resolved = await jiti.import(jiti.esmResolve(resolvedUserConfigFile));
79
+ if (resolved) {
80
+ let config = {};
81
+ if (isFunction.isFunction(resolved)) {
82
+ config = await Promise.resolve(resolved({
83
+ command,
84
+ mode: mode || "production",
85
+ isSsrBuild: false,
86
+ isPreview: false
87
+ }));
88
+ }
89
+ if (isSetObject.isSetObject(config)) {
90
+ resolvedUserConfig = {
91
+ ...config,
92
+ config,
93
+ configFile: resolvedUserConfigFile
94
+ };
95
+ }
96
+ }
97
+ }
98
+ const result = await c12.loadConfig({
99
+ cwd: projectRoot,
100
+ name: "powerlines",
101
+ envName: mode,
102
+ globalRc: true,
103
+ packageJson: true,
104
+ dotenv: true,
105
+ jiti
106
+ });
107
+ return defu__default.default(resolvedUserConfig, isSetObject.isSetObject(result?.config) ? {
108
+ ...result.config,
109
+ ...result
110
+ } : {});
111
+ }
112
+ chunkSHUYVCID_js.__name(loadUserConfigFile, "loadUserConfigFile");
113
+
114
+ exports.CACHE_HASH_LENGTH = CACHE_HASH_LENGTH;
115
+ exports.PROJECT_ROOT_HASH_LENGTH = PROJECT_ROOT_HASH_LENGTH;
116
+ exports.__VFS_CACHE__ = __VFS_CACHE__;
117
+ exports.__VFS_INIT__ = __VFS_INIT__;
118
+ exports.__VFS_RESOLVER__ = __VFS_RESOLVER__;
119
+ exports.__VFS_REVERT__ = __VFS_REVERT__;
120
+ exports.__VFS_UNIFIED__ = __VFS_UNIFIED__;
121
+ exports.__VFS_VIRTUAL__ = __VFS_VIRTUAL__;
122
+ exports.getChecksum = getChecksum;
123
+ exports.getPrefixedProjectRootHash = getPrefixedProjectRootHash;
124
+ exports.loadUserConfigFile = loadUserConfigFile;
125
+ exports.loadWorkspaceConfig = loadWorkspaceConfig;
126
+ exports.writeMetaFile = writeMetaFile;
@@ -0,0 +1,2 @@
1
+ 'use strict';
2
+
@@ -0,0 +1,26 @@
1
+ 'use strict';
2
+
3
+ var chunk6UG6SXHV_js = require('./chunk-6UG6SXHV.js');
4
+ var chunkSHUYVCID_js = require('./chunk-SHUYVCID.js');
5
+ var defu = require('defu');
6
+
7
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
8
+
9
+ var defu__default = /*#__PURE__*/_interopDefault(defu);
10
+
11
+ async function executorFn(context, api) {
12
+ await api.build(defu__default.default({
13
+ entry: context.options.entry,
14
+ skipCache: context.options.skipCache,
15
+ mode: context.options.mode
16
+ }, context.inlineConfig));
17
+ return {
18
+ success: true
19
+ };
20
+ }
21
+ chunkSHUYVCID_js.__name(executorFn, "executorFn");
22
+ var executor = chunk6UG6SXHV_js.withExecutor("build", executorFn);
23
+ var executor_default = executor;
24
+
25
+ exports.executorFn = executorFn;
26
+ exports.executor_default = executor_default;
@@ -0,0 +1,4 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+
4
+ export { __name };