@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
@@ -1,4 +1,4 @@
1
1
  require('../config-CGQhS8tm.js');
2
- const require_base_executor = require('../base-executor-CcbUno8j.js');
2
+ const require_base_executor = require('../base-executor-eVgSDE74.js');
3
3
 
4
4
  exports.withExecutor = require_base_executor.withExecutor;
@@ -1,4 +1,4 @@
1
- import { t as withExecutor } from "../base-executor-BvEsnkBL.mjs";
1
+ import { t as withExecutor } from "../base-executor-DeuSmP_i.mjs";
2
2
  import "../config-LoR-NIJg.mjs";
3
3
 
4
4
  export { withExecutor };
@@ -1,2 +1,2 @@
1
- import { t as _default } from "../base-executor.untyped-imww7Gm9.mjs";
1
+ import { t as _default } from "../base-executor.untyped-BxNh-StD.mjs";
2
2
  export { _default as default };
@@ -1,4 +1,4 @@
1
1
  import { n as withExecutor, t as PowerlinesExecutorContext } from "../base-executor-kPTbnW7K.mjs";
2
- import "../base-executor.untyped-imww7Gm9.mjs";
2
+ import "../base-executor.untyped-BxNh-StD.mjs";
3
3
  import "../index-LhFpnU-f.mjs";
4
4
  export { PowerlinesExecutorContext, withExecutor };
@@ -1,5 +1,5 @@
1
1
  require('../config-CGQhS8tm.js');
2
- const require_base_executor = require('../base-executor-CcbUno8j.js');
2
+ const require_base_executor = require('../base-executor-eVgSDE74.js');
3
3
  require('../base-executor.untyped-Cz1Zw_02.js');
4
4
  require('../base-B7jekb-W.js');
5
5
 
@@ -1,4 +1,4 @@
1
- import { t as withExecutor } from "../base-executor-BvEsnkBL.mjs";
1
+ import { t as withExecutor } from "../base-executor-DeuSmP_i.mjs";
2
2
  import "../config-LoR-NIJg.mjs";
3
3
  import "../base-executor.untyped-C1pQETnQ.mjs";
4
4
  import "../base-BRSa-clf.mjs";
@@ -84,7 +84,7 @@ diff_match_patch = require_config.__toESM(diff_match_patch);
84
84
  require("unplugin");
85
85
 
86
86
  //#region ../powerlines/package.json
87
- var version = "0.39.20";
87
+ var version = "0.40.1";
88
88
 
89
89
  //#endregion
90
90
  //#region ../powerlines/src/typescript/ts-morph.ts
@@ -2952,6 +2952,12 @@ var PowerlinesContext = class PowerlinesContext {
2952
2952
  return (0, __stryke_path_join.joinPaths)(this.artifactsPath, "entry");
2953
2953
  }
2954
2954
  /**
2955
+ * Get the path to the infrastructure modules used by the project
2956
+ */
2957
+ get infrastructurePath() {
2958
+ return (0, __stryke_path_join.joinPaths)(this.artifactsPath, "infrastructure");
2959
+ }
2960
+ /**
2955
2961
  * Get the path to the data directory for the project
2956
2962
  */
2957
2963
  get dataPath() {
@@ -3158,7 +3164,7 @@ var PowerlinesContext = class PowerlinesContext {
3158
3164
  if (alias) moduleId = alias.replacement;
3159
3165
  } else if ((0, __stryke_type_checks_is_set_object.isSetObject)(this.config.resolve.alias) && this.config.resolve.alias[id]) moduleId = this.config.resolve.alias[id];
3160
3166
  }
3161
- if (this.fs.isVirtual(moduleId)) {
3167
+ if (this.fs.isVirtual(moduleId) || importer && this.fs.isVirtual(importer)) {
3162
3168
  const result = await this.fs.resolve(moduleId, importer, {
3163
3169
  conditions: this.config.resolve.conditions,
3164
3170
  extensions: this.config.resolve.extensions,
@@ -3331,6 +3337,36 @@ var PowerlinesContext = class PowerlinesContext {
3331
3337
  } }));
3332
3338
  }
3333
3339
  /**
3340
+ * Resolves a builtin virtual file and writes it to the VFS if it does not already exist
3341
+ *
3342
+ * @param code - The source code of the builtin file
3343
+ * @param id - The unique identifier of the builtin file
3344
+ * @param options - Optional write file options
3345
+ */
3346
+ async emitInfrastructure(code, id, options = {}) {
3347
+ if (!this.infrastructurePath) throw new Error(`The infrastructure path is not set. Cannot emit infrastructure file with id "${id}".`);
3348
+ if (!(0, __stryke_type_checks_is_set_string.isSetString)(id)) throw new Error(`The infrastructure id must be a non-empty string. Received: ${String(id)}`);
3349
+ return this.emit(code, (0, __stryke_path_append.appendPath)(id, this.infrastructurePath), (0, defu.default)(options, { meta: {
3350
+ type: "infrastructure",
3351
+ id
3352
+ } }));
3353
+ }
3354
+ /**
3355
+ * Synchronously resolves an infrastructure virtual file and writes it to the VFS if it does not already exist
3356
+ *
3357
+ * @param code - The source code of the infrastructure file
3358
+ * @param id - The unique identifier of the infrastructure file
3359
+ * @param options - Optional write file options
3360
+ */
3361
+ emitInfrastructureSync(code, id, options = {}) {
3362
+ if (!this.infrastructurePath) throw new Error(`The infrastructure path is not set. Cannot emit infrastructure file with id "${id}".`);
3363
+ if (!(0, __stryke_type_checks_is_set_string.isSetString)(id)) throw new Error(`The infrastructure id must be a non-empty string. Received: ${String(id)}`);
3364
+ return this.emitSync(code, (0, __stryke_path_append.appendPath)(id, this.infrastructurePath), (0, defu.default)(options, { meta: {
3365
+ type: "infrastructure",
3366
+ id
3367
+ } }));
3368
+ }
3369
+ /**
3334
3370
  * Update the context using a new user configuration options
3335
3371
  *
3336
3372
  * @param userConfig - The new user configuration options.
@@ -4152,6 +4188,10 @@ var PowerlinesAPI = class PowerlinesAPI {
4152
4188
  environment: context,
4153
4189
  order: "normal"
4154
4190
  });
4191
+ await this.callHook("prepare", {
4192
+ environment: context,
4193
+ order: "post"
4194
+ });
4155
4195
  if (context.config.output.dts !== false) {
4156
4196
  context.debug(`Preparing the TypeScript definitions for the Powerlines project.`);
4157
4197
  if (context.fs.existsSync(context.dtsPath)) await context.fs.remove(context.dtsPath);
@@ -4226,10 +4266,6 @@ ${formatTypes(types)}
4226
4266
  if (!context.tsconfig) throw new Error("Failed to parse the TypeScript configuration file.");
4227
4267
  this.context.debug("Formatting files generated during the prepare step.");
4228
4268
  await Promise.all([formatFolder(context, context.builtinsPath), formatFolder(context, context.entryPath)]);
4229
- await this.callHook("prepare", {
4230
- environment: context,
4231
- order: "post"
4232
- });
4233
4269
  await writeMetaFile(context);
4234
4270
  context.persistedMeta = context.meta;
4235
4271
  });
@@ -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.40.0";
81
+ var version = "0.40.2";
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-BvEsnkBL.mjs.map
4694
+ //# sourceMappingURL=base-executor-DeuSmP_i.mjs.map