@powerlines/plugin-plugin 0.11.24 → 0.11.25

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.
@@ -6,9 +6,7 @@ var alloyBabelPreset = require('@alloy-js/babel-preset');
6
6
  var typescriptBabelPreset = require('@babel/preset-typescript');
7
7
  var types = require('@storm-software/config-tools/types');
8
8
  var tsup = require('@storm-software/tsup');
9
- var copyFile = require('@stryke/fs/copy-file');
10
9
  var stormJson = require('@stryke/json/storm-json');
11
- var append = require('@stryke/path/append');
12
10
  var isParentPath = require('@stryke/path/is-parent-path');
13
11
  var join = require('@stryke/path/join');
14
12
  var defu = require('defu');
@@ -45,7 +43,6 @@ const plugin = (options = {}) => {
45
43
  entry: ["src/**/*.ts", "src/**/*.tsx"],
46
44
  output: {
47
45
  dts: false,
48
- projectDistPath: "dist",
49
46
  format: ["cjs", "esm"]
50
47
  },
51
48
  build: {
@@ -65,9 +62,6 @@ const plugin = (options = {}) => {
65
62
  }
66
63
  await this.fs.writeFile(this.tsconfig.tsconfigFilePath, stormJson.StormJSON.stringify(this.tsconfig.tsconfigJson), { mode: "fs" });
67
64
  }
68
- if (this.config.output.projectDistPath) {
69
- this.config.build.override.outputPath = join.joinPaths(this.config.projectRoot, this.config.output.projectDistPath);
70
- }
71
65
  },
72
66
  async build() {
73
67
  await tsup.build(await tsup.resolveOptions(defu.defu({
@@ -99,14 +93,6 @@ const plugin = (options = {}) => {
99
93
  ]
100
94
  : []
101
95
  })));
102
- if (this.config.build.override.outputPath) {
103
- const sourcePath = append.appendPath(this.config.build.override.outputPath, this.workspaceConfig.workspaceRoot);
104
- const destinationPath = join.joinPaths(append.appendPath(this.config.output.outputPath, this.workspaceConfig.workspaceRoot), "dist");
105
- if (sourcePath !== destinationPath) {
106
- this.log(types.LogLevelLabel.INFO, `Copying build output files from project directory (${this.config.build.override.outputPath}) to output directory (${this.config.output.outputPath}).`);
107
- await copyFile.copyFiles({ input: sourcePath, glob: "**/*" }, destinationPath);
108
- }
109
- }
110
96
  }
111
97
  };
112
98
  };
package/dist/src/index.js CHANGED
@@ -2,9 +2,7 @@ import alloyBabelPreset from '@alloy-js/babel-preset';
2
2
  import typescriptBabelPreset from '@babel/preset-typescript';
3
3
  import { LogLevelLabel } from '@storm-software/config-tools/types';
4
4
  import { build, resolveOptions } from '@storm-software/tsup';
5
- import { copyFiles } from '@stryke/fs/copy-file';
6
5
  import { StormJSON } from '@stryke/json/storm-json';
7
- import { appendPath } from '@stryke/path/append';
8
6
  import { isParentPath } from '@stryke/path/is-parent-path';
9
7
  import { joinPaths } from '@stryke/path/join';
10
8
  import { defu } from 'defu';
@@ -41,7 +39,6 @@ const plugin = (options = {}) => {
41
39
  entry: ["src/**/*.ts", "src/**/*.tsx"],
42
40
  output: {
43
41
  dts: false,
44
- projectDistPath: "dist",
45
42
  format: ["cjs", "esm"]
46
43
  },
47
44
  build: {
@@ -61,9 +58,6 @@ const plugin = (options = {}) => {
61
58
  }
62
59
  await this.fs.writeFile(this.tsconfig.tsconfigFilePath, StormJSON.stringify(this.tsconfig.tsconfigJson), { mode: "fs" });
63
60
  }
64
- if (this.config.output.projectDistPath) {
65
- this.config.build.override.outputPath = joinPaths(this.config.projectRoot, this.config.output.projectDistPath);
66
- }
67
61
  },
68
62
  async build() {
69
63
  await build(await resolveOptions(defu({
@@ -95,14 +89,6 @@ const plugin = (options = {}) => {
95
89
  ]
96
90
  : []
97
91
  })));
98
- if (this.config.build.override.outputPath) {
99
- const sourcePath = appendPath(this.config.build.override.outputPath, this.workspaceConfig.workspaceRoot);
100
- const destinationPath = joinPaths(appendPath(this.config.output.outputPath, this.workspaceConfig.workspaceRoot), "dist");
101
- if (sourcePath !== destinationPath) {
102
- this.log(LogLevelLabel.INFO, `Copying build output files from project directory (${this.config.build.override.outputPath}) to output directory (${this.config.output.outputPath}).`);
103
- await copyFiles({ input: sourcePath, glob: "**/*" }, destinationPath);
104
- }
105
- }
106
92
  }
107
93
  };
108
94
  };
@@ -1,6 +1,6 @@
1
1
  import { PrintTreeOptions } from "@alloy-js/core";
2
2
  import { TsupBuildConfig, TsupResolvedBuildConfig } from "powerlines/types/build";
3
- import { OutputConfig, UserConfig } from "powerlines/types/config";
3
+ import { UserConfig } from "powerlines/types/config";
4
4
  import { PluginContext } from "powerlines/types/context";
5
5
  import { ResolvedConfig } from "powerlines/types/resolved";
6
6
  export type PluginPluginAlloyOptions = Partial<PrintTreeOptions> & {
@@ -28,24 +28,11 @@ export interface PluginPluginOptions {
28
28
  */
29
29
  alloy?: PluginPluginAlloyOptions | boolean;
30
30
  }
31
- export type PluginPluginOutputConfig = OutputConfig & {
32
- /**
33
- * The output directory path for the project build.
34
- *
35
- * @remarks
36
- * This path is used to determine where the built files will be placed after the build process completes. This will be used in scenarios where the monorepo uses TSConfig paths to link packages together.
37
- *
38
- * @defaultValue "dist"
39
- */
40
- projectDistPath: string;
41
- };
42
31
  export type PluginPluginUserConfig = UserConfig<TsupBuildConfig, TsupResolvedBuildConfig, "tsup"> & {
43
32
  alloy?: false | Partial<PluginPluginAlloyOptions>;
44
- output?: Partial<PluginPluginOutputConfig>;
45
33
  };
46
34
  export type PluginPluginResolvedConfig = ResolvedConfig<PluginPluginUserConfig> & {
47
35
  alloy: false | Required<PluginPluginAlloyOptions>;
48
- output: PluginPluginOutputConfig;
49
36
  };
50
37
  export type PluginPluginContext<TResolvedConfig extends PluginPluginResolvedConfig = PluginPluginResolvedConfig> = PluginContext<TResolvedConfig>;
51
38
  //# sourceMappingURL=plugin.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-plugin",
3
- "version": "0.11.24",
3
+ "version": "0.11.25",
4
4
  "type": "module",
5
5
  "description": "A package containing a Powerlines plugin to assist in developing other Powerlines plugins.",
6
6
  "repository": {
@@ -132,11 +132,11 @@
132
132
  "defu": "^6.1.4",
133
133
  "esbuild-plugin-babel": "^0.2.3",
134
134
  "jiti": "^2.6.1",
135
- "powerlines": "^0.22.1"
135
+ "powerlines": "^0.23.0"
136
136
  },
137
137
  "devDependencies": {
138
138
  "@alloy-js/rollup-plugin": "^0.1.0",
139
- "@powerlines/nx": "^0.10.16",
139
+ "@powerlines/nx": "^0.10.17",
140
140
  "@rollup/plugin-commonjs": "^28.0.9",
141
141
  "@rollup/plugin-node-resolve": "^16.0.3",
142
142
  "@types/babel__helper-plugin-utils": "^7.10.3",
@@ -146,5 +146,5 @@
146
146
  "rollup-plugin-typescript2": "^0.36.0"
147
147
  },
148
148
  "publishConfig": { "access": "public" },
149
- "gitHead": "781b9a5f57b9c64bf6e659316741b7c8a429445f"
149
+ "gitHead": "23422989bba3077bf428014fdf831229cc885967"
150
150
  }