@microsoft/m365-spec-parser 0.2.2-beta.2024092901.0 → 0.2.2-beta.2024092902.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.
@@ -1646,16 +1646,28 @@ class ManifestUpdater {
1646
1646
  return __awaiter(this, void 0, void 0, function* () {
1647
1647
  const manifest = yield fs__default['default'].readJSON(manifestPath);
1648
1648
  const apiPluginRelativePath = ManifestUpdater.getRelativePath(manifestPath, apiPluginFilePath);
1649
- manifest.copilotExtensions = manifest.copilotExtensions || {};
1650
- // Insert plugins in manifest.json if it is plugin for Copilot.
1651
- if (!options.isGptPlugin) {
1652
- manifest.copilotExtensions.plugins = [
1653
- {
1654
- file: apiPluginRelativePath,
1655
- id: ConstantString.DefaultPluginId,
1656
- },
1657
- ];
1658
- ManifestUpdater.updateManifestDescription(manifest, spec);
1649
+ if (manifest.copilotExtensions) {
1650
+ if (!options.isGptPlugin) {
1651
+ manifest.copilotExtensions.plugins = [
1652
+ {
1653
+ file: apiPluginRelativePath,
1654
+ id: ConstantString.DefaultPluginId,
1655
+ },
1656
+ ];
1657
+ ManifestUpdater.updateManifestDescription(manifest, spec);
1658
+ }
1659
+ }
1660
+ else {
1661
+ manifest.copilotAgents = manifest.copilotAgents || {};
1662
+ if (!options.isGptPlugin) {
1663
+ manifest.copilotAgents.plugins = [
1664
+ {
1665
+ file: apiPluginRelativePath,
1666
+ id: ConstantString.DefaultPluginId,
1667
+ },
1668
+ ];
1669
+ ManifestUpdater.updateManifestDescription(manifest, spec);
1670
+ }
1659
1671
  }
1660
1672
  const appName = this.removeEnvs(manifest.name.short);
1661
1673
  const specRelativePath = ManifestUpdater.getRelativePath(manifestPath, outputSpecPath);