powerlines 0.42.3 → 0.42.4

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.
@@ -72,7 +72,7 @@ import { setParseImpl } from "unplugin";
72
72
 
73
73
  //#region package.json
74
74
  var name = "powerlines";
75
- var version = "0.42.3";
75
+ var version = "0.42.4";
76
76
 
77
77
  //#endregion
78
78
  //#region src/_internal/helpers/generate-types.ts
@@ -1166,7 +1166,7 @@ var VirtualFileSystem = class VirtualFileSystem {
1166
1166
  ...this.#context.config.output.storage
1167
1167
  };
1168
1168
  this.#storage.virtual ??= new VirtualStorageAdapter(context, { base: "/_virtual" });
1169
- this.#storage[this.#context.config.output.publishPath] ??= new FileSystemStorageAdapter(context, { base: this.#context.config.output.publishPath });
1169
+ if (this.#context.config.output.publishPath) this.#storage[this.#context.config.output.publishPath] ??= new FileSystemStorageAdapter(context, { base: this.#context.config.output.publishPath });
1170
1170
  this.#storage[this.#context.config.output.path] ??= new FileSystemStorageAdapter(context, { base: this.#context.config.output.path });
1171
1171
  if (this.#context.config.output.storage !== "fs") {
1172
1172
  this.#storage[this.#context.artifactsPath] ??= new VirtualStorageAdapter(context, { base: this.#context.artifactsPath });
@@ -1758,12 +1758,15 @@ var PowerlinesContext = class PowerlinesContext {
1758
1758
  skipCache: config.skipCache,
1759
1759
  autoInstall: config.autoInstall,
1760
1760
  input: config.input,
1761
- output: config.output,
1762
1761
  plugins: config.plugins,
1763
1762
  mode: config.mode,
1764
1763
  resolve: config.resolve,
1765
1764
  framework: config.framework,
1766
- ...config
1765
+ ...config,
1766
+ output: {
1767
+ ...config.output ?? {},
1768
+ path: config.output?.path ? appendPath(config.output.path, config.root) : void 0
1769
+ }
1767
1770
  }, { output: config.framework ? {
1768
1771
  artifactsPath: `.${config.framework ?? "powerlines"}`,
1769
1772
  dts: true,
@@ -2572,7 +2575,8 @@ var PowerlinesContext = class PowerlinesContext {
2572
2575
  version: this.packageJson?.version,
2573
2576
  description: this.packageJson?.description,
2574
2577
  output: (0, plugin_utils_exports.mergeConfig)(config.output ?? {}, {
2575
- publishPath: cacheKey.root ? joinPaths$1(this.workspaceConfig?.directories?.build || "dist", cacheKey.root) : this.workspaceConfig?.directories?.build || "dist",
2578
+ path: cacheKey.root ? appendPath(joinPaths$1(cacheKey.root, "dist"), this.workspaceConfig?.workspaceRoot) : void 0,
2579
+ publishPath: this.workspaceConfig?.directories?.build && cacheKey.root ? appendPath(appendPath(cacheKey.root, this.workspaceConfig?.directories?.build || "dist"), this.workspaceConfig?.workspaceRoot) : cacheKey.root ? appendPath(appendPath(cacheKey.root, this.workspaceConfig?.directories?.build || "dist"), this.workspaceConfig?.workspaceRoot) : void 0,
2576
2580
  artifactsPath: `.${config.framework ?? "powerlines"}`,
2577
2581
  dts: true,
2578
2582
  typegen: joinPaths$1(cacheKey.root, `${config.framework ?? "powerlines"}.d.ts`),
@@ -2612,16 +2616,17 @@ var PowerlinesContext = class PowerlinesContext {
2612
2616
  if (this.config.output.dts !== false && !this.config.output.typegen) this.config.output.typegen = `${this.config.root ? `${this.config.root}/` : ""}${this.config.framework ?? "powerlines"}.d.ts`;
2613
2617
  if (this.config.root && this.config.root !== "." && this.config.root !== "./" && this.config.root !== this.workspaceConfig.workspaceRoot) {
2614
2618
  this.config.output.path ??= joinPaths$1(this.config.root, "dist");
2615
- this.config.output.publishPath ??= joinPaths$1("dist", this.config.root);
2619
+ if (this.config.output.publishPath !== false) this.config.output.publishPath ??= joinPaths$1("dist", this.config.root);
2616
2620
  } else {
2617
2621
  this.config.output.path ??= "dist";
2618
- this.config.output.publishPath ??= this.config.output.path;
2622
+ if (this.config.output.publishPath !== false) this.config.output.publishPath ??= this.config.output.path;
2619
2623
  }
2620
- this.config.output.assets = getUniqueBy(this.config.output.assets.map((asset) => {
2624
+ if (this.config.output.publishPath === false) this.config.output.assets = [];
2625
+ else this.config.output.assets = getUniqueBy(this.config.output.assets.map((asset) => {
2621
2626
  return {
2622
2627
  glob: isSetObject(asset) ? asset.glob : asset,
2623
2628
  input: isString(asset) || !asset.input || asset.input === "." || asset.input === "/" || asset.input === "./" ? this.workspaceConfig.workspaceRoot : isParentPath(asset.input, this.workspaceConfig.workspaceRoot) || asset.input === this.workspaceConfig.workspaceRoot ? asset.input : appendPath(asset.input, this.workspaceConfig.workspaceRoot),
2624
- output: isSetObject(asset) && asset.output ? isParentPath(asset.output, this.workspaceConfig.workspaceRoot) ? asset.output : appendPath(joinPaths$1(this.config.output.publishPath, replacePath(replacePath(asset.output, replacePath(this.config.output.publishPath, this.workspaceConfig.workspaceRoot)), this.config.output.publishPath)), this.workspaceConfig.workspaceRoot) : appendPath(this.config.output.publishPath, this.workspaceConfig.workspaceRoot),
2629
+ output: isSetObject(asset) && asset.output ? isParentPath(asset.output, this.workspaceConfig.workspaceRoot) ? asset.output : appendPath(joinPaths$1(this.config.output.publishPath || this.config.output.path, replacePath(replacePath(asset.output, replacePath(this.config.output.publishPath || this.config.output.path, this.workspaceConfig.workspaceRoot)), this.config.output.publishPath || this.config.output.path)), this.workspaceConfig.workspaceRoot) : appendPath(this.config.output.publishPath || this.config.output.path, this.workspaceConfig.workspaceRoot),
2625
2630
  ignore: isSetObject(asset) && asset.ignore ? toArray(asset.ignore) : void 0
2626
2631
  };
2627
2632
  }), (a) => `${a.input}-${a.glob}-${a.output}`);
@@ -3542,7 +3547,7 @@ var PowerlinesAPI = class PowerlinesAPI {
3542
3547
  environment: context,
3543
3548
  order: "normal"
3544
3549
  });
3545
- if (context.config.output.path !== context.config.output.publishPath) {
3550
+ if (context.config.output.publishPath && context.config.output.path !== context.config.output.publishPath) {
3546
3551
  const sourcePath = appendPath(context.config.output.path, context.workspaceConfig.workspaceRoot);
3547
3552
  const destinationPath = joinPaths(appendPath(context.config.output.publishPath, context.workspaceConfig.workspaceRoot), "dist");
3548
3553
  if (context.fs.existsSync(sourcePath) && sourcePath !== destinationPath) {
@@ -3778,4 +3783,4 @@ ${formatTypes(types)}
3778
3783
 
3779
3784
  //#endregion
3780
3785
  export { createUnpluginFactory as a, FileMetadata as c, FileSystem as d, _capnpFileId as f, createPluginContext as i, FileMetadata_KeyValuePair as l, version as m, PowerlinesAPIContext as n, PowerlinesContext as o, name as p, PowerlinesEnvironmentContext as r, FileId as s, PowerlinesAPI as t, FileStorage as u };
3781
- //# sourceMappingURL=api-CSU9yoTE.mjs.map
3786
+ //# sourceMappingURL=api-BPqm4eLe.mjs.map