powerlines 0.41.19 → 0.41.23

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.41.19";
75
+ var version = "0.41.23";
76
76
 
77
77
  //#endregion
78
78
  //#region src/_internal/helpers/generate-types.ts
@@ -1166,8 +1166,8 @@ 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.outputPath] ??= new FileSystemStorageAdapter(context, { base: this.#context.config.output.outputPath });
1170
- this.#storage[this.#context.config.output.buildPath] ??= new FileSystemStorageAdapter(context, { base: this.#context.config.output.buildPath });
1169
+ this.#storage[this.#context.config.output.publishPath] ??= new FileSystemStorageAdapter(context, { base: this.#context.config.output.publishPath });
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 });
1173
1173
  this.#storage[this.#context.builtinsPath] ??= new VirtualStorageAdapter(context, { base: this.#context.builtinsPath });
@@ -2572,7 +2572,7 @@ var PowerlinesContext = class PowerlinesContext {
2572
2572
  version: this.packageJson?.version,
2573
2573
  description: this.packageJson?.description,
2574
2574
  output: (0, plugin_utils_exports.mergeConfig)(config.output ?? {}, {
2575
- outputPath: cacheKey.root ? joinPaths$1(this.workspaceConfig?.directories?.build || "dist", cacheKey.root) : this.workspaceConfig?.directories?.build || "dist",
2575
+ publishPath: cacheKey.root ? joinPaths$1(this.workspaceConfig?.directories?.build || "dist", cacheKey.root) : this.workspaceConfig?.directories?.build || "dist",
2576
2576
  artifactsPath: `.${config.framework ?? "powerlines"}`,
2577
2577
  dts: true,
2578
2578
  typegen: joinPaths$1(cacheKey.root, `${config.framework ?? "powerlines"}.d.ts`),
@@ -2611,17 +2611,17 @@ var PowerlinesContext = class PowerlinesContext {
2611
2611
  this.config.output.format = getUnique(toArray(this.config.output?.format ?? (this.config.projectType === "library" ? ["cjs", "esm"] : ["esm"])));
2612
2612
  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
2613
  if (this.config.root && this.config.root !== "." && this.config.root !== "./" && this.config.root !== this.workspaceConfig.workspaceRoot) {
2614
- this.config.output.outputPath ??= joinPaths$1("dist", this.config.root);
2615
- this.config.output.buildPath ??= joinPaths$1(this.config.root, "dist");
2614
+ this.config.output.path ??= joinPaths$1(this.config.root, "dist");
2615
+ this.config.output.publishPath ??= joinPaths$1("dist", this.config.root);
2616
2616
  } else {
2617
- this.config.output.outputPath ??= "dist";
2618
- this.config.output.buildPath ??= "dist";
2617
+ this.config.output.path ??= "dist";
2618
+ this.config.output.publishPath ??= this.config.output.path;
2619
2619
  }
2620
2620
  this.config.output.assets = getUniqueBy(this.config.output.assets.map((asset) => {
2621
2621
  return {
2622
2622
  glob: isSetObject(asset) ? asset.glob : asset,
2623
2623
  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.outputPath, replacePath(replacePath(asset.output, replacePath(this.config.output.outputPath, this.workspaceConfig.workspaceRoot)), this.config.output.outputPath)), this.workspaceConfig.workspaceRoot) : appendPath(this.config.output.outputPath, 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),
2625
2625
  ignore: isSetObject(asset) && asset.ignore ? toArray(asset.ignore) : void 0
2626
2626
  };
2627
2627
  }), (a) => `${a.input}-${a.glob}-${a.output}`);
@@ -3422,7 +3422,7 @@ ${formatTypes(types)}
3422
3422
  await this.prepare(inlineConfig);
3423
3423
  await this.#executeEnvironments(async (context) => {
3424
3424
  context.debug("Cleaning the project's dist and artifacts directories.");
3425
- await context.fs.remove(joinPaths(context.workspaceConfig.workspaceRoot, context.config.output.buildPath));
3425
+ await context.fs.remove(joinPaths(context.workspaceConfig.workspaceRoot, context.config.output.path));
3426
3426
  await context.fs.remove(joinPaths(context.workspaceConfig.workspaceRoot, context.config.root, context.config.output.artifactsPath));
3427
3427
  await this.callHook("clean", {
3428
3428
  environment: context,
@@ -3557,16 +3557,16 @@ ${formatTypes(types)}
3557
3557
  environment: context,
3558
3558
  order: "normal"
3559
3559
  });
3560
- if (context.config.output.buildPath !== context.config.output.outputPath) {
3561
- const sourcePath = appendPath(context.config.output.buildPath, context.workspaceConfig.workspaceRoot);
3562
- const destinationPath = joinPaths(appendPath(context.config.output.outputPath, context.workspaceConfig.workspaceRoot), "dist");
3560
+ if (context.config.output.path !== context.config.output.publishPath) {
3561
+ const sourcePath = appendPath(context.config.output.path, context.workspaceConfig.workspaceRoot);
3562
+ const destinationPath = joinPaths(appendPath(context.config.output.publishPath, context.workspaceConfig.workspaceRoot), "dist");
3563
3563
  if (context.fs.existsSync(sourcePath) && sourcePath !== destinationPath) {
3564
- context.debug(`Copying build output files from project's build directory (${context.config.output.buildPath}) to the workspace's output directory (${context.config.output.outputPath}).`);
3564
+ context.debug(`Copying output files from project's output directory (${context.config.output.path}) to the publish output directory (${context.config.output.publishPath}).`);
3565
3565
  await context.fs.copy(sourcePath, destinationPath);
3566
3566
  }
3567
3567
  }
3568
3568
  await Promise.all(context.config.output.assets.map(async (asset) => {
3569
- context.trace(`Copying asset(s): ${chalk.redBright(context.workspaceConfig.workspaceRoot === asset.input ? asset.glob : joinPaths(replacePath(asset.input, context.workspaceConfig.workspaceRoot), asset.glob))} -> ${chalk.greenBright(joinPaths(replacePath(asset.output, context.workspaceConfig.workspaceRoot), asset.glob))} ${Array.isArray(asset.ignore) && asset.ignore.length > 0 ? ` (ignoring: ${asset.ignore.map((i) => chalk.yellowBright(i)).join(", ")})` : ""}`);
3569
+ context.trace(`Copying asset(s): ${chalk.redBright(context.workspaceConfig.workspaceRoot === asset.input ? asset.glob : appendPath(asset.glob, replacePath(asset.input, context.workspaceConfig.workspaceRoot)))} -> ${chalk.greenBright(joinPaths(replacePath(asset.output, context.workspaceConfig.workspaceRoot), asset.glob))} ${Array.isArray(asset.ignore) && asset.ignore.length > 0 ? ` (ignoring: ${asset.ignore.map((i) => chalk.yellowBright(i)).join(", ")})` : ""}`);
3570
3570
  await context.fs.copy(asset, asset.output);
3571
3571
  }));
3572
3572
  await this.callHook("build", {
@@ -3712,4 +3712,4 @@ Note: Please ensure the plugin package's default export is a class that extends
3712
3712
 
3713
3713
  //#endregion
3714
3714
  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 };
3715
- //# sourceMappingURL=api-CXxWO1SS.mjs.map
3715
+ //# sourceMappingURL=api-BAybLTQ1.mjs.map