@microsoft/generator-sharepoint 1.14.0 → 1.15.0-beta.1

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 (75) hide show
  1. package/lib/common/BaseGenerator.d.ts +5 -7
  2. package/lib/common/BaseGenerator.d.ts.map +1 -1
  3. package/lib/common/BaseGenerator.js +33 -56
  4. package/lib/common/JsonManager.d.ts +1 -1
  5. package/lib/common/JsonManager.d.ts.map +1 -1
  6. package/lib/common/JsonManager.js +1 -1
  7. package/lib/common/ServeJsonManager.js +1 -1
  8. package/lib/common/dependencies.json +197 -0
  9. package/lib/common/utilities.d.ts.map +1 -1
  10. package/lib/common/utilities.js +11 -14
  11. package/lib/generators/adaptiveCardExtension/index.d.ts.map +1 -1
  12. package/lib/generators/adaptiveCardExtension/index.js +13 -14
  13. package/lib/generators/app/index.js +5 -2
  14. package/lib/generators/applicationCustomizer/index.d.ts.map +1 -1
  15. package/lib/generators/applicationCustomizer/index.js +4 -5
  16. package/lib/generators/commandSet/index.d.ts.map +1 -1
  17. package/lib/generators/commandSet/index.js +4 -5
  18. package/lib/generators/commandSet/templates/none/{componentClassName}.ts +21 -9
  19. package/lib/generators/component/BaseComponentGenerator.d.ts.map +1 -1
  20. package/lib/generators/component/BaseComponentGenerator.js +68 -75
  21. package/lib/generators/component/index.d.ts.map +1 -1
  22. package/lib/generators/component/index.js +15 -24
  23. package/lib/generators/extension/BaseExtensionGenerator.d.ts +0 -1
  24. package/lib/generators/extension/BaseExtensionGenerator.d.ts.map +1 -1
  25. package/lib/generators/extension/BaseExtensionGenerator.js +1 -4
  26. package/lib/generators/extension/index.d.ts.map +1 -1
  27. package/lib/generators/extension/index.js +12 -13
  28. package/lib/generators/fieldCustomizer/index.d.ts.map +1 -1
  29. package/lib/generators/fieldCustomizer/index.js +4 -5
  30. package/lib/generators/library/index.d.ts.map +1 -1
  31. package/lib/generators/library/index.js +4 -5
  32. package/lib/generators/searchQueryModifier/index.d.ts.map +1 -1
  33. package/lib/generators/searchQueryModifier/index.js +4 -5
  34. package/lib/generators/solution/heft.package.json +14 -0
  35. package/lib/generators/solution/index.d.ts +1 -0
  36. package/lib/generators/solution/index.d.ts.map +1 -1
  37. package/lib/generators/solution/index.js +96 -67
  38. package/lib/generators/solution/{initial.package.json → non-heft.package.json} +0 -0
  39. package/lib/generators/solution/templates/base/README.md +10 -10
  40. package/lib/generators/solution/templates/base/_gitignore +1 -0
  41. package/lib/generators/solution/templates/{base → gulp}/.vscode/launch.json +0 -0
  42. package/lib/generators/solution/templates/{base → gulp}/_npmignore +0 -0
  43. package/lib/generators/solution/templates/{base → gulp}/gulpfile.js +0 -0
  44. package/lib/generators/solution/templates/{base → gulp}/src/index.ts +0 -0
  45. package/lib/generators/solution/templates/{base → gulp}/tslint.json +0 -0
  46. package/lib/generators/solution/templates/heft/_npmignore +16 -0
  47. package/lib/generators/solution/templates/heft/config/rig.json +7 -0
  48. package/lib/generators/solution/templates/heft/config/typescript.json +21 -0
  49. package/lib/generators/solution/templates/heft/tsconfig.json +6 -0
  50. package/lib/generators/solution/templates/heft/tslint.json +7 -0
  51. package/lib/generators/webpart/index.d.ts.map +1 -1
  52. package/lib/generators/webpart/index.js +4 -5
  53. package/lib/generators/webpart/templates/minimal/{componentClassName}.ts +3 -4
  54. package/lib/generators/webpart/templates/none/{componentClassName}.ts +8 -6
  55. package/lib/generators/webpart/templates/react/{componentClassName}.ts +6 -6
  56. package/package.json +3 -3
  57. package/lib/common/dependency/adaptiveCardExtension/firstParty.json +0 -13
  58. package/lib/common/dependency/adaptiveCardExtension/firstPartyPlusBeta.json +0 -13
  59. package/lib/common/dependency/applicationCustomizer.json +0 -6
  60. package/lib/common/dependency/applicationCustomizerPlusBeta.json +0 -6
  61. package/lib/common/dependency/commandSet.json +0 -6
  62. package/lib/common/dependency/commandSetPlusBeta.json +0 -6
  63. package/lib/common/dependency/extension/firstParty.json +0 -12
  64. package/lib/common/dependency/extension/firstPartyPlusBeta.json +0 -12
  65. package/lib/common/dependency/fieldCustomizer.json +0 -5
  66. package/lib/common/dependency/fieldCustomizerPlusBeta.json +0 -5
  67. package/lib/common/dependency/library/firstParty.json +0 -9
  68. package/lib/common/dependency/library/firstPartyPlusBeta.json +0 -9
  69. package/lib/common/dependency/react.json +0 -11
  70. package/lib/common/dependency/searchQueryModifier.json +0 -5
  71. package/lib/common/dependency/searchQueryModifierPlusBeta.json +0 -5
  72. package/lib/common/dependency/thirdParty.json +0 -8
  73. package/lib/common/dependency/webpart/firstParty.json +0 -15
  74. package/lib/common/dependency/webpart/firstPartyPlusBeta.json +0 -15
  75. package/lib/generators/solution/templates/base/.vscode/settings.json +0 -13
@@ -14,7 +14,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
14
14
  var __importStar = (this && this.__importStar) || function (mod) {
15
15
  if (mod && mod.__esModule) return mod;
16
16
  var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
18
  __setModuleDefault(result, mod);
19
19
  return result;
20
20
  };
@@ -57,6 +57,10 @@ function defineOptions(generator) {
57
57
  'that are unique not shared with other components in the tenant',
58
58
  type: Boolean
59
59
  });
60
+ generator.option('use-heft', {
61
+ description: 'If specified, the solution will build the project using Heft',
62
+ type: Boolean
63
+ });
60
64
  }
61
65
  exports.defineOptions = defineOptions;
62
66
  class SolutionGenerator extends BaseGenerator_1.BaseGenerator {
@@ -70,11 +74,11 @@ class SolutionGenerator extends BaseGenerator_1.BaseGenerator {
70
74
  initializing() {
71
75
  /* no-op */
72
76
  }
73
- prompting() {
77
+ async prompting() {
74
78
  if (!this.shouldExecute()) {
75
- return Promise.resolve();
79
+ return;
76
80
  }
77
- return this.prompt([
81
+ const answers = await this.prompt([
78
82
  {
79
83
  type: 'input',
80
84
  name: 'solutionName',
@@ -82,82 +86,101 @@ class SolutionGenerator extends BaseGenerator_1.BaseGenerator {
82
86
  when: () => !this.config.get('solutionName'),
83
87
  message: 'What is your solution name?'
84
88
  }
85
- ]).then((answers) => {
86
- const environment = 'spo';
87
- const solutionName = this.config.get('solutionName') || answers.solutionName;
88
- const solutionShortDescription = this.config.get('solutionShortDescription') || `${solutionName} description`;
89
- // allows to set --skip-feature-deployment false
90
- let skipFeatureDeployment = undefined;
91
- const skipFeatureDeploymentConfig = this.config.get('skipFeatureDeployment');
92
- if (skipFeatureDeploymentConfig !== undefined) {
93
- if (typeof skipFeatureDeploymentConfig === 'string') {
94
- skipFeatureDeployment = skipFeatureDeploymentConfig.toLowerCase() === 'true';
95
- }
96
- else {
97
- skipFeatureDeployment = skipFeatureDeploymentConfig;
98
- }
89
+ ]);
90
+ const environment = 'spo';
91
+ const solutionName = this.config.get('solutionName') || answers.solutionName;
92
+ const solutionShortDescription = this.config.get('solutionShortDescription') || `${solutionName} description`;
93
+ // allows to set --skip-feature-deployment false
94
+ let skipFeatureDeployment = undefined;
95
+ const skipFeatureDeploymentConfig = this.config.get('skipFeatureDeployment');
96
+ if (skipFeatureDeploymentConfig !== undefined) {
97
+ if (typeof skipFeatureDeploymentConfig === 'string') {
98
+ skipFeatureDeployment = skipFeatureDeploymentConfig.toLowerCase() === 'true';
99
+ }
100
+ else {
101
+ skipFeatureDeployment = skipFeatureDeploymentConfig;
102
+ }
103
+ }
104
+ else {
105
+ skipFeatureDeployment = true;
106
+ }
107
+ const componentType = this.config.get('componentType');
108
+ const extensionType = this.config.get('extensionType');
109
+ const template = this.config.get('framework') || this.config.get('template');
110
+ const componentName = this.config.get('componentName');
111
+ const componentDescription = this.config.get('componentDescription');
112
+ const isCreatingSolution = this.config.get('isCreatingSolution');
113
+ // allows to set --is-domain-isolated false
114
+ let isDomainIsolated = undefined;
115
+ const isDomainIsolatedConfig = this.config.get('isDomainIsolated');
116
+ if (isDomainIsolatedConfig !== undefined) {
117
+ if (typeof isDomainIsolatedConfig === 'string') {
118
+ isDomainIsolated = isDomainIsolatedConfig.toLowerCase() === 'true';
99
119
  }
100
120
  else {
101
- skipFeatureDeployment = true;
121
+ isDomainIsolated = isDomainIsolatedConfig;
102
122
  }
103
- const componentType = this.config.get('componentType');
104
- const extensionType = this.config.get('extensionType');
105
- const template = this.config.get('framework') || this.config.get('template');
106
- const componentName = this.config.get('componentName');
107
- const componentDescription = this.config.get('componentDescription');
108
- const isCreatingSolution = this.config.get('isCreatingSolution');
109
- // allows to set --is-domain-isolated false
110
- let isDomainIsolated = undefined;
111
- const isDomainIsolatedConfig = this.config.get('isDomainIsolated');
112
- if (isDomainIsolatedConfig !== undefined) {
113
- if (typeof isDomainIsolatedConfig === 'string') {
114
- isDomainIsolated = isDomainIsolatedConfig.toLowerCase() === 'true';
115
- }
116
- else {
117
- isDomainIsolated = isDomainIsolatedConfig;
118
- }
123
+ }
124
+ else {
125
+ isDomainIsolated = false;
126
+ }
127
+ // allows to set --use-heft false
128
+ let useHeft = answers.useHeft;
129
+ const useHeftConfig = this.config.get('useHeft');
130
+ if (useHeftConfig !== undefined) {
131
+ if (typeof useHeftConfig === 'string') {
132
+ useHeft = useHeftConfig.toLowerCase() === 'true';
119
133
  }
120
134
  else {
121
- isDomainIsolated = false;
135
+ useHeft = useHeftConfig;
122
136
  }
123
- const isPlusBeta = this.config.get('plusBeta');
124
- this.context.solutionName = solutionName;
125
- this.context.libraryName = lodash.kebabCase(this.context.solutionName);
126
- this.context.libraryId = Utils.generateGuid();
127
- this.context.solutionShortDescription = solutionShortDescription;
128
- this.context.skipFeatureDeployment = skipFeatureDeployment;
129
- this.context.isDomainIsolated = isDomainIsolated;
130
- // store some variables
131
- YeomanConfiguration_1.YeomanConfiguration.version = BaseGenerator_1.BaseGenerator.generatorPackageJson.version;
132
- YeomanConfiguration_1.YeomanConfiguration.libraryName = this.context.libraryName;
133
- YeomanConfiguration_1.YeomanConfiguration.libraryId = this.context.libraryId;
134
- YeomanConfiguration_1.YeomanConfiguration.environment = environment;
135
- YeomanConfiguration_1.YeomanConfiguration.packageManager =
136
- this.config.get('packageManager') || YeomanConfiguration_1.YeomanConfiguration.packageManager || 'npm';
137
- this.config.set('solutionName', solutionName);
138
- this.config.set('environment', environment);
139
- this.config.set('solutionShortDescription', solutionShortDescription);
140
- this.config.set('skipFeatureDeployment', skipFeatureDeployment);
141
- this.config.set('componentType', componentType);
142
- this.config.set('extensionType', extensionType);
143
- this.config.set('template', template);
144
- this.config.set('componentName', componentName);
145
- this.config.set('componentDescription', componentDescription);
146
- this.config.set('isCreatingSolution', isCreatingSolution);
147
- this.config.set('isDomainIsolated', isDomainIsolated);
148
- this.config.set('plusBeta', isPlusBeta);
149
- this.packageSolutionJson.setUpSolution(this.context);
150
- });
137
+ }
138
+ const isPlusBeta = this.config.get('plusBeta');
139
+ this.context.solutionName = solutionName;
140
+ this.context.useHeft = !!useHeft;
141
+ this.context.libraryName = lodash.kebabCase(this.context.solutionName);
142
+ this.context.libraryId = Utils.generateGuid();
143
+ this.context.solutionShortDescription = solutionShortDescription;
144
+ this.context.skipFeatureDeployment = skipFeatureDeployment;
145
+ this.context.isDomainIsolated = isDomainIsolated;
146
+ // store some variables
147
+ YeomanConfiguration_1.YeomanConfiguration.version = BaseGenerator_1.BaseGenerator.generatorPackageJson.version;
148
+ YeomanConfiguration_1.YeomanConfiguration.libraryName = this.context.libraryName;
149
+ YeomanConfiguration_1.YeomanConfiguration.libraryId = this.context.libraryId;
150
+ YeomanConfiguration_1.YeomanConfiguration.environment = environment;
151
+ YeomanConfiguration_1.YeomanConfiguration.packageManager =
152
+ this.config.get('packageManager') || YeomanConfiguration_1.YeomanConfiguration.packageManager || 'npm';
153
+ this.config.set('solutionName', solutionName);
154
+ this.config.set('useHeft', useHeft);
155
+ this.config.set('environment', environment);
156
+ this.config.set('solutionShortDescription', solutionShortDescription);
157
+ this.config.set('skipFeatureDeployment', skipFeatureDeployment);
158
+ this.config.set('componentType', componentType);
159
+ this.config.set('extensionType', extensionType);
160
+ this.config.set('template', template);
161
+ this.config.set('componentName', componentName);
162
+ this.config.set('componentDescription', componentDescription);
163
+ this.config.set('isCreatingSolution', isCreatingSolution);
164
+ this.config.set('isDomainIsolated', isDomainIsolated);
165
+ this.config.set('plusBeta', isPlusBeta);
166
+ this.packageSolutionJson.setUpSolution(this.context);
151
167
  }
152
168
  configuring() {
153
169
  if (this.shouldExecute()) {
154
- const packageJsonTemplate = require('./initial.package.json');
170
+ const packageJsonTemplate = this.context.useHeft
171
+ ? require('./heft.package.json')
172
+ : require('./non-heft.package.json');
155
173
  if (this.packageJsonManager.data) {
156
174
  this.log(`Overwriting an existing "package.json"`);
157
175
  }
158
176
  packageJsonTemplate.name = this.context.libraryName;
159
177
  this.packageJsonManager.set(packageJsonTemplate);
160
- this.ensureDependencyGroup('none');
178
+ if (this.context.useHeft) {
179
+ this.ensureDependencyGroup('useHeft');
180
+ }
181
+ else {
182
+ this.ensureDependencyGroup('useGulp');
183
+ }
161
184
  if (this.configJson.data) {
162
185
  this.log(`Overwriting an existing "config.json"`);
163
186
  }
@@ -175,8 +198,14 @@ class SolutionGenerator extends BaseGenerator_1.BaseGenerator {
175
198
  console.log();
176
199
  super.writing(false);
177
200
  const dest = this.destinationRoot();
178
- this.copyTemplate(path.join(this.sourceRoot(), YeomanConfiguration_1.YeomanConfiguration.environment), dest);
179
201
  this.copyTemplate(path.join(this.sourceRoot(), 'base'), dest);
202
+ if (this.context.useHeft) {
203
+ this.copyTemplate(path.join(this.sourceRoot(), 'heft'), dest);
204
+ }
205
+ else {
206
+ this.copyTemplate(path.join(this.sourceRoot(), 'gulp'), dest);
207
+ this.copyTemplate(path.join(this.sourceRoot(), YeomanConfiguration_1.YeomanConfiguration.environment), dest);
208
+ }
180
209
  this.packageJsonManager.save();
181
210
  this.configJson.save();
182
211
  this.packageSolutionJson.save();
@@ -23,20 +23,20 @@ Short summary on functionality and used technologies.
23
23
 
24
24
  ## Solution
25
25
 
26
- Solution|Author(s)
27
- --------|---------
28
- folder name | Author details (name, company, twitter alias with link)
26
+ | Solution | Author(s) |
27
+ | ----------- | ------------------------------------------------------- |
28
+ | folder name | Author details (name, company, twitter alias with link) |
29
29
 
30
30
  ## Version history
31
31
 
32
- Version|Date|Comments
33
- -------|----|--------
34
- 1.1|March 10, 2021|Update comment
35
- 1.0|January 29, 2021|Initial release
32
+ | Version | Date | Comments |
33
+ | ------- | ---------------- | --------------- |
34
+ | 1.1 | March 10, 2021 | Update comment |
35
+ | 1.0 | January 29, 2021 | Initial release |
36
36
 
37
37
  ## Disclaimer
38
38
 
39
- **THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**
39
+ **THIS CODE IS PROVIDED _AS IS_ WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**
40
40
 
41
41
  ---
42
42
 
@@ -46,7 +46,7 @@ Version|Date|Comments
46
46
  - Ensure that you are at the solution folder
47
47
  - in the command-line run:
48
48
  - **npm install**
49
- - **gulp serve**
49
+ - **<% if(useHeft){ %>heft start<% } else { %>gulp serve<% } %>**
50
50
 
51
51
  > Include any additional steps as needed.
52
52
 
@@ -70,4 +70,4 @@ This extension illustrates the following concepts:
70
70
  - [Building for Microsoft teams](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/build-for-teams-overview)
71
71
  - [Use Microsoft Graph in your solution](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/using-microsoft-graph-apis)
72
72
  - [Publish SharePoint Framework applications to the Marketplace](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/publish-to-marketplace-overview)
73
- - [Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp) - Guidance, tooling, samples and open-source controls for your Microsoft 365 development
73
+ - [Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp) - Guidance, tooling, samples and open-source controls for your Microsoft 365 development
@@ -13,6 +13,7 @@ release
13
13
  solution
14
14
  temp
15
15
  *.sppkg
16
+ .heft
16
17
 
17
18
  # Coverage directory used by tools like istanbul
18
19
  coverage
@@ -0,0 +1,16 @@
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
@@ -0,0 +1,7 @@
1
+ {
2
+ // The "rig.json" file directs tools to look for their config files in an external package.
3
+ // Documentation for this system: https://www.npmjs.com/package/@rushstack/rig-package
4
+ "$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
5
+
6
+ "rigPackageName": "@microsoft/spfx-web-build-rig"
7
+ }
@@ -0,0 +1,21 @@
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
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "extends": "./node_modules/@microsoft/spfx-web-build-rig/profiles/default/tsconfig-base.json",
3
+ "compilerOptions": {
4
+ "skipLibCheck": true
5
+ }
6
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "extends": "@microsoft/rush-stack-compiler-3.9/includes/tslint.json",
3
+ "rules": {
4
+ "no-floating-promises": false,
5
+ "react-this-binding-issue": false
6
+ }
7
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"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function (mod) {
15
15
  if (mod && mod.__esModule) return mod;
16
16
  var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
18
  __setModuleDefault(result, mod);
19
19
  return result;
20
20
  };
@@ -44,12 +44,11 @@ class WebpartGenerator extends BaseComponent.BaseComponentGenerator {
44
44
  initializing() {
45
45
  /* no-op */
46
46
  }
47
- prompting() {
47
+ async prompting() {
48
48
  this.ensureCorrectFolder();
49
- if (!this.shouldExecute()) {
50
- return Promise.resolve();
49
+ if (this.shouldExecute()) {
50
+ await super.prompting();
51
51
  }
52
- return super.prompting();
53
52
  }
54
53
  configuring() {
55
54
  if (this.shouldExecute()) {
@@ -7,15 +7,14 @@ export interface I<%= componentClassName %>Props {
7
7
  }
8
8
 
9
9
  export default class <%= componentClassName %> extends BaseClientSideWebPart<I<%= componentClassName %>Props> {
10
+ public render(): void {
11
+ this.domElement.innerHTML = `<div class="${ styles.<%= componentNameCamelCase %> }"></div>`;
12
+ }
10
13
 
11
14
  protected onInit(): Promise<void> {
12
15
  return super.onInit();
13
16
  }
14
17
 
15
- public render(): void {
16
- this.domElement.innerHTML = `<div class="${ styles.<%= componentNameCamelCase %> }"></div>`;
17
- }
18
-
19
18
  protected get dataVersion(): Version {
20
19
  return Version.parse('1.0');
21
20
  }
@@ -19,12 +19,6 @@ export default class <%= componentClassName %> extends BaseClientSideWebPart<I<%
19
19
  private _isDarkTheme: boolean = false;
20
20
  private _environmentMessage: string = '';
21
21
 
22
- protected onInit(): Promise<void> {
23
- this._environmentMessage = this._getEnvironmentMessage();
24
-
25
- return super.onInit();
26
- }
27
-
28
22
  public render(): void {
29
23
  this.domElement.innerHTML = `
30
24
  <section class="${styles.<%= componentNameCamelCase %>} ${!!this.context.sdks.microsoftTeams ? styles.teams : ''}">
@@ -53,6 +47,14 @@ export default class <%= componentClassName %> extends BaseClientSideWebPart<I<%
53
47
  </section>`;
54
48
  }
55
49
 
50
+ protected onInit(): Promise<void> {
51
+ this._environmentMessage = this._getEnvironmentMessage();
52
+
53
+ return super.onInit();
54
+ }
55
+
56
+
57
+
56
58
  private _getEnvironmentMessage(): string {
57
59
  if (!!this.context.sdks.microsoftTeams) { // running in Teams
58
60
  return this.context.isServedFromLocalhost ? strings.AppLocalEnvironmentTeams : strings.AppTeamsTabEnvironment;
@@ -21,12 +21,6 @@ export default class <%= componentClassName %> extends BaseClientSideWebPart<I<%
21
21
  private _isDarkTheme: boolean = false;
22
22
  private _environmentMessage: string = '';
23
23
 
24
- protected onInit(): Promise<void> {
25
- this._environmentMessage = this._getEnvironmentMessage();
26
-
27
- return super.onInit();
28
- }
29
-
30
24
  public render(): void {
31
25
  const element: React.ReactElement<I<%= componentName %>Props> = React.createElement(
32
26
  <%= componentName %>,
@@ -42,6 +36,12 @@ export default class <%= componentClassName %> extends BaseClientSideWebPart<I<%
42
36
  ReactDom.render(element, this.domElement);
43
37
  }
44
38
 
39
+ protected onInit(): Promise<void> {
40
+ this._environmentMessage = this._getEnvironmentMessage();
41
+
42
+ return super.onInit();
43
+ }
44
+
45
45
  private _getEnvironmentMessage(): string {
46
46
  if (!!this.context.sdks.microsoftTeams) { // running in Teams
47
47
  return this.context.isServedFromLocalhost ? strings.AppLocalEnvironmentTeams : strings.AppTeamsTabEnvironment;
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@microsoft/generator-sharepoint",
3
- "version": "1.14.0",
3
+ "version": "1.15.0-beta.1",
4
4
  "description": "Yeoman generator for the SharePoint Framework",
5
5
  "scripts": {},
6
6
  "engines": {
7
- "node": ">=12.13.0 <13.0.0 || >=14.15.0 <15.0.0"
7
+ "node": ">=12.13.0 <13.0.0 || >=14.15.0 <15.0.0 || >=16.13.0 <17.0.0"
8
8
  },
9
9
  "keywords": [
10
10
  "yeoman-generator"
@@ -13,7 +13,7 @@
13
13
  "homepage": "http://aka.ms/spfx",
14
14
  "main": "lib/generators/app/index.js",
15
15
  "dependencies": {
16
- "@microsoft/spfx-heft-plugins": "1.14.0",
16
+ "@microsoft/spfx-heft-plugins": "1.15.0-beta.1",
17
17
  "@rushstack/node-core-library": "3.45.0",
18
18
  "colors": "~1.2.1",
19
19
  "lodash": "4.17.21",
@@ -1,13 +0,0 @@
1
- {
2
- "dependencies": {
3
- "@microsoft/sp-core-library": "1.14.0",
4
- "@microsoft/sp-property-pane": "1.14.0",
5
- "@microsoft/sp-adaptive-card-extension-base": "1.14.0"
6
- },
7
- "devDependencies": {
8
- "@microsoft/sp-build-web": "1.14.0",
9
- "@microsoft/sp-tslint-rules": "1.14.0",
10
- "@microsoft/sp-module-interfaces": "1.14.0",
11
- "@microsoft/rush-stack-compiler-3.9": "0.4.47"
12
- }
13
- }
@@ -1,13 +0,0 @@
1
- {
2
- "dependencies": {
3
- "@microsoft/sp-core-library": "1.14.0",
4
- "@microsoft/sp-property-pane": "1.14.0",
5
- "@microsoft/sp-adaptive-card-extension-base": "1.14.0"
6
- },
7
- "devDependencies": {
8
- "@microsoft/sp-build-web": "1.14.0",
9
- "@microsoft/sp-tslint-rules": "1.14.0",
10
- "@microsoft/sp-module-interfaces": "1.14.0",
11
- "@microsoft/rush-stack-compiler-3.9": "0.4.47"
12
- }
13
- }
@@ -1,6 +0,0 @@
1
- {
2
- "dependencies": {
3
- "@microsoft/sp-dialog": "1.14.0",
4
- "@microsoft/sp-application-base": "1.14.0"
5
- }
6
- }
@@ -1,6 +0,0 @@
1
- {
2
- "dependencies": {
3
- "@microsoft/sp-dialog": "1.14.0",
4
- "@microsoft/sp-application-base": "1.14.0"
5
- }
6
- }
@@ -1,6 +0,0 @@
1
- {
2
- "dependencies": {
3
- "@microsoft/sp-listview-extensibility": "1.14.0",
4
- "@microsoft/sp-dialog": "1.14.0"
5
- }
6
- }
@@ -1,6 +0,0 @@
1
- {
2
- "dependencies": {
3
- "@microsoft/sp-listview-extensibility": "1.14.0",
4
- "@microsoft/sp-dialog": "1.14.0"
5
- }
6
- }
@@ -1,12 +0,0 @@
1
- {
2
- "dependencies": {
3
- "@microsoft/sp-core-library": "1.14.0",
4
- "@microsoft/decorators": "1.14.0"
5
- },
6
- "devDependencies": {
7
- "@microsoft/sp-build-web": "1.14.0",
8
- "@microsoft/sp-tslint-rules": "1.14.0",
9
- "@microsoft/sp-module-interfaces": "1.14.0",
10
- "@microsoft/rush-stack-compiler-3.9": "0.4.47"
11
- }
12
- }
@@ -1,12 +0,0 @@
1
- {
2
- "dependencies": {
3
- "@microsoft/sp-core-library": "1.14.0",
4
- "@microsoft/decorators": "1.14.0"
5
- },
6
- "devDependencies": {
7
- "@microsoft/sp-build-web": "1.14.0",
8
- "@microsoft/sp-tslint-rules": "1.14.0",
9
- "@microsoft/sp-module-interfaces": "1.14.0",
10
- "@microsoft/rush-stack-compiler-3.9": "0.4.47"
11
- }
12
- }
@@ -1,5 +0,0 @@
1
- {
2
- "dependencies": {
3
- "@microsoft/sp-listview-extensibility": "1.14.0"
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "dependencies": {
3
- "@microsoft/sp-listview-extensibility": "1.14.0"
4
- }
5
- }
@@ -1,9 +0,0 @@
1
- {
2
- "dependencies": {},
3
- "devDependencies": {
4
- "@microsoft/sp-build-web": "1.14.0",
5
- "@microsoft/sp-tslint-rules": "1.14.0",
6
- "@microsoft/sp-module-interfaces": "1.14.0",
7
- "@microsoft/rush-stack-compiler-3.9": "0.4.47"
8
- }
9
- }
@@ -1,9 +0,0 @@
1
- {
2
- "dependencies": {},
3
- "devDependencies": {
4
- "@microsoft/sp-build-web": "1.14.0",
5
- "@microsoft/sp-tslint-rules": "1.14.0",
6
- "@microsoft/sp-module-interfaces": "1.14.0",
7
- "@microsoft/rush-stack-compiler-3.9": "0.4.47"
8
- }
9
- }
@@ -1,11 +0,0 @@
1
- {
2
- "dependencies": {
3
- "react": "16.13.1",
4
- "react-dom": "16.13.1",
5
- "office-ui-fabric-react": "7.174.1"
6
- },
7
- "devDependencies": {
8
- "@types/react": "16.9.51",
9
- "@types/react-dom": "16.9.8"
10
- }
11
- }
@@ -1,5 +0,0 @@
1
- {
2
- "dependencies": {
3
- "@microsoft/sp-search-extensibility": "1.14.0"
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "dependencies": {
3
- "@microsoft/sp-search-extensibility": "1.14.0"
4
- }
5
- }