@microsoft/generator-sharepoint 1.20.0 → 1.21.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 (91) hide show
  1. package/lib/common/BaseGenerator.js +161 -121
  2. package/lib/common/ConfigJsonManager.js +45 -29
  3. package/lib/common/JsonManager.js +70 -29
  4. package/lib/common/PackageJsonManager.js +28 -8
  5. package/lib/common/PackageSolutionJsonManager.js +41 -23
  6. package/lib/common/ServeJsonManager.js +69 -31
  7. package/lib/common/TeamsManifestJsonManager.js +33 -21
  8. package/lib/common/YeomanConfiguration.js +25 -8
  9. package/lib/common/bundles-versions.json +1 -4
  10. package/lib/common/dependencies.json +62 -100
  11. package/lib/common/spsay.js +32 -19
  12. package/lib/common/utilities.js +97 -63
  13. package/lib/generators/adaptiveCardExtension/BaseAdaptiveCardExtensionGenerator.js +86 -41
  14. package/lib/generators/adaptiveCardExtension/index.js +103 -62
  15. package/lib/generators/app/index.js +138 -117
  16. package/lib/generators/applicationCustomizer/index.js +89 -45
  17. package/lib/generators/commandSet/index.js +89 -45
  18. package/lib/generators/component/BaseComponentGenerator.js +130 -77
  19. package/lib/generators/component/index.js +108 -69
  20. package/lib/generators/dataVisualizationAdaptiveCardExtension/index.js +72 -43
  21. package/lib/generators/extension/BaseExtensionGenerator.js +95 -49
  22. package/lib/generators/extension/index.js +104 -64
  23. package/lib/generators/fieldCustomizer/index.js +97 -50
  24. package/lib/generators/formCustomizer/index.js +99 -52
  25. package/lib/generators/formCustomizer/templates/none/{componentClassName}.ts +6 -2
  26. package/lib/generators/genericAdaptiveCardExtension/index.js +80 -46
  27. package/lib/generators/library/index.js +89 -43
  28. package/lib/generators/searchAdaptiveCardExtension/index.js +72 -43
  29. package/lib/generators/searchQueryModifier/index.js +89 -45
  30. package/lib/generators/solution/heft.package.json +1 -1
  31. package/lib/generators/solution/index.js +110 -80
  32. package/lib/generators/solution/non-heft.package.json +1 -1
  33. package/lib/generators/webpart/index.js +99 -50
  34. package/lib/generators/webpart/initial.teamsManifest.json +2 -4
  35. package/package.json +38 -12
  36. package/lib/common/BaseGenerator.d.ts +0 -59
  37. package/lib/common/BaseGenerator.d.ts.map +0 -1
  38. package/lib/common/ConfigJsonManager.d.ts +0 -16
  39. package/lib/common/ConfigJsonManager.d.ts.map +0 -1
  40. package/lib/common/JsonManager.d.ts +0 -12
  41. package/lib/common/JsonManager.d.ts.map +0 -1
  42. package/lib/common/PackageJsonManager.d.ts +0 -18
  43. package/lib/common/PackageJsonManager.d.ts.map +0 -1
  44. package/lib/common/PackageSolutionJsonManager.d.ts +0 -20
  45. package/lib/common/PackageSolutionJsonManager.d.ts.map +0 -1
  46. package/lib/common/ServeJsonManager.d.ts +0 -12
  47. package/lib/common/ServeJsonManager.d.ts.map +0 -1
  48. package/lib/common/TeamsManifestJsonManager.d.ts +0 -51
  49. package/lib/common/TeamsManifestJsonManager.d.ts.map +0 -1
  50. package/lib/common/YeomanConfiguration.d.ts +0 -25
  51. package/lib/common/YeomanConfiguration.d.ts.map +0 -1
  52. package/lib/common/spsay.d.ts +0 -2
  53. package/lib/common/spsay.d.ts.map +0 -1
  54. package/lib/common/utilities.d.ts +0 -9
  55. package/lib/common/utilities.d.ts.map +0 -1
  56. package/lib/generators/adaptiveCardExtension/BaseAdaptiveCardExtensionGenerator.d.ts +0 -18
  57. package/lib/generators/adaptiveCardExtension/BaseAdaptiveCardExtensionGenerator.d.ts.map +0 -1
  58. package/lib/generators/adaptiveCardExtension/index.d.ts +0 -23
  59. package/lib/generators/adaptiveCardExtension/index.d.ts.map +0 -1
  60. package/lib/generators/app/index.d.ts +0 -10
  61. package/lib/generators/app/index.d.ts.map +0 -1
  62. package/lib/generators/applicationCustomizer/index.d.ts +0 -24
  63. package/lib/generators/applicationCustomizer/index.d.ts.map +0 -1
  64. package/lib/generators/commandSet/index.d.ts +0 -23
  65. package/lib/generators/commandSet/index.d.ts.map +0 -1
  66. package/lib/generators/component/BaseComponentGenerator.d.ts +0 -56
  67. package/lib/generators/component/BaseComponentGenerator.d.ts.map +0 -1
  68. package/lib/generators/component/index.d.ts +0 -23
  69. package/lib/generators/component/index.d.ts.map +0 -1
  70. package/lib/generators/dataVisualizationAdaptiveCardExtension/index.d.ts +0 -19
  71. package/lib/generators/dataVisualizationAdaptiveCardExtension/index.d.ts.map +0 -1
  72. package/lib/generators/extension/BaseExtensionGenerator.d.ts +0 -19
  73. package/lib/generators/extension/BaseExtensionGenerator.d.ts.map +0 -1
  74. package/lib/generators/extension/index.d.ts +0 -26
  75. package/lib/generators/extension/index.d.ts.map +0 -1
  76. package/lib/generators/fieldCustomizer/index.d.ts +0 -24
  77. package/lib/generators/fieldCustomizer/index.d.ts.map +0 -1
  78. package/lib/generators/formCustomizer/index.d.ts +0 -24
  79. package/lib/generators/formCustomizer/index.d.ts.map +0 -1
  80. package/lib/generators/genericAdaptiveCardExtension/index.d.ts +0 -21
  81. package/lib/generators/genericAdaptiveCardExtension/index.d.ts.map +0 -1
  82. package/lib/generators/library/index.d.ts +0 -23
  83. package/lib/generators/library/index.d.ts.map +0 -1
  84. package/lib/generators/searchAdaptiveCardExtension/index.d.ts +0 -19
  85. package/lib/generators/searchAdaptiveCardExtension/index.d.ts.map +0 -1
  86. package/lib/generators/searchQueryModifier/index.d.ts +0 -23
  87. package/lib/generators/searchQueryModifier/index.d.ts.map +0 -1
  88. package/lib/generators/solution/index.d.ts +0 -19
  89. package/lib/generators/solution/index.d.ts.map +0 -1
  90. package/lib/generators/webpart/index.d.ts +0 -23
  91. package/lib/generators/webpart/index.d.ts.map +0 -1
@@ -1,68 +1,106 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "composeWith", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return composeWith;
7
9
  }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
10
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.composeWith = void 0;
30
- const colors_1 = __importDefault(require("colors"));
31
- const path = __importStar(require("path"));
32
- const yosay = require("yosay");
33
- const node_core_library_1 = require("@rushstack/node-core-library");
34
- const spsay_1 = __importDefault(require("../../common/spsay"));
35
- const BaseGenerator_1 = require("../../common/BaseGenerator");
36
- const Utils = __importStar(require("../../common/utilities"));
37
- const YeomanConfiguration_1 = require("../../common/YeomanConfiguration");
38
- const Solution = __importStar(require("../solution"));
39
- const Component = __importStar(require("../component"));
40
- const Webpart = __importStar(require("../webpart"));
41
- const Extension = __importStar(require("../extension"));
42
- const Library = __importStar(require("../library"));
43
- const AdaptiveCardExtension = __importStar(require("../adaptiveCardExtension"));
44
- const FieldCustomizer = __importStar(require("../fieldCustomizer"));
45
- const CommandSet = __importStar(require("../commandSet"));
46
- const SearchQueryModifier = __importStar(require("../searchQueryModifier"));
47
- const ApplicationCustomizer = __importStar(require("../applicationCustomizer"));
48
- const FormCustomizer = __importStar(require("../formCustomizer"));
49
- const GenericAdaptiveCardExtension = __importStar(require("../genericAdaptiveCardExtension"));
50
- const SearchAdaptiveCardExtension = __importStar(require("../searchAdaptiveCardExtension"));
51
- const DataVisualizationAdaptiveCardExtension = __importStar(require("../dataVisualizationAdaptiveCardExtension"));
11
+ const _colors = /*#__PURE__*/ _interop_require_default(require("colors"));
12
+ const _path = /*#__PURE__*/ _interop_require_wildcard(require("path"));
13
+ const _yosay = /*#__PURE__*/ _interop_require_default(require("yosay"));
14
+ const _nodecorelibrary = require("@rushstack/node-core-library");
15
+ const _spsay = /*#__PURE__*/ _interop_require_default(require("../../common/spsay"));
16
+ const _BaseGenerator = require("../../common/BaseGenerator");
17
+ const _utilities = /*#__PURE__*/ _interop_require_wildcard(require("../../common/utilities"));
18
+ const _YeomanConfiguration = require("../../common/YeomanConfiguration");
19
+ const _solution = /*#__PURE__*/ _interop_require_wildcard(require("../solution"));
20
+ const _component = /*#__PURE__*/ _interop_require_wildcard(require("../component"));
21
+ const _webpart = /*#__PURE__*/ _interop_require_wildcard(require("../webpart"));
22
+ const _extension = /*#__PURE__*/ _interop_require_wildcard(require("../extension"));
23
+ const _library = /*#__PURE__*/ _interop_require_wildcard(require("../library"));
24
+ const _adaptiveCardExtension = /*#__PURE__*/ _interop_require_wildcard(require("../adaptiveCardExtension"));
25
+ const _fieldCustomizer = /*#__PURE__*/ _interop_require_wildcard(require("../fieldCustomizer"));
26
+ const _commandSet = /*#__PURE__*/ _interop_require_wildcard(require("../commandSet"));
27
+ const _searchQueryModifier = /*#__PURE__*/ _interop_require_wildcard(require("../searchQueryModifier"));
28
+ const _applicationCustomizer = /*#__PURE__*/ _interop_require_wildcard(require("../applicationCustomizer"));
29
+ const _formCustomizer = /*#__PURE__*/ _interop_require_wildcard(require("../formCustomizer"));
30
+ const _genericAdaptiveCardExtension = /*#__PURE__*/ _interop_require_wildcard(require("../genericAdaptiveCardExtension"));
31
+ const _searchAdaptiveCardExtension = /*#__PURE__*/ _interop_require_wildcard(require("../searchAdaptiveCardExtension"));
32
+ const _dataVisualizationAdaptiveCardExtension = /*#__PURE__*/ _interop_require_wildcard(require("../dataVisualizationAdaptiveCardExtension"));
33
+ function _define_property(obj, key, value) {
34
+ if (key in obj) {
35
+ Object.defineProperty(obj, key, {
36
+ value: value,
37
+ enumerable: true,
38
+ configurable: true,
39
+ writable: true
40
+ });
41
+ } else {
42
+ obj[key] = value;
43
+ }
44
+ return obj;
45
+ }
46
+ function _interop_require_default(obj) {
47
+ return obj && obj.__esModule ? obj : {
48
+ default: obj
49
+ };
50
+ }
51
+ function _getRequireWildcardCache(nodeInterop) {
52
+ if (typeof WeakMap !== "function") return null;
53
+ var cacheBabelInterop = new WeakMap();
54
+ var cacheNodeInterop = new WeakMap();
55
+ return (_getRequireWildcardCache = function(nodeInterop) {
56
+ return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
57
+ })(nodeInterop);
58
+ }
59
+ function _interop_require_wildcard(obj, nodeInterop) {
60
+ if (!nodeInterop && obj && obj.__esModule) {
61
+ return obj;
62
+ }
63
+ if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
64
+ return {
65
+ default: obj
66
+ };
67
+ }
68
+ var cache = _getRequireWildcardCache(nodeInterop);
69
+ if (cache && cache.has(obj)) {
70
+ return cache.get(obj);
71
+ }
72
+ var newObj = {
73
+ __proto__: null
74
+ };
75
+ var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
76
+ for(var key in obj){
77
+ if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
78
+ var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
79
+ if (desc && (desc.get || desc.set)) {
80
+ Object.defineProperty(newObj, key, desc);
81
+ } else {
82
+ newObj[key] = obj[key];
83
+ }
84
+ }
85
+ }
86
+ newObj.default = obj;
87
+ if (cache) {
88
+ cache.set(obj, newObj);
89
+ }
90
+ return newObj;
91
+ }
52
92
  const VERSION = require('../../../package.json').version;
53
93
  function composeWith(base, options) {
54
- Utils.compose(path.basename(__dirname), base, options);
94
+ _utilities.compose(_path.basename(__dirname), base, options);
55
95
  }
56
- exports.composeWith = composeWith;
57
96
  /**
58
97
  * This class is the entry point when running `yo @microsoft/sharepoint`
59
- */
60
- class AppGenerator extends BaseGenerator_1.BaseGenerator {
98
+ */ class AppGenerator extends _BaseGenerator.BaseGenerator {
61
99
  initializing() {
62
- this.log(yosay('Welcome to the Microsoft 365 ' + colors_1.default.blue(`SPFx Yeoman Generator@${VERSION}`)));
100
+ this.log((0, _yosay.default)('Welcome to the Microsoft 365 ' + _colors.default.blue(`SPFx Yeoman Generator@${VERSION}`)));
63
101
  this._provideRetirementNote();
64
102
  this._explainArguments();
65
- this.context.creatingSolution = !YeomanConfiguration_1.YeomanConfiguration.libraryName;
103
+ this.context.creatingSolution = !_YeomanConfiguration.YeomanConfiguration.libraryName;
66
104
  const shouldUseSubDir = this.options.solutionName !== undefined;
67
105
  if (shouldUseSubDir) {
68
106
  // changing destinationRoot to the subfolder
@@ -94,20 +132,17 @@ class AppGenerator extends BaseGenerator_1.BaseGenerator {
94
132
  }
95
133
  if (this.options.componentType !== undefined) {
96
134
  this.config.set('componentType', this.options.componentType);
97
- }
98
- else {
135
+ } else {
99
136
  this.config.set('componentType', undefined);
100
137
  }
101
138
  if (this.options.extensionType !== undefined) {
102
139
  this.config.set('extensionType', this.options.extensionType);
103
- }
104
- else {
140
+ } else {
105
141
  this.config.set('extensionType', undefined);
106
142
  }
107
143
  if (this.options.aceTemplateType !== undefined) {
108
144
  this.config.set('aceTemplateType', this.options.aceTemplateType);
109
- }
110
- else {
145
+ } else {
111
146
  this.config.set('aceTemplateType', undefined);
112
147
  }
113
148
  if (this.options.framework !== undefined) {
@@ -118,14 +153,12 @@ class AppGenerator extends BaseGenerator_1.BaseGenerator {
118
153
  }
119
154
  if (this.options.componentName !== undefined) {
120
155
  this.config.set('componentName', this.options.componentName);
121
- }
122
- else {
156
+ } else {
123
157
  this.config.set('componentName', undefined);
124
158
  }
125
159
  if (this.options.componentDescription !== undefined) {
126
160
  this.config.set('componentDescription', this.options.componentDescription);
127
- }
128
- else {
161
+ } else {
129
162
  this.config.set('componentDescription', undefined);
130
163
  }
131
164
  this.config.set('plusBeta', VERSION.indexOf('beta') >= 0);
@@ -138,20 +171,20 @@ class AppGenerator extends BaseGenerator_1.BaseGenerator {
138
171
  };
139
172
  this.env.options.nodePackageManager = this.options.packageManager || 'npm';
140
173
  // Config destination root before composition.
141
- Solution.composeWith(this, baseOption);
142
- Component.composeWith(this, baseOption);
143
- Webpart.composeWith(this, baseOption);
144
- Extension.composeWith(this, baseOption);
145
- Library.composeWith(this, baseOption);
146
- AdaptiveCardExtension.composeWith(this, baseOption);
147
- FieldCustomizer.composeWith(this, baseOption);
148
- CommandSet.composeWith(this, baseOption);
149
- SearchQueryModifier.composeWith(this, baseOption);
150
- ApplicationCustomizer.composeWith(this, baseOption);
151
- FormCustomizer.composeWith(this, baseOption);
152
- GenericAdaptiveCardExtension.composeWith(this, baseOption);
153
- SearchAdaptiveCardExtension.composeWith(this, baseOption);
154
- DataVisualizationAdaptiveCardExtension.composeWith(this, baseOption);
174
+ _solution.composeWith(this, baseOption);
175
+ _component.composeWith(this, baseOption);
176
+ _webpart.composeWith(this, baseOption);
177
+ _extension.composeWith(this, baseOption);
178
+ _library.composeWith(this, baseOption);
179
+ _adaptiveCardExtension.composeWith(this, baseOption);
180
+ _fieldCustomizer.composeWith(this, baseOption);
181
+ _commandSet.composeWith(this, baseOption);
182
+ _searchQueryModifier.composeWith(this, baseOption);
183
+ _applicationCustomizer.composeWith(this, baseOption);
184
+ _formCustomizer.composeWith(this, baseOption);
185
+ _genericAdaptiveCardExtension.composeWith(this, baseOption);
186
+ _searchAdaptiveCardExtension.composeWith(this, baseOption);
187
+ _dataVisualizationAdaptiveCardExtension.composeWith(this, baseOption);
155
188
  }
156
189
  prompting() {
157
190
  // Configure the solution root folder before other composition.
@@ -161,82 +194,70 @@ class AppGenerator extends BaseGenerator_1.BaseGenerator {
161
194
  }
162
195
  }
163
196
  configuring() {
164
- /* no-op */
165
- }
197
+ /* no-op */ }
166
198
  writing() {
167
- /* no-op */
168
- }
199
+ /* no-op */ }
169
200
  install() {
170
- /* no-op */
171
- }
201
+ /* no-op */ }
172
202
  end() {
173
- const libraryName = YeomanConfiguration_1.YeomanConfiguration.libraryName;
174
- const useHeft = YeomanConfiguration_1.YeomanConfiguration.useHeft;
175
- this.log((0, spsay_1.default)(libraryName, useHeft));
176
- }
177
- constructor(args, options) {
178
- super(args, options);
179
- this.friendlyName = 'SharePoint Client-side Solution Generator';
180
- this.allowEmptyPackageJson = true;
181
- this.desc('Generate a SharePoint client-side solution with webparts.');
182
- Component.defineOptions(this);
183
- Solution.defineOptions(this);
203
+ const libraryName = _YeomanConfiguration.YeomanConfiguration.libraryName;
204
+ const useHeft = _YeomanConfiguration.YeomanConfiguration.useHeft;
205
+ this.log((0, _spsay.default)(libraryName, useHeft));
184
206
  }
185
207
  _provideRetirementNote() {
186
- this.log(colors_1.default.bold(`See ${colors_1.default.underline(colors_1.default.blue('https://aka.ms/spfx-yeoman-info'))} for more information on how to use this generator.`));
208
+ this.log(_colors.default.bold(`See ${_colors.default.underline(_colors.default.blue('https://aka.ms/spfx-yeoman-info'))} for more information on how to use this generator.`));
187
209
  }
188
210
  _explainArguments() {
189
211
  // If the CLI argument is specified, the corresponding prompting in sub-generators will be skipped.
190
212
  // The following calls do similar jobs as prompting. Place them here instead of initializing step.
191
213
  if (this.options.solutionName) {
192
- const solutionName = colors_1.default.cyan(this.options.solutionName);
214
+ const solutionName = _colors.default.cyan(this.options.solutionName);
193
215
  this.log(`A folder with solution name ${solutionName} will be created for you.`);
194
216
  }
195
217
  if (this.options.environment) {
196
- const environment = colors_1.default.cyan(this.options.environment);
218
+ const environment = _colors.default.cyan(this.options.environment);
197
219
  this.log(`A component for the ${environment} environment will be created for you.`);
198
220
  }
199
221
  if (this.options.packageManager) {
200
- const packageManager = colors_1.default.cyan(this.options.packageManager);
222
+ const packageManager = _colors.default.cyan(this.options.packageManager);
201
223
  this.log(`The ${packageManager} package manager will be used.`);
202
224
  }
203
- const componentType = this.options.componentType === 'webpart'
204
- ? 'web part'
205
- : this.options.componentType === 'extension'
206
- ? 'extension'
207
- : this.options.componentType === 'library'
208
- ? 'library'
209
- : this.options.componentType === 'adaptiveCardExtension'
210
- ? 'adaptiveCardExtension'
211
- : 'component';
225
+ const componentType = this.options.componentType === 'webpart' ? 'web part' : this.options.componentType === 'extension' ? 'extension' : this.options.componentType === 'library' ? 'library' : this.options.componentType === 'adaptiveCardExtension' ? 'adaptiveCardExtension' : 'component';
212
226
  const componentTypeUpper = componentType.charAt(0).toUpperCase() + componentType.slice(1);
213
227
  if (this.options.componentName) {
214
- const webpartName = colors_1.default.cyan(this.options.componentName);
228
+ const webpartName = _colors.default.cyan(this.options.componentName);
215
229
  let frameworkWords = this.options.template;
216
230
  if (!frameworkWords) {
217
231
  frameworkWords = this.options.framework;
218
232
  }
219
233
  if (frameworkWords) {
220
- frameworkWords = ' with ' + colors_1.default.cyan(frameworkWords) + ' framework';
221
- }
222
- else {
234
+ frameworkWords = ' with ' + _colors.default.cyan(frameworkWords) + ' framework';
235
+ } else {
223
236
  frameworkWords = '';
224
237
  }
225
- this.log(`${componentType === 'extension' ? 'An' : 'A'} ${componentType} with the name ${webpartName}` +
226
- ` will be added to your solution${frameworkWords}.`);
238
+ this.log(`${componentType === 'extension' ? 'An' : 'A'} ${componentType} with the name ${webpartName}` + ` will be added to your solution${frameworkWords}.`);
227
239
  }
228
240
  if (this.options.componentDescription) {
229
- const description = colors_1.default.cyan(this.options.componentDescription);
241
+ const description = _colors.default.cyan(this.options.componentDescription);
230
242
  this.log(`${componentTypeUpper} description is going to be ${description}.`);
231
243
  }
232
244
  }
233
245
  _setSDKsVersions() {
234
- const bundlesFile = node_core_library_1.JsonFile.load(`${__dirname}/../../common/bundles-versions.json`);
246
+ const bundlesFile = _nodecorelibrary.JsonFile.load(`${__dirname}/../../common/bundles-versions.json`);
235
247
  this.config.set('sdksVersions', bundlesFile);
236
248
  }
249
+ constructor(args, options){
250
+ super(args, options);
251
+ _define_property(this, "friendlyName", 'SharePoint Client-side Solution Generator');
252
+ _define_property(this, "allowEmptyPackageJson", true);
253
+ this.desc('Generate a SharePoint client-side solution with webparts.');
254
+ _component.defineOptions(this);
255
+ _solution.defineOptions(this);
256
+ }
237
257
  }
238
258
  // Yeoman expects exports of this type, which overrides the TS exports above
239
259
  // Ensure that anything marked as export above is also listed here
240
260
  module.exports = AppGenerator;
241
261
  module.exports.composeWith = composeWith;
242
- //# sourceMappingURL=index.js.map
262
+
263
+ //#sourceMappingUrl=./index.js.map
@@ -1,44 +1,90 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ ApplicationCustomizerGenerator: function() {
13
+ return ApplicationCustomizerGenerator;
14
+ },
15
+ composeWith: function() {
16
+ return composeWith;
17
+ },
18
+ defineOptions: function() {
19
+ return defineOptions;
7
20
  }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
21
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.ApplicationCustomizerGenerator = exports.defineOptions = exports.composeWith = void 0;
27
- const path = __importStar(require("path"));
28
- const Utils = __importStar(require("../../common/utilities"));
29
- const BaseExtension = __importStar(require("../extension/BaseExtensionGenerator"));
22
+ const _path = /*#__PURE__*/ _interop_require_wildcard(require("path"));
23
+ const _utilities = /*#__PURE__*/ _interop_require_wildcard(require("../../common/utilities"));
24
+ const _BaseExtensionGenerator = /*#__PURE__*/ _interop_require_wildcard(require("../extension/BaseExtensionGenerator"));
25
+ function _define_property(obj, key, value) {
26
+ if (key in obj) {
27
+ Object.defineProperty(obj, key, {
28
+ value: value,
29
+ enumerable: true,
30
+ configurable: true,
31
+ writable: true
32
+ });
33
+ } else {
34
+ obj[key] = value;
35
+ }
36
+ return obj;
37
+ }
38
+ function _getRequireWildcardCache(nodeInterop) {
39
+ if (typeof WeakMap !== "function") return null;
40
+ var cacheBabelInterop = new WeakMap();
41
+ var cacheNodeInterop = new WeakMap();
42
+ return (_getRequireWildcardCache = function(nodeInterop) {
43
+ return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
44
+ })(nodeInterop);
45
+ }
46
+ function _interop_require_wildcard(obj, nodeInterop) {
47
+ if (!nodeInterop && obj && obj.__esModule) {
48
+ return obj;
49
+ }
50
+ if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
51
+ return {
52
+ default: obj
53
+ };
54
+ }
55
+ var cache = _getRequireWildcardCache(nodeInterop);
56
+ if (cache && cache.has(obj)) {
57
+ return cache.get(obj);
58
+ }
59
+ var newObj = {
60
+ __proto__: null
61
+ };
62
+ var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
63
+ for(var key in obj){
64
+ if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
65
+ var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
66
+ if (desc && (desc.get || desc.set)) {
67
+ Object.defineProperty(newObj, key, desc);
68
+ } else {
69
+ newObj[key] = obj[key];
70
+ }
71
+ }
72
+ }
73
+ newObj.default = obj;
74
+ if (cache) {
75
+ cache.set(obj, newObj);
76
+ }
77
+ return newObj;
78
+ }
30
79
  function composeWith(base, options) {
31
- Utils.compose(path.basename(__dirname), base, options);
80
+ _utilities.compose(_path.basename(__dirname), base, options);
32
81
  }
33
- exports.composeWith = composeWith;
34
82
  function defineOptions(generator) {
35
- BaseExtension.defineOptions(generator, 'Application Customizer');
83
+ _BaseExtensionGenerator.defineOptions(generator, 'Application Customizer');
36
84
  }
37
- exports.defineOptions = defineOptions;
38
- class ApplicationCustomizerGenerator extends BaseExtension.BaseExtensionGenerator {
85
+ class ApplicationCustomizerGenerator extends _BaseExtensionGenerator.BaseExtensionGenerator {
39
86
  initializing() {
40
- /* no-op */
41
- }
87
+ /* no-op */ }
42
88
  async prompting() {
43
89
  this.ensureCorrectFolder();
44
90
  if (this._shouldExecute()) {
@@ -75,26 +121,24 @@ class ApplicationCustomizerGenerator extends BaseExtension.BaseExtensionGenerato
75
121
  end() {
76
122
  super.end();
77
123
  }
78
- constructor(args, options) {
79
- super(args, options);
80
- this.friendlyName = 'Application Customizer';
81
- this.codeName = 'ApplicationCustomizer';
82
- this.allowedTemplates = [];
83
- defineOptions(this);
84
- }
85
124
  includeClientSideInstances() {
86
125
  return true;
87
126
  }
88
127
  _shouldExecute() {
89
- return (this.config.get('environment') === 'spo' &&
90
- this.config.get('componentType') === 'extension' &&
91
- this.config.get('extensionType') === 'ApplicationCustomizer');
128
+ return this.config.get('environment') === 'spo' && this.config.get('componentType') === 'extension' && this.config.get('extensionType') === 'ApplicationCustomizer';
129
+ }
130
+ constructor(args, options){
131
+ super(args, options);
132
+ _define_property(this, "friendlyName", 'Application Customizer');
133
+ _define_property(this, "codeName", 'ApplicationCustomizer');
134
+ _define_property(this, "allowedTemplates", []);
135
+ defineOptions(this);
92
136
  }
93
137
  }
94
- exports.ApplicationCustomizerGenerator = ApplicationCustomizerGenerator;
95
138
  // Yeoman expects exports of this type, which overrides the TS exports above
96
139
  // Ensure that anything marked as export above is also listed here
97
140
  module.exports = ApplicationCustomizerGenerator;
98
141
  module.exports.defineOptions = defineOptions;
99
142
  module.exports.composeWith = composeWith;
100
- //# sourceMappingURL=index.js.map
143
+
144
+ //#sourceMappingUrl=./index.js.map