@microsoft/generator-sharepoint 1.21.1 → 1.22.0-beta.2

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.
Files changed (147) hide show
  1. package/lib/common/BaseGenerator.js +16 -7
  2. package/lib/common/ConfigJsonManager.js +1 -1
  3. package/lib/common/JsonManager.js +1 -1
  4. package/lib/common/PackageJsonManager.js +16 -1
  5. package/lib/common/PackageSolutionJsonManager.js +1 -1
  6. package/lib/common/ServeJsonManager.js +1 -1
  7. package/lib/common/TeamsManifestJsonManager.js +1 -1
  8. package/lib/common/YeomanConfiguration.js +6 -6
  9. package/lib/common/dependencies.json +65 -63
  10. package/lib/common/spsay.js +6 -6
  11. package/lib/common/utilities.js +1 -1
  12. package/lib/generators/adaptiveCardExtension/BaseAdaptiveCardExtensionGenerator.js +1 -1
  13. package/lib/generators/adaptiveCardExtension/index.js +1 -1
  14. package/lib/generators/app/index.js +15 -6
  15. package/lib/generators/applicationCustomizer/index.js +2 -1
  16. package/lib/generators/commandSet/index.js +2 -1
  17. package/lib/generators/component/BaseComponentGenerator.js +2 -2
  18. package/lib/generators/component/index.js +1 -1
  19. package/lib/generators/dataVisualizationAdaptiveCardExtension/index.js +2 -1
  20. package/lib/generators/extension/BaseExtensionGenerator.js +1 -1
  21. package/lib/generators/extension/index.js +1 -1
  22. package/lib/generators/fieldCustomizer/index.js +2 -1
  23. package/lib/generators/formCustomizer/index.js +2 -1
  24. package/lib/generators/genericAdaptiveCardExtension/index.js +2 -1
  25. package/lib/generators/library/index.js +2 -1
  26. package/lib/generators/searchAdaptiveCardExtension/index.js +2 -1
  27. package/lib/generators/searchQueryModifier/index.js +2 -1
  28. package/lib/generators/solution/heft.package.json +6 -2
  29. package/lib/generators/solution/index.js +21 -19
  30. package/lib/generators/webpart/index.js +2 -1
  31. package/lib/{generators/dataVisualizationAdaptiveCardExtension/templates → templates/dataVisualizationAdaptiveCardExtension}/none/{componentClassName}.ts +2 -2
  32. package/lib/{generators/genericAdaptiveCardExtension/templates → templates/genericAdaptiveCardExtension}/none/{componentClassName}.ts +2 -2
  33. package/lib/{generators/searchAdaptiveCardExtension/templates → templates/searchAdaptiveCardExtension}/none/{componentClassName}.ts +2 -2
  34. package/lib/{generators/searchQueryModifier/templates → templates/searchQueryModifier}/base/{componentClassName}.manifest.json +1 -1
  35. package/lib/{generators/solution/templates → templates/solution}/base/README.md +1 -1
  36. package/lib/{generators/solution/templates → templates/solution}/base/_gitignore +4 -0
  37. package/lib/{generators/solution/templates → templates/solution}/base/config/deploy-azure-storage.json +1 -1
  38. package/lib/templates/solution/heft/_npmignore +22 -0
  39. package/lib/templates/solution/heft/config/heft.json +41 -0
  40. package/lib/templates/solution/heft/config/sass.json +5 -0
  41. package/lib/templates/solution/heft/config/typescript.json +9 -0
  42. package/lib/templates/solution/heft/tsconfig.json +3 -0
  43. package/package.json +12 -11
  44. package/lib/generators/solution/templates/heft/_npmignore +0 -16
  45. package/lib/generators/solution/templates/heft/config/typescript.json +0 -21
  46. package/lib/generators/solution/templates/heft/tsconfig.json +0 -6
  47. /package/lib/{generators/applicationCustomizer/templates → templates/applicationCustomizer}/base/loc/en-us.js +0 -0
  48. /package/lib/{generators/applicationCustomizer/templates → templates/applicationCustomizer}/base/loc/myStrings.d.ts +0 -0
  49. /package/lib/{generators/applicationCustomizer/templates → templates/applicationCustomizer}/base/{componentClassName}.manifest.json +0 -0
  50. /package/lib/{generators/applicationCustomizer/templates → templates/applicationCustomizer}/none/{componentClassName}.ts +0 -0
  51. /package/lib/{generators/applicationCustomizer/templates → templates/applicationCustomizer}/sharepoint/assets/ClientSideInstance.xml +0 -0
  52. /package/lib/{generators/applicationCustomizer/templates → templates/applicationCustomizer}/sharepoint/assets/elements.xml +0 -0
  53. /package/lib/{generators/commandSet/templates → templates/commandSet}/base/loc/en-us.js +0 -0
  54. /package/lib/{generators/commandSet/templates → templates/commandSet}/base/loc/myStrings.d.ts +0 -0
  55. /package/lib/{generators/commandSet/templates → templates/commandSet}/base/{componentClassName}.manifest.json +0 -0
  56. /package/lib/{generators/commandSet/templates → templates/commandSet}/none/{componentClassName}.ts +0 -0
  57. /package/lib/{generators/commandSet/templates → templates/commandSet}/sharepoint/assets/ClientSideInstance.xml +0 -0
  58. /package/lib/{generators/commandSet/templates → templates/commandSet}/sharepoint/assets/elements.xml +0 -0
  59. /package/lib/{generators/component/templates → templates/component}/eslint/.eslintrc.js +0 -0
  60. /package/lib/{generators/dataVisualizationAdaptiveCardExtension/templates → templates/dataVisualizationAdaptiveCardExtension}/base/loc/en-us.js +0 -0
  61. /package/lib/{generators/dataVisualizationAdaptiveCardExtension/templates → templates/dataVisualizationAdaptiveCardExtension}/base/loc/mystring.d.ts +0 -0
  62. /package/lib/{generators/dataVisualizationAdaptiveCardExtension/templates → templates/dataVisualizationAdaptiveCardExtension}/none/cardView/CardView.ts +0 -0
  63. /package/lib/{generators/dataVisualizationAdaptiveCardExtension/templates → templates/dataVisualizationAdaptiveCardExtension}/none/quickView/QuickView.ts +0 -0
  64. /package/lib/{generators/dataVisualizationAdaptiveCardExtension/templates → templates/dataVisualizationAdaptiveCardExtension}/none/quickView/template/QuickViewTemplate.json +0 -0
  65. /package/lib/{generators/dataVisualizationAdaptiveCardExtension/templates → templates/dataVisualizationAdaptiveCardExtension}/none/{componentClassName}.manifest.json +0 -0
  66. /package/lib/{generators/dataVisualizationAdaptiveCardExtension/templates → templates/dataVisualizationAdaptiveCardExtension}/none/{componentName}PropertyPane.ts +0 -0
  67. /package/lib/{generators/fieldCustomizer/templates → templates/fieldCustomizer}/base/{componentClassName}.manifest.json +0 -0
  68. /package/lib/{generators/fieldCustomizer/templates → templates/fieldCustomizer}/loc/en-us.js +0 -0
  69. /package/lib/{generators/fieldCustomizer/templates → templates/fieldCustomizer}/loc/myStrings.d.ts +0 -0
  70. /package/lib/{generators/fieldCustomizer/templates → templates/fieldCustomizer}/minimal/loc/en-us.js +0 -0
  71. /package/lib/{generators/fieldCustomizer/templates → templates/fieldCustomizer}/minimal/loc/myStrings.d.ts +0 -0
  72. /package/lib/{generators/fieldCustomizer/templates → templates/fieldCustomizer}/minimal/{componentClassName}.module.scss +0 -0
  73. /package/lib/{generators/fieldCustomizer/templates → templates/fieldCustomizer}/minimal/{componentClassName}.ts +0 -0
  74. /package/lib/{generators/fieldCustomizer/templates → templates/fieldCustomizer}/none/{componentClassName}.module.scss +0 -0
  75. /package/lib/{generators/fieldCustomizer/templates → templates/fieldCustomizer}/none/{componentClassName}.ts +0 -0
  76. /package/lib/{generators/fieldCustomizer/templates → templates/fieldCustomizer}/react/components/{componentName}.module.scss +0 -0
  77. /package/lib/{generators/fieldCustomizer/templates → templates/fieldCustomizer}/react/components/{componentName}.tsx +0 -0
  78. /package/lib/{generators/fieldCustomizer/templates → templates/fieldCustomizer}/react/{componentClassName}.ts +0 -0
  79. /package/lib/{generators/fieldCustomizer/templates → templates/fieldCustomizer}/sharepoint/assets/elements.xml +0 -0
  80. /package/lib/{generators/formCustomizer/templates → templates/formCustomizer}/base/{componentClassName}.manifest.json +0 -0
  81. /package/lib/{generators/formCustomizer/templates → templates/formCustomizer}/loc/en-us.js +0 -0
  82. /package/lib/{generators/formCustomizer/templates → templates/formCustomizer}/loc/myStrings.d.ts +0 -0
  83. /package/lib/{generators/formCustomizer/templates → templates/formCustomizer}/none/{componentClassName}.module.scss +0 -0
  84. /package/lib/{generators/formCustomizer/templates → templates/formCustomizer}/none/{componentClassName}.ts +0 -0
  85. /package/lib/{generators/formCustomizer/templates → templates/formCustomizer}/react/components/{componentName}.module.scss +0 -0
  86. /package/lib/{generators/formCustomizer/templates → templates/formCustomizer}/react/components/{componentName}.tsx +0 -0
  87. /package/lib/{generators/formCustomizer/templates → templates/formCustomizer}/react/{componentClassName}.ts +0 -0
  88. /package/lib/{generators/genericAdaptiveCardExtension/templates → templates/genericAdaptiveCardExtension}/base/assets/MicrosoftLogo.png +0 -0
  89. /package/lib/{generators/genericAdaptiveCardExtension/templates → templates/genericAdaptiveCardExtension}/base/loc/en-us.js +0 -0
  90. /package/lib/{generators/genericAdaptiveCardExtension/templates → templates/genericAdaptiveCardExtension}/base/loc/mystring.d.ts +0 -0
  91. /package/lib/{generators/genericAdaptiveCardExtension/templates → templates/genericAdaptiveCardExtension}/basicCardView/CardView.ts +0 -0
  92. /package/lib/{generators/genericAdaptiveCardExtension/templates → templates/genericAdaptiveCardExtension}/genericCardView/CardView.ts +0 -0
  93. /package/lib/{generators/genericAdaptiveCardExtension/templates → templates/genericAdaptiveCardExtension}/imageCardView/CardView.ts +0 -0
  94. /package/lib/{generators/genericAdaptiveCardExtension/templates/manifestTemplate/componentsTemplate → templates/genericAdaptiveCardExtension/manifestTemplate/baseTemplate}/{componentClassName}.manifest.json +0 -0
  95. /package/lib/{generators/genericAdaptiveCardExtension/templates/manifestTemplate/baseTemplate → templates/genericAdaptiveCardExtension/manifestTemplate/componentsTemplate}/{componentClassName}.manifest.json +0 -0
  96. /package/lib/{generators/genericAdaptiveCardExtension/templates → templates/genericAdaptiveCardExtension}/manifestTemplate/imageTemplate/{componentClassName}.manifest.json +0 -0
  97. /package/lib/{generators/genericAdaptiveCardExtension/templates → templates/genericAdaptiveCardExtension}/none/quickView/QuickView.ts +0 -0
  98. /package/lib/{generators/genericAdaptiveCardExtension/templates → templates/genericAdaptiveCardExtension}/none/quickView/template/QuickViewTemplate.json +0 -0
  99. /package/lib/{generators/genericAdaptiveCardExtension/templates → templates/genericAdaptiveCardExtension}/none/{componentName}PropertyPane.ts +0 -0
  100. /package/lib/{generators/genericAdaptiveCardExtension/templates → templates/genericAdaptiveCardExtension}/primaryTextCardView/CardView.ts +0 -0
  101. /package/lib/{generators/library/templates → templates/library}/base/loc/en-us.js +0 -0
  102. /package/lib/{generators/library/templates → templates/library}/base/loc/mystrings.d.ts +0 -0
  103. /package/lib/{generators/library/templates → templates/library}/base/{componentClassName}.manifest.json +0 -0
  104. /package/lib/{generators/library/templates → templates/library}/index/index.ts +0 -0
  105. /package/lib/{generators/library/templates → templates/library}/none/{componentClassName}.ts +0 -0
  106. /package/lib/{generators/searchAdaptiveCardExtension/templates → templates/searchAdaptiveCardExtension}/base/assets/MicrosoftLogo.png +0 -0
  107. /package/lib/{generators/searchAdaptiveCardExtension/templates → templates/searchAdaptiveCardExtension}/base/loc/en-us.js +0 -0
  108. /package/lib/{generators/searchAdaptiveCardExtension/templates → templates/searchAdaptiveCardExtension}/base/loc/mystring.d.ts +0 -0
  109. /package/lib/{generators/searchAdaptiveCardExtension/templates → templates/searchAdaptiveCardExtension}/none/cardView/CardView.ts +0 -0
  110. /package/lib/{generators/searchAdaptiveCardExtension/templates → templates/searchAdaptiveCardExtension}/none/quickView/ItemQuickView.ts +0 -0
  111. /package/lib/{generators/searchAdaptiveCardExtension/templates → templates/searchAdaptiveCardExtension}/none/quickView/SearchResultsQuickView.ts +0 -0
  112. /package/lib/{generators/searchAdaptiveCardExtension/templates → templates/searchAdaptiveCardExtension}/none/quickView/template/ItemQuickViewTemplate.json +0 -0
  113. /package/lib/{generators/searchAdaptiveCardExtension/templates → templates/searchAdaptiveCardExtension}/none/quickView/template/SearchResultsQuickViewTemplate.json +0 -0
  114. /package/lib/{generators/searchAdaptiveCardExtension/templates → templates/searchAdaptiveCardExtension}/none/{componentClassName}.manifest.json +0 -0
  115. /package/lib/{generators/searchAdaptiveCardExtension/templates → templates/searchAdaptiveCardExtension}/none/{componentName}PropertyPane.ts +0 -0
  116. /package/lib/{generators/searchQueryModifier/templates → templates/searchQueryModifier}/base/loc/en-us.js +0 -0
  117. /package/lib/{generators/searchQueryModifier/templates → templates/searchQueryModifier}/base/loc/myStrings.d.ts +0 -0
  118. /package/lib/{generators/searchQueryModifier/templates → templates/searchQueryModifier}/none/{componentClassName}.ts +0 -0
  119. /package/lib/{generators/searchQueryModifier/templates → templates/searchQueryModifier}/sharepoint/assets/ClientSideInstance.xml +0 -0
  120. /package/lib/{generators/searchQueryModifier/templates → templates/searchQueryModifier}/sharepoint/assets/elements.xml +0 -0
  121. /package/lib/{generators/solution/templates → templates/solution}/base/.vscode/settings.json +0 -0
  122. /package/lib/{generators/solution/templates → templates/solution}/base/config/serve.json +0 -0
  123. /package/lib/{generators/solution/templates → templates/solution}/base/config/write-manifests.json +0 -0
  124. /package/lib/{generators/solution/templates → templates/solution}/gulp/.vscode/launch.json +0 -0
  125. /package/lib/{generators/solution/templates → templates/solution}/gulp/_npmignore +0 -0
  126. /package/lib/{generators/solution/templates/base → templates/solution/gulp}/config/sass.json +0 -0
  127. /package/lib/{generators/solution/templates → templates/solution}/gulp/gulpfile.js +0 -0
  128. /package/lib/{generators/solution/templates → templates/solution}/gulp/src/index.ts +0 -0
  129. /package/lib/{generators/solution/templates → templates/solution}/heft/config/rig.json +0 -0
  130. /package/lib/{generators/solution/templates → templates/solution}/spo/tsconfig.json +0 -0
  131. /package/lib/{generators/webpart/templates → templates/webpart}/assets/welcome-dark.png +0 -0
  132. /package/lib/{generators/webpart/templates → templates/webpart}/assets/welcome-light.png +0 -0
  133. /package/lib/{generators/webpart/templates → templates/webpart}/base/{componentClassName}.manifest.json +0 -0
  134. /package/lib/{generators/webpart/templates → templates/webpart}/images/color.png +0 -0
  135. /package/lib/{generators/webpart/templates → templates/webpart}/images/outline.png +0 -0
  136. /package/lib/{generators/webpart/templates → templates/webpart}/loc/en-us.js +0 -0
  137. /package/lib/{generators/webpart/templates → templates/webpart}/loc/mystrings.d.ts +0 -0
  138. /package/lib/{generators/webpart/templates → templates/webpart}/minimal/loc/en-us.js +0 -0
  139. /package/lib/{generators/webpart/templates → templates/webpart}/minimal/loc/mystrings.d.ts +0 -0
  140. /package/lib/{generators/webpart/templates → templates/webpart}/minimal/{componentClassName}.module.scss +0 -0
  141. /package/lib/{generators/webpart/templates → templates/webpart}/minimal/{componentClassName}.ts +0 -0
  142. /package/lib/{generators/webpart/templates → templates/webpart}/none/{componentClassName}.module.scss +0 -0
  143. /package/lib/{generators/webpart/templates → templates/webpart}/none/{componentClassName}.ts +0 -0
  144. /package/lib/{generators/webpart/templates → templates/webpart}/react/components/I{componentName}Props.ts +0 -0
  145. /package/lib/{generators/webpart/templates → templates/webpart}/react/components/{componentName}.module.scss +0 -0
  146. /package/lib/{generators/webpart/templates → templates/webpart}/react/components/{componentName}.tsx +0 -0
  147. /package/lib/{generators/webpart/templates → templates/webpart}/react/{componentClassName}.ts +0 -0
@@ -84,6 +84,7 @@ class SearchAdaptiveCardExtensionGenerator extends _BaseAdaptiveCardExtensionGen
84
84
  }
85
85
  writing() {
86
86
  if (this._shouldExecute()) {
87
+ this.sourceRoot(_path.join(__dirname, '../../templates/searchAdaptiveCardExtension'));
87
88
  super.writing(true);
88
89
  }
89
90
  }
@@ -109,4 +110,4 @@ module.exports = SearchAdaptiveCardExtensionGenerator;
109
110
  module.exports.defineOptions = defineOptions;
110
111
  module.exports.composeWith = composeWith;
111
112
 
112
- //#sourceMappingUrl=./index.js.map
113
+ //# sourceMappingURL=./index.js.map
@@ -110,6 +110,7 @@ class SearchQueryModifierGenerator extends _BaseExtensionGenerator.BaseExtension
110
110
  }
111
111
  writing() {
112
112
  if (this._shouldExecute()) {
113
+ this.sourceRoot(_path.join(__dirname, '../../templates/searchQueryModifier'));
113
114
  super.writing();
114
115
  }
115
116
  }
@@ -141,4 +142,4 @@ module.exports = SearchQueryModifierGenerator;
141
142
  module.exports.defineOptions = defineOptions;
142
143
  module.exports.composeWith = composeWith;
143
144
 
144
- //#sourceMappingUrl=./index.js.map
145
+ //# sourceMappingURL=./index.js.map
@@ -6,12 +6,16 @@
6
6
  "node": ">=22.14.0 < 23.0.0"
7
7
  },
8
8
  "scripts": {
9
- "build": "heft test --clean",
9
+ "build": "heft build --clean",
10
+ "test": "npm run build && heft test",
10
11
  "clean": "heft clean",
11
12
  "deploy": "heft dev-deploy",
12
13
  "start": "heft start --clean",
13
14
  "build-watch": "heft build --lite",
14
15
  "package-solution": "heft package-solution",
15
- "deploy-azure-storage": "heft deploy-azure-storage"
16
+ "deploy-azure-storage": "heft deploy-azure-storage",
17
+ "eject-webpack": "heft eject-webpack",
18
+ "trust-dev-cert": "heft trust-dev-cert",
19
+ "untrust-dev-cert": "heft untrust-dev-cert"
16
20
  }
17
21
  }
@@ -103,9 +103,10 @@ function defineOptions(generator) {
103
103
  description: 'If specified, the solution will have permissions to access web APIs ' + 'that are unique not shared with other components in the tenant',
104
104
  type: Boolean
105
105
  });
106
- generator.option('use-heft', {
107
- description: 'If specified, the solution will build the project using Heft',
108
- type: Boolean
106
+ generator.option('use-gulp', {
107
+ description: 'If specified, the solution will build the project using the legacy Gulp tooling',
108
+ type: Boolean,
109
+ default: false
109
110
  });
110
111
  }
111
112
  class SolutionGenerator extends _BaseGenerator.BaseGenerator {
@@ -157,19 +158,19 @@ class SolutionGenerator extends _BaseGenerator.BaseGenerator {
157
158
  } else {
158
159
  isDomainIsolated = false;
159
160
  }
160
- // allows to set --use-heft false
161
- let useHeft = answers.useHeft;
162
- const useHeftConfig = this.config.get('useHeft');
163
- if (useHeftConfig !== undefined) {
164
- if (typeof useHeftConfig === 'string') {
165
- useHeft = useHeftConfig.toLowerCase() === 'true';
161
+ // allows to set --use-gulp false
162
+ let useGulp = false;
163
+ const useGulpConfig = this.config.get('useGulp');
164
+ if (useGulpConfig !== undefined) {
165
+ if (typeof useGulpConfig === 'string') {
166
+ useGulp = useGulpConfig.toLowerCase() === 'true';
166
167
  } else {
167
- useHeft = useHeftConfig;
168
+ useGulp = useGulpConfig;
168
169
  }
169
170
  }
170
171
  const isPlusBeta = this.config.get('plusBeta');
171
172
  this.context.solutionName = solutionName;
172
- this.context.useHeft = !!useHeft;
173
+ this.context.useGulp = useGulp;
173
174
  this.context.libraryName = _lodash.kebabCase(this.context.solutionName);
174
175
  this.context.libraryId = _utilities.generateGuid();
175
176
  this.context.solutionShortDescription = solutionShortDescription;
@@ -183,9 +184,9 @@ class SolutionGenerator extends _BaseGenerator.BaseGenerator {
183
184
  _YeomanConfiguration.YeomanConfiguration.libraryId = this.context.libraryId;
184
185
  _YeomanConfiguration.YeomanConfiguration.environment = environment;
185
186
  _YeomanConfiguration.YeomanConfiguration.packageManager = this.config.get('packageManager') || _YeomanConfiguration.YeomanConfiguration.packageManager || 'npm';
186
- _YeomanConfiguration.YeomanConfiguration.useHeft = !!useHeft;
187
+ _YeomanConfiguration.YeomanConfiguration.useGulp = useGulp;
187
188
  this.config.set('solutionName', solutionName);
188
- this.config.set('useHeft', useHeft);
189
+ this.config.set('useGulp', useGulp);
189
190
  this.config.set('environment', environment);
190
191
  this.config.set('solutionShortDescription', solutionShortDescription);
191
192
  this.config.set('skipFeatureDeployment', skipFeatureDeployment);
@@ -201,16 +202,16 @@ class SolutionGenerator extends _BaseGenerator.BaseGenerator {
201
202
  }
202
203
  configuring() {
203
204
  if (this._shouldExecute()) {
204
- const packageJsonTemplate = this.context.useHeft ? require('./heft.package.json') : require('./non-heft.package.json');
205
+ const packageJsonTemplate = !this.context.useGulp ? require('./heft.package.json') : require('./non-heft.package.json');
205
206
  if (this.packageJsonManager.data) {
206
207
  this.log(`Overwriting an existing "package.json"`);
207
208
  }
208
209
  packageJsonTemplate.name = this.context.libraryName;
209
210
  this.packageJsonManager.set(packageJsonTemplate);
210
- if (this.context.useHeft) {
211
- this.ensureDependencyGroup('useHeft');
212
- } else {
211
+ if (this.context.useGulp) {
213
212
  this.ensureDependencyGroup('useGulp');
213
+ } else {
214
+ this.ensureDependencyGroup('useHeft');
214
215
  }
215
216
  if (this.configJson.data) {
216
217
  this.log(`Overwriting an existing "config.json"`);
@@ -228,10 +229,11 @@ class SolutionGenerator extends _BaseGenerator.BaseGenerator {
228
229
  if (this._shouldExecute()) {
229
230
  // eslint-disable-next-line no-console
230
231
  console.log();
232
+ this.sourceRoot(_path.join(__dirname, '../../templates/solution'));
231
233
  super.writing(false);
232
234
  const dest = this.destinationRoot();
233
235
  this.copyTemplate(_path.join(this.sourceRoot(), 'base'), dest);
234
- if (this.context.useHeft) {
236
+ if (!this.context.useGulp) {
235
237
  this.copyTemplate(_path.join(this.sourceRoot(), 'heft'), dest);
236
238
  } else {
237
239
  this.copyTemplate(_path.join(this.sourceRoot(), 'gulp'), dest);
@@ -268,4 +270,4 @@ module.exports = SolutionGenerator;
268
270
  module.exports.composeWith = composeWith;
269
271
  module.exports.defineOptions = defineOptions;
270
272
 
271
- //#sourceMappingUrl=./index.js.map
273
+ //# sourceMappingURL=./index.js.map
@@ -103,6 +103,7 @@ class WebpartGenerator extends _BaseComponentGenerator.BaseComponentGenerator {
103
103
  }
104
104
  writing() {
105
105
  if (this._shouldExecute()) {
106
+ this.sourceRoot(_path.join(__dirname, '../../templates/webpart'));
106
107
  super.writing(false);
107
108
  const dest = this._getOutputFolder(this.context.componentNameCamelCase);
108
109
  const template = this.context.template;
@@ -145,4 +146,4 @@ module.exports = WebpartGenerator;
145
146
  module.exports.defineOptions = defineOptions;
146
147
  module.exports.composeWith = composeWith;
147
148
 
148
- //#sourceMappingUrl=./index.js.map
149
+ //# sourceMappingURL=./index.js.map
@@ -19,7 +19,7 @@ export default class <%= componentClassName %> extends BaseAdaptiveCardExtension
19
19
  I<%= componentClassName %>Props,
20
20
  I<%= componentClassName %>State
21
21
  > {
22
- private _deferredPropertyPane: <%= componentName %>PropertyPane;
22
+ private _deferredPropertyPane: <%= componentName %>PropertyPane | undefined;
23
23
 
24
24
  public onInit(): Promise<void> {
25
25
  this.state = { };
@@ -49,6 +49,6 @@ export default class <%= componentClassName %> extends BaseAdaptiveCardExtension
49
49
  }
50
50
 
51
51
  protected getPropertyPaneConfiguration(): IPropertyPaneConfiguration {
52
- return this._deferredPropertyPane?.getPropertyPaneConfiguration();
52
+ return this._deferredPropertyPane?.getPropertyPaneConfiguration() ?? super.getPropertyPaneConfiguration();
53
53
  }
54
54
  }
@@ -18,7 +18,7 @@ export default class <%= componentClassName %> extends BaseAdaptiveCardExtension
18
18
  I<%= componentClassName %>Props,
19
19
  I<%= componentClassName %>State
20
20
  > {
21
- private _deferredPropertyPane: <%= componentName %>PropertyPane;
21
+ private _deferredPropertyPane: <%= componentName %>PropertyPane | undefined;
22
22
 
23
23
  public onInit(): Promise<void> {
24
24
  this.state = { };
@@ -48,6 +48,6 @@ export default class <%= componentClassName %> extends BaseAdaptiveCardExtension
48
48
  }
49
49
 
50
50
  protected getPropertyPaneConfiguration(): IPropertyPaneConfiguration {
51
- return this._deferredPropertyPane?.getPropertyPaneConfiguration();
51
+ return this._deferredPropertyPane?.getPropertyPaneConfiguration() ?? super.getPropertyPaneConfiguration();
52
52
  }
53
53
  }
@@ -25,7 +25,7 @@ export default class <%= componentClassName %> extends BaseAdaptiveCardExtension
25
25
  I<%= componentClassName %>Props,
26
26
  I<%= componentClassName %>State
27
27
  > {
28
- private _deferredPropertyPane: <%= componentName %>PropertyPane;
28
+ private _deferredPropertyPane: <%= componentName %>PropertyPane | undefined;
29
29
 
30
30
  public onInit(): Promise<void> {
31
31
  this.state = { };
@@ -78,6 +78,6 @@ export default class <%= componentClassName %> extends BaseAdaptiveCardExtension
78
78
  }
79
79
 
80
80
  protected getPropertyPaneConfiguration(): IPropertyPaneConfiguration {
81
- return this._deferredPropertyPane?.getPropertyPaneConfiguration();
81
+ return this._deferredPropertyPane?.getPropertyPaneConfiguration() ?? super.getPropertyPaneConfiguration();
82
82
  }
83
83
  }
@@ -13,5 +13,5 @@
13
13
  // If true, the component can only be installed on sites where Custom Script is allowed.
14
14
  // Components that allow authors to embed arbitrary script code should set this to true.
15
15
  // https://support.office.com/en-us/article/Turn-scripting-capabilities-on-or-off-1f2c515f-5d7e-448a-9fd7-835da935584f
16
- "requiresCustomScript": false,
16
+ "requiresCustomScript": false
17
17
  }
@@ -46,7 +46,7 @@ Short summary on functionality and used technologies.
46
46
  - Ensure that you are at the solution folder
47
47
  - in the command-line run:
48
48
  - **npm install**
49
- - **<% if(useHeft){ %>heft start<% } else { %>gulp serve<% } %>**
49
+ - **<% if(!useGulp){ %>npm run start<% } else { %>gulp serve<% } %>**
50
50
 
51
51
  > Include any additional steps as needed.
52
52
 
@@ -9,6 +9,10 @@ node_modules
9
9
  # Build generated files
10
10
  dist
11
11
  lib
12
+ lib-dts
13
+ lib-commonjs
14
+ lib-esm
15
+ jest-output
12
16
  release
13
17
  solution
14
18
  temp
@@ -4,4 +4,4 @@
4
4
  "account": "<!-- STORAGE ACCOUNT NAME -->",
5
5
  "container": "<%= libraryName %>",
6
6
  "accessKey": "<!-- ACCESS KEY -->"
7
- }
7
+ }
@@ -0,0 +1,22 @@
1
+ # Ignore everything by default
2
+ **
3
+
4
+ # Use negative patterns to bring back the specific things we want to publish
5
+ !/bin/**
6
+ !/dist/**
7
+ !/EULA/**
8
+ !/lib/**
9
+ !ThirdPartyNotice.txt
10
+
11
+ # Ignore certain files in the above folders
12
+ /dist/*.stats.*
13
+ /dist/**/*.js.map
14
+ /lib/**/*.js.map
15
+ /lib/**/test/**
16
+
17
+ # NOTE: These don't need to be specified, because NPM includes them automatically.
18
+ #
19
+ # package.json
20
+ # README (and its variants)
21
+ # CHANGELOG (and its variants)
22
+ # LICENSE / LICENCE
@@ -0,0 +1,41 @@
1
+ {
2
+ "$schema": "https://developer.microsoft.com/json-schemas/heft/v0/heft.schema.json",
3
+
4
+ "extends": "@microsoft/spfx-web-build-rig/profiles/default/config/heft.json",
5
+
6
+ "phasesByName": {
7
+ "build": {
8
+ "tasksByName": {
9
+ // copies the localization js files to the lib folder
10
+ "copy-strings": {
11
+ "taskPlugin": {
12
+ "pluginPackage": "@rushstack/heft",
13
+ "pluginName": "copy-files-plugin",
14
+ "options": {
15
+ "copyOperations": [
16
+ {
17
+ "sourcePath": "./src",
18
+ "destinationFolders": ["./lib"],
19
+ "fileExtensions": [".js"]
20
+ }
21
+ ]
22
+ }
23
+ }
24
+ }
25
+ }
26
+ },
27
+ "eject-webpack": {
28
+ "tasksByName": {
29
+ "eject-webpack": {
30
+ "taskPlugin": {
31
+ "pluginPackage": "@rushstack/heft",
32
+ "pluginName": "run-script-plugin",
33
+ "options": {
34
+ "scriptPath": "node_modules/@microsoft/spfx-heft-plugins/lib-commonjs/plugins/ejectWebpackPlugin/EjectWebpackPlugin.js"
35
+ }
36
+ }
37
+ }
38
+ }
39
+ }
40
+ }
41
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "$schema": "https://developer.microsoft.com/json-schemas/heft/v0/heft-sass-plugin.schema.json",
3
+
4
+ "extends": "@microsoft/spfx-web-build-rig/profiles/default/config/sass.json"
5
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "extends": "@microsoft/spfx-web-build-rig/profiles/default/config/typescript.json",
3
+
4
+ "staticAssetsToCopy": {
5
+ "fileExtensions": [".resx", ".jpg", ".png", ".woff", ".eot", ".ttf", ".svg", ".gif"],
6
+
7
+ "includeGlobs": ["webparts/*/loc/*.js"]
8
+ }
9
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": "./node_modules/@microsoft/spfx-web-build-rig/profiles/default/tsconfig-base.json"
3
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/generator-sharepoint",
3
- "version": "1.21.1",
3
+ "version": "1.22.0-beta.2",
4
4
  "description": "Yeoman generator for the SharePoint Framework",
5
5
  "engines": {
6
6
  "node": ">=22.14.0 < 23.0.0"
@@ -34,31 +34,32 @@
34
34
  }
35
35
  },
36
36
  "dependencies": {
37
- "@rushstack/node-core-library": "5.12.0",
38
- "@rushstack/terminal": "0.15.1",
37
+ "@rushstack/node-core-library": "5.14.0",
38
+ "@rushstack/terminal": "0.15.4",
39
39
  "colors": "~1.2.1",
40
40
  "lodash": "4.17.21",
41
- "mem-fs": "2.2.1",
41
+ "mem-fs": "^4.1.2",
42
42
  "update-notifier": "5.1.0",
43
43
  "uuid": "^9.0.0",
44
44
  "yeoman-generator": "5.10.0",
45
45
  "yosay": "2.0.2",
46
- "@microsoft/spfx-heft-plugins": "1.21.1"
46
+ "@microsoft/spfx-heft-plugins": "1.22.0-beta.2"
47
47
  },
48
48
  "devDependencies": {
49
- "@microsoft/rush-lib": "5.150.0",
50
- "@rushstack/heft": "0.71.0",
51
- "@rushstack/heft-isolated-typescript-transpile-plugin": "0.1.1",
52
- "@rushstack/heft-typescript-plugin": "0.8.0",
49
+ "@rushstack/heft": "0.74.3",
50
+ "@rushstack/heft-isolated-typescript-transpile-plugin": "0.2.2",
51
+ "@rushstack/heft-typescript-plugin": "0.9.12",
53
52
  "@types/inquirer": "7.3.1",
54
53
  "@types/lodash": "4.14.117",
55
- "@types/mem-fs-editor": "7.0.1",
56
54
  "@types/update-notifier": "5.1.0",
57
55
  "@types/uuid": "9.0.1",
58
56
  "@types/yeoman-generator": "5.2.14",
59
57
  "@types/yosay": "2.0.0",
60
58
  "eslint": "8.57.1",
61
- "@msinternal/internal-node-rig": "0.1.0"
59
+ "mem-fs-editor": "^11.1.4",
60
+ "@msinternal/ms-graph-v3-bundle": "3.0.2",
61
+ "@msinternal/internal-node-rig": "0.1.0",
62
+ "@msinternal/sp-teams-lib": "0.24.149"
62
63
  },
63
64
  "scripts": {
64
65
  "build": "heft test --clean",
@@ -1,16 +0,0 @@
1
- !dist
2
- config
3
-
4
- gulpfile.js
5
-
6
- release
7
- src
8
- temp
9
-
10
- tsconfig.json
11
- tslint.json
12
-
13
- *.log
14
-
15
- .yo-rc.json
16
- .vscode
@@ -1,21 +0,0 @@
1
- {
2
- "extends": "@microsoft/spfx-web-build-rig/profiles/default/config/typescript.json",
3
-
4
- "staticAssetsToCopy": {
5
- "fileExtensions": [
6
- ".resx",
7
- ".sass",
8
- ".scss",
9
- ".css",
10
- ".jpg",
11
- ".png",
12
- ".woff",
13
- ".eot",
14
- ".ttf",
15
- ".svg",
16
- ".gif"
17
- ],
18
-
19
- "includeGlobs": ["webparts/*/loc/*.js"]
20
- }
21
- }
@@ -1,6 +0,0 @@
1
- {
2
- "extends": "./node_modules/@microsoft/spfx-web-build-rig/profiles/default/tsconfig-base.json",
3
- "compilerOptions": {
4
- "skipLibCheck": true
5
- }
6
- }