@firestartr/cli 1.43.2-snapshot-7 → 1.43.2-snapshot-9

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.
package/build/index.js CHANGED
@@ -165787,7 +165787,7 @@ const Comparator = __nccwpck_require__(14435)
165787
165787
  const Range = __nccwpck_require__(34189)
165788
165788
  const satisfies = __nccwpck_require__(74432)
165789
165789
  const toComparators = __nccwpck_require__(90453)
165790
- const maxSatisfying = __nccwpck_require__(46253)
165790
+ const maxSatisfying = __nccwpck_require__(49939)
165791
165791
  const minSatisfying = __nccwpck_require__(59276)
165792
165792
  const minVersion = __nccwpck_require__(97241)
165793
165793
  const validRange = __nccwpck_require__(65493)
@@ -166213,7 +166213,7 @@ module.exports = ltr
166213
166213
 
166214
166214
  /***/ }),
166215
166215
 
166216
- /***/ 46253:
166216
+ /***/ 49939:
166217
166217
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
166218
166218
 
166219
166219
  const SemVer = __nccwpck_require__(87048)
@@ -281375,7 +281375,6 @@ class FirestartrAllClaim {
281375
281375
  ref: {
281376
281376
  type: 'string',
281377
281377
  description: 'A github reference (commit, tag, branch)',
281378
- pattern: '^[a-zA-Z0-9-._]+/[a-zA-Z0-9-._]+$',
281379
281378
  },
281380
281379
  args: {
281381
281380
  type: 'object',
@@ -281385,6 +281384,7 @@ class FirestartrAllClaim {
281385
281384
  repo: {
281386
281385
  type: 'string',
281387
281386
  description: 'A repo where the feature exists, format: owner/repository',
281387
+ pattern: '^[a-zA-Z0-9-._]+/[a-zA-Z0-9-._]+$',
281388
281388
  },
281389
281389
  },
281390
281390
  required: ['name'],
@@ -284162,9 +284162,12 @@ var adm_zip = __nccwpck_require__(7993);
284162
284162
  var adm_zip_default = /*#__PURE__*/__nccwpck_require__.n(adm_zip);
284163
284163
  // EXTERNAL MODULE: external "node:stream"
284164
284164
  var external_node_stream_ = __nccwpck_require__(84492);
284165
+ ;// CONCATENATED MODULE: external "node:stream/promises"
284166
+ const external_node_stream_promises_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:stream/promises");
284165
284167
  ;// CONCATENATED MODULE: ../features_preparer/src/zip.ts
284166
284168
 
284167
284169
 
284170
+
284168
284171
  async function downloadZipBall(url, filePath) {
284169
284172
  try {
284170
284173
  const zipResponse = await fetch(url);
@@ -284173,7 +284176,8 @@ async function downloadZipBall(url, filePath) {
284173
284176
  }
284174
284177
  const webStream = zipResponse.body;
284175
284178
  const stream = external_node_stream_.Readable.fromWeb(webStream);
284176
- await (0,promises_namespaceObject.writeFile)(filePath, stream);
284179
+ const writableStream = external_fs_.createWriteStream(filePath);
284180
+ await (0,external_node_stream_promises_namespaceObject.pipeline)(stream, writableStream);
284177
284181
  }
284178
284182
  catch (err) {
284179
284183
  throw new Error(`Downloading feature's zip: ${err.message}`);
@@ -284278,6 +284282,7 @@ function buildRef(featureName, version) {
284278
284282
  prepareFeature: features_preparer_src.prepareFeature,
284279
284283
  renderFeature: features_preparer_src.renderFeature,
284280
284284
  getFeatureConfig: features_preparer_src.getFeatureConfig,
284285
+ getFeatureConfigFromRef: features_preparer_src.getFeatureConfigFromRef,
284281
284286
  });
284282
284287
 
284283
284288
  ;// CONCATENATED MODULE: ../cdk8s_renderer/src/overriders/utils.ts
@@ -284340,18 +284345,21 @@ class FeaturesOverrider extends OverriderPatches {
284340
284345
  getFeatureConfig(cr) {
284341
284346
  if (this.featureConfig)
284342
284347
  return this.featureConfig;
284348
+ return this.setUpAndRunRenderer(cr);
284349
+ }
284350
+ setUpAndRunRenderer(cr) {
284343
284351
  let repo = 'features';
284344
284352
  let owner = 'prefapp';
284345
- let version = this.featureVersion;
284353
+ let versionOrRef = this.featureVersion;
284346
284354
  let renderer = 'getFeatureConfig';
284347
284355
  if (this.featureRepo) {
284348
284356
  [owner, repo] = this.featureRepo.split(/\//);
284349
284357
  }
284350
284358
  if (this.featureRef) {
284351
- version = this.featureRef;
284359
+ versionOrRef = this.featureRef;
284352
284360
  renderer = 'getFeatureConfigFromRef';
284353
284361
  }
284354
- return features_preparer[renderer](this.featureName, version, this.featureArgs, cr, repo, owner, this.featureRef);
284362
+ return features_preparer[renderer](this.featureName, versionOrRef, this.featureArgs, cr, repo, owner);
284355
284363
  }
284356
284364
  async __validate() {
284357
284365
  return true;
@@ -284360,6 +284368,9 @@ class FeaturesOverrider extends OverriderPatches {
284360
284368
  const featureName = this.featureName;
284361
284369
  const featureVersion = this.featureVersion;
284362
284370
  const featureArgs = this.featureArgs;
284371
+ const fSetUpAndRunRenderer = function (cr) {
284372
+ return this.setUpAndRunRenderer(cr);
284373
+ }.bind(this);
284363
284374
  let renderedFeatureConfig = null;
284364
284375
  return [
284365
284376
  {
@@ -284367,7 +284378,7 @@ class FeaturesOverrider extends OverriderPatches {
284367
284378
  return true;
284368
284379
  },
284369
284380
  async apply(cr) {
284370
- renderedFeatureConfig = await features_preparer.getFeatureConfig(featureName, featureVersion, cr, featureArgs, 'features', 'prefapp');
284381
+ renderedFeatureConfig = await fSetUpAndRunRenderer(cr);
284371
284382
  return cr;
284372
284383
  },
284373
284384
  identify() {
@@ -362,7 +362,6 @@ declare const schemas: {
362
362
  ref: {
363
363
  type: string;
364
364
  description: string;
365
- pattern: string;
366
365
  };
367
366
  args: {
368
367
  type: string;
@@ -372,6 +371,7 @@ declare const schemas: {
372
371
  repo: {
373
372
  type: string;
374
373
  description: string;
374
+ pattern: string;
375
375
  };
376
376
  };
377
377
  required: string[];
@@ -17,7 +17,6 @@ declare const _default: {
17
17
  ref: {
18
18
  type: string;
19
19
  description: string;
20
- pattern: string;
21
20
  };
22
21
  args: {
23
22
  type: string;
@@ -27,6 +26,7 @@ declare const _default: {
27
26
  repo: {
28
27
  type: string;
29
28
  description: string;
29
+ pattern: string;
30
30
  };
31
31
  };
32
32
  required: string[];
@@ -78,7 +78,6 @@ export declare const GithubSchemas: ({
78
78
  ref: {
79
79
  type: string;
80
80
  description: string;
81
- pattern: string;
82
81
  };
83
82
  args: {
84
83
  type: string;
@@ -88,6 +87,7 @@ export declare const GithubSchemas: ({
88
87
  repo: {
89
88
  type: string;
90
89
  description: string;
90
+ pattern: string;
91
91
  };
92
92
  };
93
93
  required: string[];
@@ -9,6 +9,7 @@ export declare class FeaturesOverrider extends OverriderPatches {
9
9
  private featureRef;
10
10
  constructor(featureName: string, featureVersion: string, featureConfig?: any, featureArgs?: any, featureRef?: string, featureRepo?: string);
11
11
  getFeatureConfig(cr: any): any;
12
+ setUpAndRunRenderer(cr: any): any;
12
13
  __validate(): Promise<boolean>;
13
14
  __patches(claim: any, _previousCR: any): Promise<({
14
15
  validate(_cr: any): boolean;
@@ -3,5 +3,6 @@ declare const _default: {
3
3
  prepareFeature: typeof import("./src/installer").prepareFeature;
4
4
  renderFeature: typeof import("./src/renderer").renderFeature;
5
5
  getFeatureConfig: typeof import("./src/installer").getFeatureConfig;
6
+ getFeatureConfigFromRef: typeof import("./src/installer").getFeatureConfigFromRef;
6
7
  };
7
8
  export default _default;
@@ -428,7 +428,7 @@ export declare function getBranch(repo: string, branch: string, owner?: string):
428
428
  verified_at: string;
429
429
  };
430
430
  };
431
- author: Record<string, never> | {
431
+ author: {
432
432
  name?: string;
433
433
  email?: string;
434
434
  login: string;
@@ -451,8 +451,8 @@ export declare function getBranch(repo: string, branch: string, owner?: string):
451
451
  site_admin: boolean;
452
452
  starred_at?: string;
453
453
  user_view_type?: string;
454
- };
455
- committer: Record<string, never> | {
454
+ } | Record<string, never>;
455
+ committer: {
456
456
  name?: string;
457
457
  email?: string;
458
458
  login: string;
@@ -475,7 +475,7 @@ export declare function getBranch(repo: string, branch: string, owner?: string):
475
475
  site_admin: boolean;
476
476
  starred_at?: string;
477
477
  user_view_type?: string;
478
- };
478
+ } | Record<string, never>;
479
479
  parents: {
480
480
  sha: string;
481
481
  url: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firestartr/cli",
3
- "version": "1.43.2-snapshot-7",
3
+ "version": "1.43.2-snapshot-9",
4
4
  "private": false,
5
5
  "description": "Commandline tool",
6
6
  "main": "build/main.js",