@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.
- package/lib/common/BaseGenerator.js +161 -121
- package/lib/common/ConfigJsonManager.js +45 -29
- package/lib/common/JsonManager.js +70 -29
- package/lib/common/PackageJsonManager.js +28 -8
- package/lib/common/PackageSolutionJsonManager.js +41 -23
- package/lib/common/ServeJsonManager.js +69 -31
- package/lib/common/TeamsManifestJsonManager.js +33 -21
- package/lib/common/YeomanConfiguration.js +25 -8
- package/lib/common/bundles-versions.json +1 -4
- package/lib/common/dependencies.json +62 -100
- package/lib/common/spsay.js +32 -19
- package/lib/common/utilities.js +97 -63
- package/lib/generators/adaptiveCardExtension/BaseAdaptiveCardExtensionGenerator.js +86 -41
- package/lib/generators/adaptiveCardExtension/index.js +103 -62
- package/lib/generators/app/index.js +138 -117
- package/lib/generators/applicationCustomizer/index.js +89 -45
- package/lib/generators/commandSet/index.js +89 -45
- package/lib/generators/component/BaseComponentGenerator.js +130 -77
- package/lib/generators/component/index.js +108 -69
- package/lib/generators/dataVisualizationAdaptiveCardExtension/index.js +72 -43
- package/lib/generators/extension/BaseExtensionGenerator.js +95 -49
- package/lib/generators/extension/index.js +104 -64
- package/lib/generators/fieldCustomizer/index.js +97 -50
- package/lib/generators/formCustomizer/index.js +99 -52
- package/lib/generators/formCustomizer/templates/none/{componentClassName}.ts +6 -2
- package/lib/generators/genericAdaptiveCardExtension/index.js +80 -46
- package/lib/generators/library/index.js +89 -43
- package/lib/generators/searchAdaptiveCardExtension/index.js +72 -43
- package/lib/generators/searchQueryModifier/index.js +89 -45
- package/lib/generators/solution/heft.package.json +1 -1
- package/lib/generators/solution/index.js +110 -80
- package/lib/generators/solution/non-heft.package.json +1 -1
- package/lib/generators/webpart/index.js +99 -50
- package/lib/generators/webpart/initial.teamsManifest.json +2 -4
- package/package.json +38 -12
- package/lib/common/BaseGenerator.d.ts +0 -59
- package/lib/common/BaseGenerator.d.ts.map +0 -1
- package/lib/common/ConfigJsonManager.d.ts +0 -16
- package/lib/common/ConfigJsonManager.d.ts.map +0 -1
- package/lib/common/JsonManager.d.ts +0 -12
- package/lib/common/JsonManager.d.ts.map +0 -1
- package/lib/common/PackageJsonManager.d.ts +0 -18
- package/lib/common/PackageJsonManager.d.ts.map +0 -1
- package/lib/common/PackageSolutionJsonManager.d.ts +0 -20
- package/lib/common/PackageSolutionJsonManager.d.ts.map +0 -1
- package/lib/common/ServeJsonManager.d.ts +0 -12
- package/lib/common/ServeJsonManager.d.ts.map +0 -1
- package/lib/common/TeamsManifestJsonManager.d.ts +0 -51
- package/lib/common/TeamsManifestJsonManager.d.ts.map +0 -1
- package/lib/common/YeomanConfiguration.d.ts +0 -25
- package/lib/common/YeomanConfiguration.d.ts.map +0 -1
- package/lib/common/spsay.d.ts +0 -2
- package/lib/common/spsay.d.ts.map +0 -1
- package/lib/common/utilities.d.ts +0 -9
- package/lib/common/utilities.d.ts.map +0 -1
- package/lib/generators/adaptiveCardExtension/BaseAdaptiveCardExtensionGenerator.d.ts +0 -18
- package/lib/generators/adaptiveCardExtension/BaseAdaptiveCardExtensionGenerator.d.ts.map +0 -1
- package/lib/generators/adaptiveCardExtension/index.d.ts +0 -23
- package/lib/generators/adaptiveCardExtension/index.d.ts.map +0 -1
- package/lib/generators/app/index.d.ts +0 -10
- package/lib/generators/app/index.d.ts.map +0 -1
- package/lib/generators/applicationCustomizer/index.d.ts +0 -24
- package/lib/generators/applicationCustomizer/index.d.ts.map +0 -1
- package/lib/generators/commandSet/index.d.ts +0 -23
- package/lib/generators/commandSet/index.d.ts.map +0 -1
- package/lib/generators/component/BaseComponentGenerator.d.ts +0 -56
- package/lib/generators/component/BaseComponentGenerator.d.ts.map +0 -1
- package/lib/generators/component/index.d.ts +0 -23
- package/lib/generators/component/index.d.ts.map +0 -1
- package/lib/generators/dataVisualizationAdaptiveCardExtension/index.d.ts +0 -19
- package/lib/generators/dataVisualizationAdaptiveCardExtension/index.d.ts.map +0 -1
- package/lib/generators/extension/BaseExtensionGenerator.d.ts +0 -19
- package/lib/generators/extension/BaseExtensionGenerator.d.ts.map +0 -1
- package/lib/generators/extension/index.d.ts +0 -26
- package/lib/generators/extension/index.d.ts.map +0 -1
- package/lib/generators/fieldCustomizer/index.d.ts +0 -24
- package/lib/generators/fieldCustomizer/index.d.ts.map +0 -1
- package/lib/generators/formCustomizer/index.d.ts +0 -24
- package/lib/generators/formCustomizer/index.d.ts.map +0 -1
- package/lib/generators/genericAdaptiveCardExtension/index.d.ts +0 -21
- package/lib/generators/genericAdaptiveCardExtension/index.d.ts.map +0 -1
- package/lib/generators/library/index.d.ts +0 -23
- package/lib/generators/library/index.d.ts.map +0 -1
- package/lib/generators/searchAdaptiveCardExtension/index.d.ts +0 -19
- package/lib/generators/searchAdaptiveCardExtension/index.d.ts.map +0 -1
- package/lib/generators/searchQueryModifier/index.d.ts +0 -23
- package/lib/generators/searchQueryModifier/index.d.ts.map +0 -1
- package/lib/generators/solution/index.d.ts +0 -19
- package/lib/generators/solution/index.d.ts.map +0 -1
- package/lib/generators/webpart/index.d.ts +0 -23
- package/lib/generators/webpart/index.d.ts.map +0 -1
|
@@ -1,68 +1,106 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
const
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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
|
-
|
|
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(
|
|
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 = !
|
|
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
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
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
|
-
|
|
165
|
-
}
|
|
197
|
+
/* no-op */ }
|
|
166
198
|
writing() {
|
|
167
|
-
|
|
168
|
-
}
|
|
199
|
+
/* no-op */ }
|
|
169
200
|
install() {
|
|
170
|
-
|
|
171
|
-
}
|
|
201
|
+
/* no-op */ }
|
|
172
202
|
end() {
|
|
173
|
-
const libraryName =
|
|
174
|
-
const useHeft =
|
|
175
|
-
this.log((0,
|
|
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(
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 ' +
|
|
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 =
|
|
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 =
|
|
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
|
-
|
|
262
|
+
|
|
263
|
+
//#sourceMappingUrl=./index.js.map
|
|
@@ -1,44 +1,90 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
-
|
|
80
|
+
_utilities.compose(_path.basename(__dirname), base, options);
|
|
32
81
|
}
|
|
33
|
-
exports.composeWith = composeWith;
|
|
34
82
|
function defineOptions(generator) {
|
|
35
|
-
|
|
83
|
+
_BaseExtensionGenerator.defineOptions(generator, 'Application Customizer');
|
|
36
84
|
}
|
|
37
|
-
|
|
38
|
-
class ApplicationCustomizerGenerator extends BaseExtension.BaseExtensionGenerator {
|
|
85
|
+
class ApplicationCustomizerGenerator extends _BaseExtensionGenerator.BaseExtensionGenerator {
|
|
39
86
|
initializing() {
|
|
40
|
-
|
|
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
|
|
90
|
-
|
|
91
|
-
|
|
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
|
-
|
|
143
|
+
|
|
144
|
+
//#sourceMappingUrl=./index.js.map
|