serverless-plugin-module-registry 1.0.12-alpha.3 → 1.0.12

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/dist/index.d.ts CHANGED
@@ -458,18 +458,6 @@ declare class ServerlessModuleRegistryPlugin {
458
458
  * Runs BEFORE main deployment to ensure table exists
459
459
  */
460
460
  private deployInternalInfrastructure;
461
- /**
462
- * Standalone command handler: deploy module registry infrastructure
463
- * Bypasses the `enabled: false` check — deploys the DynamoDB table, EventBridge bus, SQS, and Lambda processors.
464
- * Usage: `npx serverless@4 registryDeployInfra --stage dev --region sa-east-1`
465
- */
466
- private registryDeployInfraHandler;
467
- /**
468
- * Standalone command handler: validate/package module registry infrastructure
469
- * Validates configuration and checks that internal-infrastructure directory exists.
470
- * Usage: `npx serverless@4 registryPackageInfra --stage dev --region sa-east-1`
471
- */
472
- private registryPackageInfraHandler;
473
461
  /**
474
462
  * Handler for the registryGenerate command
475
463
  */
package/dist/index.js CHANGED
@@ -16069,30 +16069,6 @@ var PLUGIN_COMMANDS = {
16069
16069
  type: "boolean"
16070
16070
  }
16071
16071
  }
16072
- },
16073
- registryDeployInfra: {
16074
- usage: "Deploy the module registry internal infrastructure stack (DynamoDB, EventBridge, SQS, Lambda)",
16075
- lifecycleEvents: ["deploy"],
16076
- options: {
16077
- force: {
16078
- usage: "Force deploy even if internalInfrastructure.enabled is false",
16079
- shortcut: "f",
16080
- required: false,
16081
- type: "boolean"
16082
- }
16083
- }
16084
- },
16085
- registryPackageInfra: {
16086
- usage: "Validate and package the module registry internal infrastructure",
16087
- lifecycleEvents: ["package"],
16088
- options: {
16089
- verbose: {
16090
- usage: "Show detailed validation information",
16091
- shortcut: "v",
16092
- required: false,
16093
- type: "boolean"
16094
- }
16095
- }
16096
16072
  }
16097
16073
  };
16098
16074
  var PLUGIN_HOOKS = {
@@ -16100,9 +16076,7 @@ var PLUGIN_HOOKS = {
16100
16076
  "before:package:initialize": "processModuleRegistryWithVariableResolution",
16101
16077
  "after:aws:deploy:deploy:updateStack": "ensureTableAndUpdateData",
16102
16078
  "registryGenerate:generate": "registryGenerateHandler",
16103
- "registryGeneratePackage:create": "generateServicePackageCommand",
16104
- "registryDeployInfra:deploy": "registryDeployInfraHandler",
16105
- "registryPackageInfra:package": "registryPackageInfraHandler"
16079
+ "registryGeneratePackage:create": "generateServicePackageCommand"
16106
16080
  };
16107
16081
 
16108
16082
  // src/core/config.ts
@@ -19616,90 +19590,6 @@ var ServerlessModuleRegistryPlugin = class {
19616
19590
  throw new Error(`Infrastructure deployment failed: ${errorMessage}`);
19617
19591
  }
19618
19592
  }
19619
- /**
19620
- * Standalone command handler: deploy module registry infrastructure
19621
- * Bypasses the `enabled: false` check — deploys the DynamoDB table, EventBridge bus, SQS, and Lambda processors.
19622
- * Usage: `npx serverless@4 registryDeployInfra --stage dev --region sa-east-1`
19623
- */
19624
- async registryDeployInfraHandler() {
19625
- var _a4;
19626
- this.pluginLogger.trackHookCall("registryDeployInfra:deploy");
19627
- try {
19628
- this.logger.info("\u{1F680} Force-deploying Module Registry internal infrastructure...");
19629
- const config = this.configManager.config;
19630
- const serviceName = this.serverless.service.service;
19631
- const stage = this.serverless.service.provider.stage || "dev";
19632
- const region = config.region || this.serverless.service.provider.region || "us-east-1";
19633
- const accountId = await this.getAwsAccountId();
19634
- const tableName = config.tableName;
19635
- const policyPrefix = config.policyPrefix || "";
19636
- const infraStackName = ((_a4 = config.internalInfrastructure) == null ? void 0 : _a4.stackName) || `${serviceName}-${stage}-module-registry`;
19637
- this.logger.info(` Service: ${serviceName}`);
19638
- this.logger.info(` Stack: ${infraStackName}`);
19639
- this.logger.info(` Stage: ${stage}`);
19640
- this.logger.info(` Region: ${region}`);
19641
- this.logger.info(` Table: ${tableName}`);
19642
- this.logger.info(` Account: ${accountId || "(auto-detect)"}`);
19643
- const updatedInfraConfig = {
19644
- enabled: true,
19645
- stackName: infraStackName,
19646
- stage,
19647
- region,
19648
- tableName,
19649
- tableArn: `arn:aws:dynamodb:${region}:${accountId}:table/${tableName}`
19650
- };
19651
- this.configManager._config.internalInfrastructure = updatedInfraConfig;
19652
- if (accountId) {
19653
- process.env.AWS_ACCOUNT_ID = accountId;
19654
- }
19655
- const metadata = await deployInternalInfrastructure(this.configManager.config, this.logger);
19656
- this.logger.info("\u2705 Module Registry infrastructure deployed successfully");
19657
- this.logger.info(` Stack: ${metadata.stackName}`);
19658
- this.logger.info(` Stream ARN: ${metadata.streamArn}`);
19659
- this.logger.info(` Queue URL: ${metadata.queueUrl}`);
19660
- } catch (error) {
19661
- const errorMessage = error.message || String(error);
19662
- this.logger.error(`\u274C Module Registry infrastructure deployment failed: ${errorMessage}`);
19663
- throw new Error(`Module Registry infrastructure deployment failed: ${errorMessage}`);
19664
- }
19665
- }
19666
- /**
19667
- * Standalone command handler: validate/package module registry infrastructure
19668
- * Validates configuration and checks that internal-infrastructure directory exists.
19669
- * Usage: `npx serverless@4 registryPackageInfra --stage dev --region sa-east-1`
19670
- */
19671
- async registryPackageInfraHandler() {
19672
- var _a4;
19673
- this.pluginLogger.trackHookCall("registryPackageInfra:package");
19674
- try {
19675
- this.logger.info("\u{1F4E6} Validating Module Registry infrastructure configuration...");
19676
- const config = this.configManager.config;
19677
- const serviceName = this.serverless.service.service;
19678
- const stage = this.serverless.service.provider.stage || "dev";
19679
- const region = config.region || this.serverless.service.provider.region || "us-east-1";
19680
- const tableName = config.tableName;
19681
- const infraStackName = ((_a4 = config.internalInfrastructure) == null ? void 0 : _a4.stackName) || `${serviceName}-${stage}-module-registry`;
19682
- this.logger.info(` Service: ${serviceName}`);
19683
- this.logger.info(` Stack: ${infraStackName}`);
19684
- this.logger.info(` Stage: ${stage}`);
19685
- this.logger.info(` Region: ${region}`);
19686
- this.logger.info(` Table: ${tableName}`);
19687
- const infraDir = import_path7.default.join(__dirname, "..", "src", "internal-infrastructure");
19688
- if (!import_fs7.default.existsSync(infraDir)) {
19689
- throw new Error(`Internal infrastructure directory not found at: ${infraDir}. Ensure src/internal-infrastructure/ is included in the plugin package.`);
19690
- }
19691
- const slsYml = import_path7.default.join(infraDir, "serverless.yml");
19692
- if (!import_fs7.default.existsSync(slsYml)) {
19693
- throw new Error(`serverless.yml not found at: ${slsYml}`);
19694
- }
19695
- this.logger.info(` Infrastructure dir: ${infraDir}`);
19696
- this.logger.info("\u2705 Infrastructure configuration validated \u2014 ready for deploy");
19697
- } catch (error) {
19698
- const errorMessage = error.message || String(error);
19699
- this.logger.error(`\u274C Infrastructure validation failed: ${errorMessage}`);
19700
- throw error;
19701
- }
19702
- }
19703
19593
  /**
19704
19594
  * Handler for the registryGenerate command
19705
19595
  */