{"version":3,"file":"ConsumeSharedPlugin.cjs","names":[],"sources":["../../../src/types/plugins/ConsumeSharedPlugin.ts"],"sourcesContent":["/*\n * This file was automatically generated.\n * DO NOT MODIFY BY HAND.\n * Run `pnpm generate:schema -w` to update.\n */\n\n/**\n * A module that should be consumed from share scope.\n */\nexport type ConsumesItem = string;\n\n/**\n * Advanced configuration for modules that should be consumed from share scope.\n */\nexport interface ConsumesConfig {\n  /**\n   * Include the fallback module directly instead behind an async request. This allows to use fallback module in initial load too. All possible shared modules need to be eager too.\n   */\n  eager?: boolean;\n  /**\n   * Fallback module if no shared module is found in share scope. Defaults to the property name.\n   */\n  import?: false | ConsumesItem;\n  /**\n   * Package name to determine required version from description file. This is only needed when package name can't be automatically determined from request.\n   */\n  packageName?: string;\n  /**\n   * Version requirement from module in share scope.\n   */\n  requiredVersion?: false | string;\n  /**\n   * Module is looked up under this key from the share scope.\n   */\n  shareKey?: string;\n  /**\n   * Share scope name.\n   */\n  shareScope?: string | string[];\n  /**\n   * Layer in which the shared module should be placed.\n   */\n  layer?: string;\n  /**\n   * Layer of the issuer.\n   */\n  issuerLayer?: string;\n  /**\n   * Import request to match on\n   */\n  request?: string;\n  /**\n   * Allow only a single version of the shared module in share scope (disabled by default).\n   */\n  singleton?: boolean;\n  /**\n   * Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available and shared module is not a singleton, otherwise no, has no effect if there is no required version specified).\n   */\n  strictVersion?: boolean;\n  /**\n   * Filter consumed modules based on the request path.\n   */\n  exclude?: IncludeExcludeOptions;\n  /**\n   * Filter consumed modules based on the request path (only include matches).\n   */\n  include?: IncludeExcludeOptions;\n  /**\n   * Enable reconstructed lookup for node_modules paths for this share item\n   */\n  allowNodeModulesSuffixMatch?: boolean;\n  /**\n   * Tree shaking mode for the shared module.\n   */\n  treeShakingMode?: 'server-calc' | 'runtime-infer';\n}\n\n/**\n * Modules that should be consumed from share scope. Property names are used to match requested modules in this compilation. Relative requests are resolved, module requests are matched unresolved, absolute paths will match resolved requests. A trailing slash will match all requests with this prefix. In this case shareKey must also have a trailing slash.\n */\nexport interface ConsumesObject {\n  [k: string]: ConsumesConfig | ConsumesItem;\n}\n\n/**\n * Modules that should be consumed from share scope. When provided, property names are used to match requested modules in this compilation.\n */\nexport type Consumes = (ConsumesItem | ConsumesObject)[] | ConsumesObject;\n\nexport interface IncludeExcludeOptions {\n  request?: string | RegExp;\n  /**\n   * Semantic versioning range to match against the module's version.\n   */\n  version?: string;\n  /**\n   * Optional specific version string to check against the version range instead of reading package.json.\n   */\n  fallbackVersion?: string;\n}\n\nexport interface ConsumeSharedPluginOptions {\n  consumes: Consumes;\n  /**\n   * Share scope name used for all consumed modules (defaults to 'default').\n   */\n  shareScope?: string | string[];\n  /**\n   * Experimental features configuration\n   */\n  experiments?: {\n    /** Enable reconstructed lookup for node_modules paths */\n    allowNodeModulesSuffixMatch?: boolean;\n  };\n}\n"],"mappings":""}