@firestartr/cli 2.1.0-snapshot-1 → 2.2.0-snapshot-0

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
@@ -356187,39 +356187,33 @@ function createCRrefFrom(claimRef, needsSecret) {
356187
356187
  * @returns string
356188
356188
  */
356189
356189
  function createCodeOwnersData(claim, additionalRules) {
356190
- const paddedAsterisk = '*'.padEnd(25);
356191
- // we avoid generating the same line twice (idempotency)
356192
- const redactedLines = [];
356193
- const concatLine = function (messageFinal, line) {
356194
- if (redactedLines.includes(line)) {
356195
- return messageFinal;
356190
+ const rulesMap = new Map();
356191
+ const addOwnerToPath = (path, owner) => {
356192
+ const owners = rulesMap.get(path) ?? [];
356193
+ if (!owners.includes(owner)) {
356194
+ owners.push(owner);
356196
356195
  }
356197
- else {
356198
- redactedLines.push(line);
356199
- messageFinal += line;
356200
- }
356201
- return messageFinal;
356196
+ rulesMap.set(path, owners);
356202
356197
  };
356203
356198
  let message = `# This file was generated by firestartr.
356204
356199
  # WARNING: Please don't edit this file directly in the repository
356205
356200
  # Go to gitops repository to modify it!`;
356206
356201
  if (claim.owner) {
356207
- message = concatLine(message, `\n${paddedAsterisk}${resolveCodeownersRef(claim.owner, claim.providers.github.org)}`);
356202
+ addOwnerToPath('*', resolveCodeownersRef(claim.owner, claim.providers.github.org));
356208
356203
  }
356209
356204
  if (claim.platformOwner) {
356210
- message = concatLine(message, `\n${'/.github/'.padEnd(25)}${resolveCodeownersRef(claim.platformOwner, claim.providers.github.org)}`);
356205
+ addOwnerToPath('/.github/', resolveCodeownersRef(claim.platformOwner, claim.providers.github.org));
356211
356206
  }
356212
356207
  if (additionalRules) {
356213
356208
  for (const rule of additionalRules) {
356214
- let line = `\n${rule.path.padEnd(25)}`;
356215
356209
  for (const owner of rule.owners) {
356216
- line += `${resolveCodeownersRef(owner, claim.providers.github.org)} `;
356210
+ addOwnerToPath(rule.path, resolveCodeownersRef(owner, claim.providers.github.org));
356217
356211
  }
356218
- message = concatLine(message, line);
356219
- // Remove trailing <space> from the previous loop
356220
- message = message.substring(0, message.length - 1);
356221
356212
  }
356222
356213
  }
356214
+ for (const [path, owners] of rulesMap.entries()) {
356215
+ message += `\n${path.padEnd(25)} ${owners.join(' ')}`;
356216
+ }
356223
356217
  return message;
356224
356218
  }
356225
356219
  function resolveCodeownersRef(ref, org) {
@@ -358191,6 +358185,17 @@ const external_node_child_process_namespaceObject = __WEBPACK_EXTERNAL_createReq
358191
358185
  $schema: SCHEMA,
358192
358186
  $id: 'ComponentClaim',
358193
358187
  definitions: {
358188
+ ApiDefinition: {
358189
+ $id: 'firestartr.dev://common/ComponentClaimApiDefinition',
358190
+ type: 'object',
358191
+ properties: {
358192
+ name: { type: 'string' },
358193
+ definitionfile: { type: 'string' },
358194
+ type: { type: 'string' },
358195
+ },
358196
+ required: ['name', 'definitionfile', 'type'],
358197
+ additionalProperties: false,
358198
+ },
358194
358199
  ComponentClaim: {
358195
358200
  $id: 'firestartr.dev://common/ComponentClaim',
358196
358201
  type: 'object',
@@ -358215,6 +358220,26 @@ const external_node_child_process_namespaceObject = __WEBPACK_EXTERNAL_createReq
358215
358220
  subComponentOf: {
358216
358221
  $ref: 'firestartr.dev://common/FirestartrComponentRef',
358217
358222
  },
358223
+ providesApis: {
358224
+ anyOf: [
358225
+ {
358226
+ type: 'array',
358227
+ items: {
358228
+ $ref: 'firestartr.dev://common/ComponentClaimApiDefinition',
358229
+ },
358230
+ },
358231
+ {
358232
+ type: 'object',
358233
+ additionalProperties: {
358234
+ $ref: 'firestartr.dev://common/ComponentClaimApiDefinition',
358235
+ },
358236
+ },
358237
+ ],
358238
+ },
358239
+ consumesApis: {
358240
+ type: 'array',
358241
+ items: { type: 'string' },
358242
+ },
358218
358243
  providers: {
358219
358244
  type: 'object',
358220
358245
  properties: {
@@ -361986,6 +362011,12 @@ function isPathInside(pathA, pathB) {
361986
362011
  return (normalizedPathB.startsWith(pathAWithSeparator) ||
361987
362012
  normalizedPathB === normalizedPathA);
361988
362013
  }
362014
+ function sanitizeApiEntityName(name) {
362015
+ return name
362016
+ .toLowerCase()
362017
+ .replace(/[^a-z0-9-]/g, '-')
362018
+ .replace(/^-+|-+$/g, '');
362019
+ }
361989
362020
 
361990
362021
  ;// CONCATENATED MODULE: ../cdk8s_renderer/imports/firestartr.dev.ts
361991
362022
  // generated by cdk8s
@@ -365390,9 +365421,19 @@ class CatalogUserChart extends BaseCatalogChart {
365390
365421
  ;// CONCATENATED MODULE: ../cdk8s_renderer/src/charts/catalog/componentChart.ts
365391
365422
 
365392
365423
 
365424
+
365425
+ function claimProvidesApis(claim) {
365426
+ if (!claim.providesApis)
365427
+ return undefined;
365428
+ if (Array.isArray(claim.providesApis)) {
365429
+ return claim.providesApis.map((api) => sanitizeApiEntityName(api.name));
365430
+ }
365431
+ return Object.values(claim.providesApis).map((api) => sanitizeApiEntityName(api.name));
365432
+ }
365393
365433
  class CatalogComponentChart extends BaseCatalogChart {
365394
365434
  template() {
365395
365435
  const claim = this.get('claim');
365436
+ const providesApis = claimProvidesApis(claim);
365396
365437
  return {
365397
365438
  apiVersion: 'backstage.io/v1alpha1',
365398
365439
  kind: 'Component',
@@ -365406,6 +365447,8 @@ class CatalogComponentChart extends BaseCatalogChart {
365406
365447
  owner: claim.owner || 'nobody',
365407
365448
  system: claim.system,
365408
365449
  subComponentOf: claim.subComponentOf,
365450
+ ...(providesApis ? { providesApis } : {}),
365451
+ ...(claim.consumesApis ? { consumesApis: claim.consumesApis } : {}),
365409
365452
  },
365410
365453
  };
365411
365454
  }
@@ -365574,6 +365617,41 @@ class CatalogOrgWebhookChart extends BaseCatalogChart {
365574
365617
  }
365575
365618
  }
365576
365619
 
365620
+ ;// CONCATENATED MODULE: ../cdk8s_renderer/src/charts/catalog/apiChart.ts
365621
+
365622
+
365623
+ class CatalogApiChart extends BaseCatalogChart {
365624
+ template() {
365625
+ const claim = this.get('claim');
365626
+ return {
365627
+ apiVersion: 'backstage.io/v1alpha1',
365628
+ kind: 'API',
365629
+ metadata: {
365630
+ name: claim.name,
365631
+ annotations: claim.annotations || {},
365632
+ },
365633
+ spec: {
365634
+ type: claim.type,
365635
+ lifecycle: claim.lifecycle,
365636
+ owner: claim.owner || 'nobody',
365637
+ system: claim.system,
365638
+ definition: {
365639
+ $text: claim.definitionUrl,
365640
+ },
365641
+ },
365642
+ };
365643
+ }
365644
+ instanceApiObject(template) {
365645
+ return new lib.ApiObject(this, `${template.kind}-${template.metadata.name}`, template);
365646
+ }
365647
+ gvk() {
365648
+ return {
365649
+ kind: 'API',
365650
+ apiVersion: 'v1alpha1',
365651
+ };
365652
+ }
365653
+ }
365654
+
365577
365655
  ;// CONCATENATED MODULE: ../cdk8s_renderer/src/charts/catalog/index.ts
365578
365656
 
365579
365657
 
@@ -365585,6 +365663,7 @@ class CatalogOrgWebhookChart extends BaseCatalogChart {
365585
365663
 
365586
365664
 
365587
365665
 
365666
+
365588
365667
  ;// CONCATENATED MODULE: ../cdk8s_renderer/src/charts/workspaces/base.ts
365589
365668
 
365590
365669
  class BaseWorkspaceChart extends BaseChart {
@@ -365940,6 +366019,7 @@ class SecretsChart extends BaseSecretsChart {
365940
366019
  CatalogArgoDeployChart: CatalogArgoDeployChart,
365941
366020
  CatalogSecretsChart: CatalogSecretsChart,
365942
366021
  CatalogOrgWebhookChart: CatalogOrgWebhookChart,
366022
+ CatalogApiChart: CatalogApiChart,
365943
366023
  GithubGroupChart: GithubGroupChart,
365944
366024
  GithubMembershipChart: GithubMembershipChart,
365945
366025
  GithubRepositoryChart: GithubRepositoryChart,
@@ -365957,6 +366037,15 @@ class SecretsChart extends BaseSecretsChart {
365957
366037
 
365958
366038
 
365959
366039
 
366040
+
366041
+ function normalizeProvidesApis(providesApis) {
366042
+ if (!providesApis)
366043
+ return [];
366044
+ if (Array.isArray(providesApis)) {
366045
+ return providesApis;
366046
+ }
366047
+ return Object.values(providesApis);
366048
+ }
365960
366049
  async function renderClaims(catalogScope, firestartrScope, data) {
365961
366050
  const result = {};
365962
366051
  const { renderClaims, crs } = data;
@@ -365989,6 +366078,11 @@ async function renderClaims(catalogScope, firestartrScope, data) {
365989
366078
  result[`${catalogEntity.kind}-${catalogEntity.metadata.name}`] =
365990
366079
  catalogEntity.toJson();
365991
366080
  }
366081
+ for (const extraChart of extraCharts) {
366082
+ const { claim, chart } = extraChart;
366083
+ setRenderedClaim(claim, chart.toJson());
366084
+ result[`${chart.kind}-${chart.metadata.name}`] = chart.toJson();
366085
+ }
365992
366086
  /**
365993
366087
  * If there is no provider don't store the CR in the map
365994
366088
  */
@@ -365996,11 +366090,6 @@ async function renderClaims(catalogScope, firestartrScope, data) {
365996
366090
  continue;
365997
366091
  const firestartrEntityJson = firestartrEntity.toJson();
365998
366092
  setRenderedClaim(claim, firestartrEntityJson);
365999
- for (const extraChart of extraCharts) {
366000
- const { claim, chart } = extraChart;
366001
- setRenderedClaim(claim, chart.toJson());
366002
- result[`${chart.kind}-${chart.metadata.name}`] = chart.toJson();
366003
- }
366004
366093
  if (!firestartrEntityJson.metadata.annotations ||
366005
366094
  !firestartrEntityJson.metadata.name)
366006
366095
  throw firestartrEntityJson;
@@ -366016,6 +366105,7 @@ async function renderClaims(catalogScope, firestartrScope, data) {
366016
366105
  async function renderClaim(catalogScope, firestartrScope, claim, patches, previousCR = null) {
366017
366106
  let catalogEntity = undefined;
366018
366107
  let firestartrEntity = undefined;
366108
+ const extraCharts = [];
366019
366109
  const chartId = `${claim.kind}-${claim.name}`.toLowerCase();
366020
366110
  let firestartrId = null;
366021
366111
  if (previousCR) {
@@ -366062,6 +366152,47 @@ async function renderClaim(catalogScope, firestartrScope, claim, patches, previo
366062
366152
  }
366063
366153
  if (loadCatalog) {
366064
366154
  catalogEntity = new charts.CatalogComponentChart(catalogScope, chartId, firestartrId, claim, renderPatches);
366155
+ const githubProvider = claim.providers?.github;
366156
+ const org = githubProvider?.org;
366157
+ const repoName = githubProvider?.name;
366158
+ const defaultBranch = githubProvider?.branchStrategy?.defaultBranch || 'main';
366159
+ for (const apiDefinition of normalizeProvidesApis(claim.providesApis)) {
366160
+ if (!org ||
366161
+ !repoName ||
366162
+ !apiDefinition?.definitionfile ||
366163
+ !apiDefinition?.name) {
366164
+ cdk8s_renderer_src_logger.warn(`Skipping API generation for component ${claim.name} due to missing github provider fields or API definition data`);
366165
+ continue;
366166
+ }
366167
+ const definitionFilePath = String(apiDefinition.definitionfile).replace(/^\/+/, '');
366168
+ const encodedDefinitionFilePath = definitionFilePath
366169
+ .split('/')
366170
+ .map((segment) => encodeURIComponent(segment))
366171
+ .join('/');
366172
+ const definitionUrl = `https://raw.githubusercontent.com/${org}/${repoName}/refs/heads/${defaultBranch}/${encodedDefinitionFilePath}`;
366173
+ const sanitizedApiName = sanitizeApiEntityName(apiDefinition.name);
366174
+ const apiChart = new charts.CatalogApiChart(catalogScope, `${chartId}-api-${sanitizedApiName}`, firestartrId, {
366175
+ name: sanitizedApiName,
366176
+ type: apiDefinition.type,
366177
+ lifecycle: claim.lifecycle,
366178
+ owner: claim.owner,
366179
+ system: claim.system,
366180
+ definitionUrl,
366181
+ annotations: {
366182
+ ...(claim.annotations || {}),
366183
+ title: apiDefinition.name,
366184
+ },
366185
+ }, []);
366186
+ await apiChart.render();
366187
+ const apiObject = await apiChart.postRenderer([]);
366188
+ extraCharts.push({
366189
+ claim: {
366190
+ kind: 'API',
366191
+ name: sanitizedApiName,
366192
+ },
366193
+ chart: apiObject,
366194
+ });
366195
+ }
366065
366196
  }
366066
366197
  break;
366067
366198
  case 'TFWorkspaceClaim':
@@ -366134,7 +366265,10 @@ async function renderClaim(catalogScope, firestartrScope, claim, patches, previo
366134
366265
  firestartrEntity: await (firestartrEntityChart
366135
366266
  ? firestartrEntityChart.postRenderer(postPatches)
366136
366267
  : undefined),
366137
- extraCharts: (await firestartrEntity?.extraCharts()) || [],
366268
+ extraCharts: [
366269
+ ...((await firestartrEntity?.extraCharts()) || []),
366270
+ ...extraCharts,
366271
+ ],
366138
366272
  };
366139
366273
  }
366140
366274
 
@@ -371115,6 +371249,7 @@ function processHandler(processToHandle, ctl, onTimedOut) {
371115
371249
 
371116
371250
 
371117
371251
 
371252
+ const TOFU_LOCK_TIMEOUT = '-lock-timeout=60s';
371118
371253
  async function utils_validate(path, secrets) {
371119
371254
  return await tfExec(path, ['validate'], secrets);
371120
371255
  }
@@ -371135,7 +371270,7 @@ async function plan(path, secrets, format, args = ['plan'], stream, ctl) {
371135
371270
  }
371136
371271
  async function apply(path, secrets, stream, ctl) {
371137
371272
  terraform_provisioner_src_logger.debug(`Running terraform apply in path ${path}`);
371138
- return await tfExec(path, ['apply', '-auto-approve'], secrets, ['-input=false'], stream, ctl);
371273
+ return await tfExec(path, ['apply', '-auto-approve', TOFU_LOCK_TIMEOUT], secrets, ['-input=false'], stream, ctl);
371139
371274
  }
371140
371275
  async function customCommand(path, secrets, args, stream) {
371141
371276
  terraform_provisioner_src_logger.debug(`Running terraform customCommand in path ${path} ${args.join(',')}`);
@@ -371143,7 +371278,7 @@ async function customCommand(path, secrets, args, stream) {
371143
371278
  }
371144
371279
  async function destroy(path, secrets, stream, ctl) {
371145
371280
  terraform_provisioner_src_logger.debug(`Running terraform destroy in path ${path}`);
371146
- return await tfExec(path, ['destroy', '-auto-approve'], secrets, ['-input=false'], stream, ctl);
371281
+ return await tfExec(path, ['destroy', '-auto-approve', TOFU_LOCK_TIMEOUT], secrets, ['-input=false'], stream, ctl);
371147
371282
  }
371148
371283
  async function output(path, secrets) {
371149
371284
  terraform_provisioner_src_logger.debug(`Running terraform output in path ${path}`);
@@ -375297,47 +375432,23 @@ async function endDebug(entity) {
375297
375432
 
375298
375433
 
375299
375434
  const tp_bridge_TF_PROJECTS_PATH = '/tmp/gh-workspaces';
375300
- const STATE_LOCK_RETRY_ATTEMPTS = 3;
375301
- const STATE_LOCK_RETRY_DELAY_MS = 5000;
375302
- function isStateLockError(error) {
375303
- const message = String(error);
375304
- return (message.includes('Error acquiring the state lock') ||
375305
- message.includes('already locked by another tofu client'));
375306
- }
375307
- async function tp_bridge_sleep(ms) {
375308
- await new Promise((resolve) => setTimeout(resolve, ms));
375309
- }
375310
- async function runTerraformProvisionerWithLockRetry(entity, command, streaming, customArgs, ctl) {
375311
- for (let attempt = 1;; attempt++) {
375312
- try {
375313
- return await runTerraformProvisioner(tp_bridge_buildContext(entity), command, streaming, customArgs, ctl);
375314
- }
375315
- catch (error) {
375316
- if (!isStateLockError(error) || attempt >= STATE_LOCK_RETRY_ATTEMPTS) {
375317
- throw error;
375318
- }
375319
- gh_provisioner_src_logger.warn(`State lock detected for ${entity.k8sId} while running '${command}'. Retrying in ${STATE_LOCK_RETRY_DELAY_MS}ms (attempt ${attempt + 1}/${STATE_LOCK_RETRY_ATTEMPTS}).`);
375320
- await tp_bridge_sleep(STATE_LOCK_RETRY_DELAY_MS);
375321
- }
375322
- }
375323
- }
375324
375435
  async function runOnTerraform(entity, command, customArgs, opts = {}) {
375325
375436
  gh_provisioner_src_logger.info(`Running on terraform entity '${entity.k8sId}' with command '${command}' customArgs = ${customArgs ? customArgs.join(',') : 'null'} `);
375326
375437
  const streaming = entity.streamTFProvisioner;
375327
375438
  if (command === 'import-with-reimport') {
375328
375439
  // we nuke the tf state
375329
- await runTerraformProvisionerWithLockRetry(entity, 'destroy-state-only', streaming, customArgs, opts.ctl);
375440
+ await runTerraformProvisioner(tp_bridge_buildContext(entity), 'destroy-state-only', streaming, customArgs, opts.ctl);
375330
375441
  // we get the elements we need to import
375331
375442
  await entity.loadAddressesToImport();
375332
- return await runTerraformProvisionerWithLockRetry(entity, 'custom-import', streaming, entity.importDocument, opts.ctl);
375443
+ return await runTerraformProvisioner(tp_bridge_buildContext(entity), 'custom-import', streaming, entity.importDocument, opts.ctl);
375333
375444
  }
375334
375445
  else if (command === 'import') {
375335
375446
  // we get the elements we need to import
375336
375447
  await entity.loadAddressesToImport();
375337
- return await runTerraformProvisionerWithLockRetry(entity, 'custom-import', streaming, entity.importDocument, opts.ctl);
375448
+ return await runTerraformProvisioner(tp_bridge_buildContext(entity), 'custom-import', streaming, entity.importDocument, opts.ctl);
375338
375449
  }
375339
375450
  else {
375340
- return await runTerraformProvisionerWithLockRetry(entity, command, streaming, customArgs, opts.ctl);
375451
+ return await runTerraformProvisioner(tp_bridge_buildContext(entity), command, streaming, customArgs, opts.ctl);
375341
375452
  }
375342
375453
  }
375343
375454
  function tp_bridge_buildContext(entity) {
@@ -379486,9 +379597,9 @@ const crs_analyzerSubcommand = {
379486
379597
  };
379487
379598
 
379488
379599
  ;// CONCATENATED MODULE: ./package.json
379489
- const package_namespaceObject = JSON.parse('{"i8":"2.1.0-snapshot-1"}');
379600
+ const package_namespaceObject = JSON.parse('{"i8":"2.2.0-snapshot-0"}');
379490
379601
  ;// CONCATENATED MODULE: ../../package.json
379491
- const package_namespaceObject_1 = {"i8":"2.0.0"};
379602
+ const package_namespaceObject_1 = {"i8":"2.1.0"};
379492
379603
  ;// CONCATENATED MODULE: ./src/subcommands/index.ts
379493
379604
 
379494
379605
 
@@ -0,0 +1,23 @@
1
+ import { BaseCatalogChart } from './base';
2
+ import { ApiObject, GroupVersionKind } from 'cdk8s';
3
+ export declare class CatalogApiChart extends BaseCatalogChart {
4
+ template(): {
5
+ apiVersion: string;
6
+ kind: string;
7
+ metadata: {
8
+ name: string;
9
+ annotations: Record<string, string>;
10
+ };
11
+ spec: {
12
+ type: string;
13
+ lifecycle: string;
14
+ owner: string;
15
+ system: string;
16
+ definition: {
17
+ $text: string;
18
+ };
19
+ };
20
+ };
21
+ instanceApiObject(template: any): ApiObject;
22
+ gvk(): GroupVersionKind;
23
+ }
@@ -11,6 +11,8 @@ export declare class CatalogComponentChart extends BaseCatalogChart {
11
11
  };
12
12
  };
13
13
  spec: {
14
+ consumesApis?: string[];
15
+ providesApis?: string[];
14
16
  type: string;
15
17
  lifecycle: string;
16
18
  owner: string;
@@ -7,3 +7,4 @@ export { CatalogTFWorkspaceChart } from './tfWorkspaceChart';
7
7
  export { CatalogArgoDeployChart } from './argodeployChart';
8
8
  export { CatalogSecretsChart } from './secretsChart';
9
9
  export { CatalogOrgWebhookChart } from './orgWebhookChart';
10
+ export { CatalogApiChart } from './apiChart';
@@ -1,5 +1,5 @@
1
1
  import { GithubGroupChart, GithubMembershipChart, GithubRepositoryChart, GithubOrgWebhookChart } from './github';
2
- import { CatalogComponentChart, CatalogDomainChart, CatalogGroupChart, CatalogSystemChart, CatalogUserChart, CatalogTFWorkspaceChart, CatalogArgoDeployChart, CatalogSecretsChart, CatalogOrgWebhookChart } from './catalog';
2
+ import { CatalogComponentChart, CatalogDomainChart, CatalogGroupChart, CatalogSystemChart, CatalogUserChart, CatalogTFWorkspaceChart, CatalogArgoDeployChart, CatalogSecretsChart, CatalogOrgWebhookChart, CatalogApiChart } from './catalog';
3
3
  import { TFWorkspaceChart } from './workspaces/tfworkspaceChart';
4
4
  import { ArgoDeployChart } from './argocd/argodeployChart';
5
5
  import { SecretsChart } from './secrets/secretsChart';
@@ -13,6 +13,7 @@ declare const _default: {
13
13
  CatalogArgoDeployChart: typeof CatalogArgoDeployChart;
14
14
  CatalogSecretsChart: typeof CatalogSecretsChart;
15
15
  CatalogOrgWebhookChart: typeof CatalogOrgWebhookChart;
16
+ CatalogApiChart: typeof CatalogApiChart;
16
17
  GithubGroupChart: typeof GithubGroupChart;
17
18
  GithubMembershipChart: typeof GithubMembershipChart;
18
19
  GithubRepositoryChart: typeof GithubRepositoryChart;
@@ -1,4 +1,9 @@
1
1
  import { IClaim } from '../base';
2
+ export interface IApiDefinition {
3
+ name: string;
4
+ definitionfile: string;
5
+ type: string;
6
+ }
2
7
  export interface IComponentClaim extends IClaim {
3
8
  type: string;
4
9
  lifecycle: string;
@@ -9,5 +14,7 @@ export interface IComponentClaim extends IClaim {
9
14
  providers: object;
10
15
  platformOwner?: `${string}:${string}`;
11
16
  maintainedBy?: `${string}:${string}`[];
17
+ providesApis?: IApiDefinition[] | Record<string, IApiDefinition>;
18
+ consumesApis?: string[];
12
19
  }
13
20
  export declare const schema = "firestartr.dev://common/ComponentClaim";
@@ -2,6 +2,23 @@ declare const _default: {
2
2
  $schema: string;
3
3
  $id: string;
4
4
  definitions: {
5
+ ApiDefinition: {
6
+ $id: string;
7
+ type: string;
8
+ properties: {
9
+ name: {
10
+ type: string;
11
+ };
12
+ definitionfile: {
13
+ type: string;
14
+ };
15
+ type: {
16
+ type: string;
17
+ };
18
+ };
19
+ required: string[];
20
+ additionalProperties: boolean;
21
+ };
5
22
  ComponentClaim: {
6
23
  $id: string;
7
24
  type: string;
@@ -33,6 +50,27 @@ declare const _default: {
33
50
  subComponentOf: {
34
51
  $ref: string;
35
52
  };
53
+ providesApis: {
54
+ anyOf: ({
55
+ type: string;
56
+ items: {
57
+ $ref: string;
58
+ };
59
+ additionalProperties?: undefined;
60
+ } | {
61
+ type: string;
62
+ additionalProperties: {
63
+ $ref: string;
64
+ };
65
+ items?: undefined;
66
+ })[];
67
+ };
68
+ consumesApis: {
69
+ type: string;
70
+ items: {
71
+ type: string;
72
+ };
73
+ };
36
74
  providers: {
37
75
  type: string;
38
76
  properties: {
@@ -247,6 +247,23 @@ declare const schemas: {
247
247
  $schema: string;
248
248
  $id: string;
249
249
  definitions: {
250
+ ApiDefinition: {
251
+ $id: string;
252
+ type: string;
253
+ properties: {
254
+ name: {
255
+ type: string;
256
+ };
257
+ definitionfile: {
258
+ type: string;
259
+ };
260
+ type: {
261
+ type: string;
262
+ };
263
+ };
264
+ required: string[];
265
+ additionalProperties: boolean;
266
+ };
250
267
  ComponentClaim: {
251
268
  $id: string;
252
269
  type: string;
@@ -278,6 +295,27 @@ declare const schemas: {
278
295
  subComponentOf: {
279
296
  $ref: string;
280
297
  };
298
+ providesApis: {
299
+ anyOf: ({
300
+ type: string;
301
+ items: {
302
+ $ref: string;
303
+ };
304
+ additionalProperties?: undefined;
305
+ } | {
306
+ type: string;
307
+ additionalProperties: {
308
+ $ref: string;
309
+ };
310
+ items?: undefined;
311
+ })[];
312
+ };
313
+ consumesApis: {
314
+ type: string;
315
+ items: {
316
+ type: string;
317
+ };
318
+ };
281
319
  providers: {
282
320
  type: string;
283
321
  properties: {
@@ -4,3 +4,4 @@ export declare function resolveClaimFilesList(claimRefsList: string): string[];
4
4
  export declare function resolveClaimEntries(claimRefsList: string[]): AsyncGenerator<string, void, unknown>;
5
5
  export declare function resolveClaimFileRef(claimFile: string): Promise<string>;
6
6
  export declare function getClaimsEntryAbsolutePath(claimsDir: string, entryPath: string): string;
7
+ export declare function sanitizeApiEntityName(name: string): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firestartr/cli",
3
- "version": "2.1.0-snapshot-1",
3
+ "version": "2.2.0-snapshot-0",
4
4
  "private": false,
5
5
  "description": "Commandline tool",
6
6
  "main": "build/main.js",