@powerlines/nx 0.11.241 → 0.11.243

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 (43) hide show
  1. package/dist/src/base/base-executor.js +1 -1
  2. package/dist/src/base/base-executor.mjs +1 -1
  3. package/dist/src/base/base-executor.untyped.d.mts +1 -1
  4. package/dist/src/base/index.d.mts +1 -1
  5. package/dist/src/base/index.js +1 -1
  6. package/dist/src/base/index.mjs +1 -1
  7. package/dist/src/{base-executor-pl95GpNV.js → base-executor-C-w1Cj4-.js} +42 -6
  8. package/dist/src/{base-executor-BvEsnkBL.mjs → base-executor-DeuSmP_i.mjs} +43 -7
  9. package/dist/src/{base-executor-BvEsnkBL.mjs.map → base-executor-DeuSmP_i.mjs.map} +1 -1
  10. package/dist/src/{base-executor-DZRSu2uF.mjs → base-executor-OR5IVpTY.mjs} +43 -7
  11. package/dist/src/base-executor-OR5IVpTY.mjs.map +1 -0
  12. package/dist/src/{base-executor-CcbUno8j.js → base-executor-eVgSDE74.js} +42 -6
  13. package/dist/src/base-executor.untyped-BxNh-StD.d.mts +7 -0
  14. package/dist/src/base-executor.untyped-BxNh-StD.d.mts.map +1 -0
  15. package/dist/src/base-executor.untyped-Dh9l8ijM.d.mts +7 -0
  16. package/dist/src/base-executor.untyped-Dh9l8ijM.d.mts.map +1 -0
  17. package/dist/src/executors/build/executor.js +1 -1
  18. package/dist/src/executors/build/executor.mjs +1 -1
  19. package/dist/src/executors/build/untyped.d.mts +2 -2
  20. package/dist/src/executors/build/untyped.d.ts +2 -2
  21. package/dist/src/executors/clean/executor.js +1 -1
  22. package/dist/src/executors/clean/executor.mjs +1 -1
  23. package/dist/src/executors/clean/untyped.d.ts +2 -2
  24. package/dist/src/executors/docs/executor.js +1 -1
  25. package/dist/src/executors/docs/executor.mjs +1 -1
  26. package/dist/src/executors/docs/untyped.d.mts +2 -2
  27. package/dist/src/executors/lint/executor.js +1 -1
  28. package/dist/src/executors/lint/executor.mjs +1 -1
  29. package/dist/src/executors/lint/untyped.d.mts +2 -2
  30. package/dist/src/executors/lint/untyped.d.ts +2 -2
  31. package/dist/src/executors/prepare/executor.js +1 -1
  32. package/dist/src/executors/prepare/executor.mjs +1 -1
  33. package/dist/src/executors/prepare/untyped.d.ts +2 -2
  34. package/dist/src/generators/sync/untyped.d.ts +2 -2
  35. package/dist/src/index.d.mts +1 -1
  36. package/dist/src/index.js +1 -1
  37. package/dist/src/index.mjs +1 -1
  38. package/package.json +17 -17
  39. package/dist/src/base-executor-DZRSu2uF.mjs.map +0 -1
  40. package/dist/src/base-executor.untyped-7SvGKXcO.d.mts +0 -7
  41. package/dist/src/base-executor.untyped-7SvGKXcO.d.mts.map +0 -1
  42. package/dist/src/base-executor.untyped-imww7Gm9.d.mts +0 -7
  43. package/dist/src/base-executor.untyped-imww7Gm9.d.mts.map +0 -1
@@ -78,7 +78,7 @@ import Diff from "diff-match-patch";
78
78
  import "unplugin";
79
79
 
80
80
  //#region ../powerlines/package.json
81
- var version = "0.39.20";
81
+ var version = "0.40.1";
82
82
 
83
83
  //#endregion
84
84
  //#region ../powerlines/src/typescript/ts-morph.ts
@@ -2946,6 +2946,12 @@ var PowerlinesContext = class PowerlinesContext {
2946
2946
  return joinPaths$1(this.artifactsPath, "entry");
2947
2947
  }
2948
2948
  /**
2949
+ * Get the path to the infrastructure modules used by the project
2950
+ */
2951
+ get infrastructurePath() {
2952
+ return joinPaths$1(this.artifactsPath, "infrastructure");
2953
+ }
2954
+ /**
2949
2955
  * Get the path to the data directory for the project
2950
2956
  */
2951
2957
  get dataPath() {
@@ -3152,7 +3158,7 @@ var PowerlinesContext = class PowerlinesContext {
3152
3158
  if (alias) moduleId = alias.replacement;
3153
3159
  } else if (isSetObject(this.config.resolve.alias) && this.config.resolve.alias[id]) moduleId = this.config.resolve.alias[id];
3154
3160
  }
3155
- if (this.fs.isVirtual(moduleId)) {
3161
+ if (this.fs.isVirtual(moduleId) || importer && this.fs.isVirtual(importer)) {
3156
3162
  const result = await this.fs.resolve(moduleId, importer, {
3157
3163
  conditions: this.config.resolve.conditions,
3158
3164
  extensions: this.config.resolve.extensions,
@@ -3325,6 +3331,36 @@ var PowerlinesContext = class PowerlinesContext {
3325
3331
  } }));
3326
3332
  }
3327
3333
  /**
3334
+ * Resolves a builtin virtual file and writes it to the VFS if it does not already exist
3335
+ *
3336
+ * @param code - The source code of the builtin file
3337
+ * @param id - The unique identifier of the builtin file
3338
+ * @param options - Optional write file options
3339
+ */
3340
+ async emitInfrastructure(code, id, options = {}) {
3341
+ if (!this.infrastructurePath) throw new Error(`The infrastructure path is not set. Cannot emit infrastructure file with id "${id}".`);
3342
+ if (!isSetString(id)) throw new Error(`The infrastructure id must be a non-empty string. Received: ${String(id)}`);
3343
+ return this.emit(code, appendPath(id, this.infrastructurePath), defu$1(options, { meta: {
3344
+ type: "infrastructure",
3345
+ id
3346
+ } }));
3347
+ }
3348
+ /**
3349
+ * Synchronously resolves an infrastructure virtual file and writes it to the VFS if it does not already exist
3350
+ *
3351
+ * @param code - The source code of the infrastructure file
3352
+ * @param id - The unique identifier of the infrastructure file
3353
+ * @param options - Optional write file options
3354
+ */
3355
+ emitInfrastructureSync(code, id, options = {}) {
3356
+ if (!this.infrastructurePath) throw new Error(`The infrastructure path is not set. Cannot emit infrastructure file with id "${id}".`);
3357
+ if (!isSetString(id)) throw new Error(`The infrastructure id must be a non-empty string. Received: ${String(id)}`);
3358
+ return this.emitSync(code, appendPath(id, this.infrastructurePath), defu$1(options, { meta: {
3359
+ type: "infrastructure",
3360
+ id
3361
+ } }));
3362
+ }
3363
+ /**
3328
3364
  * Update the context using a new user configuration options
3329
3365
  *
3330
3366
  * @param userConfig - The new user configuration options.
@@ -4146,6 +4182,10 @@ var PowerlinesAPI = class PowerlinesAPI {
4146
4182
  environment: context,
4147
4183
  order: "normal"
4148
4184
  });
4185
+ await this.callHook("prepare", {
4186
+ environment: context,
4187
+ order: "post"
4188
+ });
4149
4189
  if (context.config.output.dts !== false) {
4150
4190
  context.debug(`Preparing the TypeScript definitions for the Powerlines project.`);
4151
4191
  if (context.fs.existsSync(context.dtsPath)) await context.fs.remove(context.dtsPath);
@@ -4220,10 +4260,6 @@ ${formatTypes(types)}
4220
4260
  if (!context.tsconfig) throw new Error("Failed to parse the TypeScript configuration file.");
4221
4261
  this.context.debug("Formatting files generated during the prepare step.");
4222
4262
  await Promise.all([formatFolder(context, context.builtinsPath), formatFolder(context, context.entryPath)]);
4223
- await this.callHook("prepare", {
4224
- environment: context,
4225
- order: "post"
4226
- });
4227
4263
  await writeMetaFile(context);
4228
4264
  context.persistedMeta = context.meta;
4229
4265
  });
@@ -4655,4 +4691,4 @@ ${error.stack}` : "Unknown error"}`);
4655
4691
 
4656
4692
  //#endregion
4657
4693
  export { withExecutor as t };
4658
- //# sourceMappingURL=base-executor-DZRSu2uF.mjs.map
4694
+ //# sourceMappingURL=base-executor-OR5IVpTY.mjs.map