@microsoft/generator-sharepoint 1.14.0 → 1.15.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/common/BaseGenerator.d.ts +5 -7
- package/lib/common/BaseGenerator.d.ts.map +1 -1
- package/lib/common/BaseGenerator.js +38 -57
- package/lib/common/JsonManager.d.ts +1 -1
- package/lib/common/JsonManager.d.ts.map +1 -1
- package/lib/common/JsonManager.js +6 -2
- package/lib/common/ServeJsonManager.js +6 -2
- package/lib/common/YeomanConfiguration.d.ts +2 -0
- package/lib/common/YeomanConfiguration.d.ts.map +1 -1
- package/lib/common/YeomanConfiguration.js +8 -1
- package/lib/common/dependencies.json +228 -0
- package/lib/common/spsay.d.ts +1 -1
- package/lib/common/spsay.d.ts.map +1 -1
- package/lib/common/spsay.js +9 -9
- package/lib/common/utilities.d.ts.map +1 -1
- package/lib/common/utilities.js +21 -16
- package/lib/generators/adaptiveCardExtension/index.d.ts.map +1 -1
- package/lib/generators/adaptiveCardExtension/index.js +19 -16
- package/lib/generators/adaptiveCardExtension/templates/manifestTemplate/baseTemplate/{componentClassName}.manifest.json +3 -3
- package/lib/generators/adaptiveCardExtension/templates/manifestTemplate/imageTemplate/{componentClassName}.manifest.json +1 -2
- package/lib/generators/adaptiveCardExtension/templates/none/quickView/QuickView.ts +1 -1
- package/lib/generators/app/index.d.ts.map +1 -1
- package/lib/generators/app/index.js +13 -3
- package/lib/generators/applicationCustomizer/index.d.ts.map +1 -1
- package/lib/generators/applicationCustomizer/index.js +10 -7
- package/lib/generators/applicationCustomizer/templates/none/{componentClassName}.ts +3 -1
- package/lib/generators/commandSet/index.d.ts.map +1 -1
- package/lib/generators/commandSet/index.js +10 -7
- package/lib/generators/commandSet/templates/none/{componentClassName}.ts +27 -13
- package/lib/generators/component/BaseComponentGenerator.d.ts +3 -0
- package/lib/generators/component/BaseComponentGenerator.d.ts.map +1 -1
- package/lib/generators/component/BaseComponentGenerator.js +94 -76
- package/lib/generators/component/index.d.ts.map +1 -1
- package/lib/generators/component/index.js +20 -25
- package/lib/generators/component/templates/eslint/default.eslintrc.js +5 -0
- package/lib/generators/component/templates/eslint/react.eslintrc.js +5 -0
- package/lib/generators/extension/BaseExtensionGenerator.d.ts +2 -2
- package/lib/generators/extension/BaseExtensionGenerator.d.ts.map +1 -1
- package/lib/generators/extension/BaseExtensionGenerator.js +14 -8
- package/lib/generators/extension/index.d.ts +2 -1
- package/lib/generators/extension/index.d.ts.map +1 -1
- package/lib/generators/extension/index.js +24 -15
- package/lib/generators/fieldCustomizer/index.d.ts.map +1 -1
- package/lib/generators/fieldCustomizer/index.js +10 -7
- package/lib/generators/fieldCustomizer/templates/minimal/{componentClassName}.module.scss +1 -1
- package/lib/generators/fieldCustomizer/templates/minimal/{componentClassName}.ts +1 -1
- package/lib/generators/fieldCustomizer/templates/none/{componentClassName}.module.scss +1 -1
- package/lib/generators/fieldCustomizer/templates/none/{componentClassName}.ts +1 -1
- package/lib/generators/fieldCustomizer/templates/react/components/{componentName}.module.scss +1 -1
- package/lib/generators/fieldCustomizer/templates/react/components/{componentName}.tsx +1 -1
- package/lib/generators/formCustomizer/index.d.ts +24 -0
- package/lib/generators/formCustomizer/index.d.ts.map +1 -0
- package/lib/generators/formCustomizer/index.js +142 -0
- package/lib/generators/formCustomizer/templates/base/{componentClassName}.manifest.json +17 -0
- package/lib/generators/formCustomizer/templates/loc/en-us.js +7 -0
- package/lib/generators/formCustomizer/templates/loc/myStrings.d.ts +10 -0
- package/lib/generators/formCustomizer/templates/none/{componentClassName}.module.scss +5 -0
- package/lib/generators/formCustomizer/templates/none/{componentClassName}.ts +53 -0
- package/lib/generators/formCustomizer/templates/react/components/{componentName}.module.scss +5 -0
- package/lib/generators/formCustomizer/templates/react/components/{componentName}.tsx +28 -0
- package/lib/generators/formCustomizer/templates/react/{componentClassName}.ts +64 -0
- package/lib/generators/library/index.d.ts.map +1 -1
- package/lib/generators/library/index.js +10 -7
- package/lib/generators/searchQueryModifier/index.d.ts.map +1 -1
- package/lib/generators/searchQueryModifier/index.js +10 -7
- package/lib/generators/solution/heft.package.json +14 -0
- package/lib/generators/solution/index.d.ts +1 -0
- package/lib/generators/solution/index.d.ts.map +1 -1
- package/lib/generators/solution/index.js +102 -68
- package/lib/generators/solution/{initial.package.json → non-heft.package.json} +0 -0
- package/lib/generators/solution/templates/base/README.md +10 -10
- package/lib/generators/solution/templates/base/_gitignore +1 -0
- package/lib/generators/solution/templates/{base → gulp}/.vscode/launch.json +0 -0
- package/lib/generators/solution/templates/{base → gulp}/_npmignore +0 -0
- package/lib/generators/solution/templates/{base → gulp}/gulpfile.js +0 -0
- package/lib/generators/solution/templates/{base → gulp}/src/index.ts +0 -0
- package/lib/generators/solution/templates/heft/_npmignore +16 -0
- package/lib/generators/solution/templates/heft/config/rig.json +7 -0
- package/lib/generators/solution/templates/heft/config/typescript.json +21 -0
- package/lib/generators/solution/templates/heft/tsconfig.json +6 -0
- package/lib/generators/solution/templates/spo/tsconfig.json +1 -1
- package/lib/generators/webpart/index.d.ts.map +1 -1
- package/lib/generators/webpart/index.js +10 -7
- package/lib/generators/webpart/initial.teamsManifest.json +6 -0
- package/lib/generators/webpart/templates/minimal/{componentClassName}.ts +3 -4
- package/lib/generators/webpart/templates/none/{componentClassName}.ts +14 -9
- package/lib/generators/webpart/templates/react/components/{componentName}.tsx +8 -8
- package/lib/generators/webpart/templates/react/{componentClassName}.ts +12 -9
- package/package.json +5 -5
- package/lib/common/dependency/adaptiveCardExtension/firstParty.json +0 -13
- package/lib/common/dependency/adaptiveCardExtension/firstPartyPlusBeta.json +0 -13
- package/lib/common/dependency/applicationCustomizer.json +0 -6
- package/lib/common/dependency/applicationCustomizerPlusBeta.json +0 -6
- package/lib/common/dependency/commandSet.json +0 -6
- package/lib/common/dependency/commandSetPlusBeta.json +0 -6
- package/lib/common/dependency/extension/firstParty.json +0 -12
- package/lib/common/dependency/extension/firstPartyPlusBeta.json +0 -12
- package/lib/common/dependency/fieldCustomizer.json +0 -5
- package/lib/common/dependency/fieldCustomizerPlusBeta.json +0 -5
- package/lib/common/dependency/library/firstParty.json +0 -9
- package/lib/common/dependency/library/firstPartyPlusBeta.json +0 -9
- package/lib/common/dependency/react.json +0 -11
- package/lib/common/dependency/searchQueryModifier.json +0 -5
- package/lib/common/dependency/searchQueryModifierPlusBeta.json +0 -5
- package/lib/common/dependency/thirdParty.json +0 -8
- package/lib/common/dependency/webpart/firstParty.json +0 -15
- package/lib/common/dependency/webpart/firstPartyPlusBeta.json +0 -15
- package/lib/generators/solution/templates/base/tslint.json +0 -29
|
@@ -6,7 +6,7 @@ import { ConfigJsonManager } from './ConfigJsonManager';
|
|
|
6
6
|
import { ServeJsonManager } from './ServeJsonManager';
|
|
7
7
|
import { PackageSolutionJsonManager } from './PackageSolutionJsonManager';
|
|
8
8
|
export declare type AvailableTemplates = 'react' | 'none' | 'minimal';
|
|
9
|
-
export declare type DependencyGroups =
|
|
9
|
+
export declare type DependencyGroups = keyof typeof import('./dependencies.json');
|
|
10
10
|
export interface IBaseOptions {
|
|
11
11
|
'skip-install': boolean;
|
|
12
12
|
plusbeta: boolean;
|
|
@@ -21,11 +21,11 @@ export declare abstract class BaseGenerator<IOptions extends IBaseOptions, ICont
|
|
|
21
21
|
context: IContext;
|
|
22
22
|
protected abstract friendlyName: string;
|
|
23
23
|
protected allowEmptyPackageJson: boolean;
|
|
24
|
+
private _dependenciesByDependencyGroup;
|
|
24
25
|
protected get packageJsonManager(): PackageJsonManager;
|
|
25
26
|
protected get configJson(): ConfigJsonManager;
|
|
26
27
|
protected get serveJson(): ServeJsonManager;
|
|
27
28
|
protected get packageSolutionJson(): PackageSolutionJsonManager;
|
|
28
|
-
private _dependencyGroupMap;
|
|
29
29
|
private static _checkForUpdates;
|
|
30
30
|
/**
|
|
31
31
|
* Lifecycle events, these are called in a specific order by the Yeoman
|
|
@@ -49,12 +49,10 @@ export declare abstract class BaseGenerator<IOptions extends IBaseOptions, ICont
|
|
|
49
49
|
protected tryInstall(): boolean;
|
|
50
50
|
protected ensureCorrectFolder(): void;
|
|
51
51
|
protected ensureDependencyGroup(group: DependencyGroups): void;
|
|
52
|
-
|
|
52
|
+
protected nameIsDependencyGroup(name: string): name is DependencyGroups;
|
|
53
|
+
private _ensureDependenciesByDependencyGroup;
|
|
54
|
+
private _addResolutionsIfApplicable;
|
|
53
55
|
private _doPnpmInstall;
|
|
54
|
-
private _getDependencies;
|
|
55
|
-
private _getDevDependencies;
|
|
56
|
-
private get _dependencyGroups();
|
|
57
56
|
private _untokenizedCopier;
|
|
58
|
-
private _getDependencyFileName;
|
|
59
57
|
}
|
|
60
58
|
//# sourceMappingURL=BaseGenerator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseGenerator.d.ts","sourceRoot":"","sources":["../../src/common/BaseGenerator.ts"],"names":[],"mappings":"AAGA,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"BaseGenerator.d.ts","sourceRoot":"","sources":["../../src/common/BaseGenerator.ts"],"names":[],"mappings":"AAGA,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,YAAY,EAAY,MAAM,8BAA8B,CAAC;AAGtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAG1E,oBAAY,kBAAkB,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;AAE9D,oBAAY,gBAAgB,GAAG,MAAM,cAAc,qBAAqB,CAAC,CAAC;AAC1E,MAAM,WAAW,YAAY;IAC3B,cAAc,EAAE,OAAO,CAAC;IACxB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAOD,8BAAsB,aAAa,CAAC,QAAQ,SAAS,YAAY,EAAE,QAAQ,CAAE,SAAQ,MAAM,CAAC,QAAQ,CAAC;IACnG,SAAS,CAAC,MAAM,CAAC,oBAAoB,EAAE,YAAY,CAAoD;IACvG,OAAO,CAAC,MAAM,CAAC,qBAAqB,CAAkB;IAEtD;;OAEG;IACI,OAAO,EAAE,QAAQ,CAAC;IAEzB,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IACxC,SAAS,CAAC,qBAAqB,EAAE,OAAO,CAAS;IAEjD,OAAO,CAAC,8BAA8B,CAAqD;IAE3F,SAAS,KAAK,kBAAkB,IAAI,kBAAkB,CAQrD;IAED,SAAS,KAAK,UAAU,IAAI,iBAAiB,CAK5C;IAED,SAAS,KAAK,SAAS,IAAI,gBAAgB,CAK1C;IAED,SAAS,KAAK,mBAAmB,IAAI,0BAA0B,CAK9D;IAED,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAa/B;;;;OAIG;IAEH,yFAAyF;aACzE,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI;IAEpD,0EAA0E;aAC1D,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI;IAEjD,gFAAgF;aAChE,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI;IAE5C,YAAY,EAAE,MAAM,CAAC,MAAM,CAAC,CAEjC;IAEF,8EAA8E;IACvE,OAAO,CAAC,UAAU,GAAE,OAAc,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI;IAkBhE,8CAA8C;aAC9B,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI;IAE/C,8CAA8C;aAC9B,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI;IAE3C,SAAS,aAAa,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ;IAmChE,SAAS,CAAC,UAAU,IAAI,OAAO;IAQ/B,SAAS,CAAC,mBAAmB,IAAI,IAAI;IAMrC,SAAS,CAAC,qBAAqB,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI;IAiB9D,SAAS,CAAC,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,gBAAgB;IAMvE,OAAO,CAAC,oCAAoC;IAsB5C,OAAO,CAAC,2BAA2B;IAWnC,OAAO,CAAC,cAAc;IAiCtB,OAAO,CAAC,kBAAkB;CAS3B"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
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]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -14,7 +18,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
14
18
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
19
|
if (mod && mod.__esModule) return mod;
|
|
16
20
|
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
22
|
__setModuleDefault(result, mod);
|
|
19
23
|
return result;
|
|
20
24
|
};
|
|
@@ -27,6 +31,7 @@ const colors_1 = __importDefault(require("colors"));
|
|
|
27
31
|
const path = __importStar(require("path"));
|
|
28
32
|
const UpdateNotifier = __importStar(require("update-notifier"));
|
|
29
33
|
const yeoman_generator_1 = __importDefault(require("yeoman-generator"));
|
|
34
|
+
const node_core_library_1 = require("@rushstack/node-core-library");
|
|
30
35
|
const Utils = __importStar(require("./utilities"));
|
|
31
36
|
const PackageJsonManager_1 = require("./PackageJsonManager");
|
|
32
37
|
const ConfigJsonManager_1 = require("./ConfigJsonManager");
|
|
@@ -133,35 +138,40 @@ class BaseGenerator extends yeoman_generator_1.default {
|
|
|
133
138
|
}
|
|
134
139
|
}
|
|
135
140
|
ensureDependencyGroup(group) {
|
|
136
|
-
const
|
|
137
|
-
const
|
|
138
|
-
|
|
139
|
-
this.packageJsonManager.
|
|
140
|
-
}
|
|
141
|
-
if (!this.packageJsonManager.data.devDependencies) {
|
|
142
|
-
this.packageJsonManager.data.devDependencies = {};
|
|
141
|
+
const dependenciesByDependencyGroup = this._ensureDependenciesByDependencyGroup();
|
|
142
|
+
const dependencies = dependenciesByDependencyGroup.get(group);
|
|
143
|
+
for (const [name, version] of Object.entries(dependencies.dependencies)) {
|
|
144
|
+
this.packageJsonManager.addDependency(name, version);
|
|
143
145
|
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
group === 'library' ||
|
|
147
|
-
group === 'adaptiveCardExtension') {
|
|
148
|
-
let fileName = 'firstParty';
|
|
149
|
-
fileName = this._getDependencyFileName(fileName);
|
|
150
|
-
const firstPartyDependencies = require(path.join(__dirname, 'dependency', group, fileName));
|
|
151
|
-
const thirdPartyDependencies = require(path.join(__dirname, 'dependency', 'thirdParty.json'));
|
|
152
|
-
this.packageJsonManager.merge(firstPartyDependencies);
|
|
153
|
-
this.packageJsonManager.merge(thirdPartyDependencies);
|
|
146
|
+
for (const [name, version] of Object.entries(dependencies.devDependencies)) {
|
|
147
|
+
this.packageJsonManager.addDevDependency(name, version);
|
|
154
148
|
}
|
|
155
|
-
Object.keys(dependencyList).forEach((name) => {
|
|
156
|
-
this.packageJsonManager.addDependency(name, dependencyList[name]);
|
|
157
|
-
});
|
|
158
|
-
Object.keys(devDependencyList).forEach((name) => {
|
|
159
|
-
this.packageJsonManager.addDevDependency(name, devDependencyList[name]);
|
|
160
|
-
});
|
|
161
149
|
// if at any point we are adding some react typings, then ensure they are in the resolutions for Yarn
|
|
162
|
-
this.
|
|
150
|
+
this._addResolutionsIfApplicable(['@types/react']);
|
|
151
|
+
}
|
|
152
|
+
nameIsDependencyGroup(name) {
|
|
153
|
+
const dependenciesByDependencyGroup = this._ensureDependenciesByDependencyGroup();
|
|
154
|
+
return dependenciesByDependencyGroup.has(name);
|
|
155
|
+
}
|
|
156
|
+
_ensureDependenciesByDependencyGroup() {
|
|
157
|
+
if (!this._dependenciesByDependencyGroup) {
|
|
158
|
+
const dependenciesFile = node_core_library_1.JsonFile.load(`${__dirname}/dependencies.json`);
|
|
159
|
+
const plusBeta = this.options.plusbeta;
|
|
160
|
+
const dependenciesByDependencyGroup = new Map();
|
|
161
|
+
this._dependenciesByDependencyGroup = dependenciesByDependencyGroup;
|
|
162
|
+
for (const [groupName, groupDependencies] of Object.entries(dependenciesFile)) {
|
|
163
|
+
const dependencyList = {
|
|
164
|
+
devDependencies: {},
|
|
165
|
+
...(plusBeta && groupDependencies.plusBeta
|
|
166
|
+
? groupDependencies.plusBeta
|
|
167
|
+
: groupDependencies.standard)
|
|
168
|
+
};
|
|
169
|
+
dependenciesByDependencyGroup.set(groupName, dependencyList);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
return this._dependenciesByDependencyGroup;
|
|
163
173
|
}
|
|
164
|
-
|
|
174
|
+
_addResolutionsIfApplicable(packages) {
|
|
165
175
|
if (this.packageJsonManager.data.dependencies) {
|
|
166
176
|
for (const packageName of packages) {
|
|
167
177
|
let packageVersion;
|
|
@@ -196,28 +206,6 @@ class BaseGenerator extends yeoman_generator_1.default {
|
|
|
196
206
|
});
|
|
197
207
|
}, { once: installer + ' ' + args.join(' '), run: false });
|
|
198
208
|
}
|
|
199
|
-
_getDependencies(group) {
|
|
200
|
-
return (this._dependencyGroups[group] || {})['dependencies'] || {};
|
|
201
|
-
}
|
|
202
|
-
_getDevDependencies(group) {
|
|
203
|
-
return (this._dependencyGroups[group] || {})['devDependencies'] || {};
|
|
204
|
-
}
|
|
205
|
-
/* tslint:disable-next-line:no-any */
|
|
206
|
-
get _dependencyGroups() {
|
|
207
|
-
if (!this._dependencyGroupMap) {
|
|
208
|
-
this._dependencyGroupMap = {};
|
|
209
|
-
this._dependencyGroupMap['react'] = require(path.join(__dirname, 'dependency', 'react.json'));
|
|
210
|
-
const applicationCustomizerFileName = this._getDependencyFileName('applicationCustomizer');
|
|
211
|
-
const fieldCustomizerFileName = this._getDependencyFileName('fieldCustomizer');
|
|
212
|
-
const commandSetFileName = this._getDependencyFileName('commandSet');
|
|
213
|
-
const searchQueryModifierFileName = this._getDependencyFileName('searchQueryModifier');
|
|
214
|
-
this._dependencyGroupMap['applicationCustomizer'] = require(path.join(__dirname, 'dependency', applicationCustomizerFileName));
|
|
215
|
-
this._dependencyGroupMap['fieldCustomizer'] = require(path.join(__dirname, 'dependency', fieldCustomizerFileName));
|
|
216
|
-
this._dependencyGroupMap['commandSet'] = require(path.join(__dirname, 'dependency', commandSetFileName));
|
|
217
|
-
this._dependencyGroupMap['searchQueryModifier'] = require(path.join(__dirname, 'dependency', searchQueryModifierFileName));
|
|
218
|
-
}
|
|
219
|
-
return this._dependencyGroupMap;
|
|
220
|
-
}
|
|
221
209
|
_untokenizedCopier(directory, destination) {
|
|
222
210
|
return (filename) => {
|
|
223
211
|
const sourceFile = path.join(directory, filename);
|
|
@@ -225,15 +213,8 @@ class BaseGenerator extends yeoman_generator_1.default {
|
|
|
225
213
|
this.fs.copyTpl(sourceFile, destinationFile, this.context);
|
|
226
214
|
};
|
|
227
215
|
}
|
|
228
|
-
_getDependencyFileName(fileName) {
|
|
229
|
-
if (this.options.plusbeta) {
|
|
230
|
-
fileName += 'PlusBeta';
|
|
231
|
-
}
|
|
232
|
-
fileName += '.json';
|
|
233
|
-
return fileName;
|
|
234
|
-
}
|
|
235
216
|
}
|
|
236
217
|
exports.BaseGenerator = BaseGenerator;
|
|
237
|
-
BaseGenerator.generatorPackageJson =
|
|
218
|
+
BaseGenerator.generatorPackageJson = node_core_library_1.JsonFile.load(`${__dirname}/../../package.json`);
|
|
238
219
|
BaseGenerator._hasCheckedForUpdates = false;
|
|
239
220
|
//# sourceMappingURL=BaseGenerator.js.map
|
|
@@ -4,7 +4,7 @@ export declare abstract class JsonManager<T> {
|
|
|
4
4
|
protected _fs: Editor;
|
|
5
5
|
protected _data: T;
|
|
6
6
|
set(newData: T): T;
|
|
7
|
-
merge(newData: T): T;
|
|
7
|
+
merge(newData: Partial<T>): T;
|
|
8
8
|
get data(): T;
|
|
9
9
|
save(): void;
|
|
10
10
|
protected constructor(_filepath: string, _fs: Editor, _data: T);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JsonManager.d.ts","sourceRoot":"","sources":["../../src/common/JsonManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAGvC,8BAAsB,WAAW,CAAC,CAAC;IAsBX,SAAS,CAAC,SAAS,EAAE,MAAM;IAAE,SAAS,CAAC,GAAG,EAAE,MAAM;IAAE,SAAS,CAAC,KAAK,EAAE,CAAC;IArBrF,GAAG,CAAC,OAAO,EAAE,CAAC,GAAG,CAAC;IAQlB,KAAK,CAAC,OAAO,EAAE,CAAC,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"JsonManager.d.ts","sourceRoot":"","sources":["../../src/common/JsonManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAGvC,8BAAsB,WAAW,CAAC,CAAC;IAsBX,SAAS,CAAC,SAAS,EAAE,MAAM;IAAE,SAAS,CAAC,GAAG,EAAE,MAAM;IAAE,SAAS,CAAC,KAAK,EAAE,CAAC;IArBrF,GAAG,CAAC,OAAO,EAAE,CAAC,GAAG,CAAC;IAQlB,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC;IAKpC,IAAW,IAAI,IAAI,CAAC,CAEnB;IAEM,IAAI,IAAI,IAAI;IAInB,SAAS,aAAuB,SAAS,EAAE,MAAM,EAAY,GAAG,EAAE,MAAM,EAAY,KAAK,EAAE,CAAC;CAC7F"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
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]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -14,7 +18,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
14
18
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
19
|
if (mod && mod.__esModule) return mod;
|
|
16
20
|
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
22
|
__setModuleDefault(result, mod);
|
|
19
23
|
return result;
|
|
20
24
|
};
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
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]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -14,7 +18,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
14
18
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
19
|
if (mod && mod.__esModule) return mod;
|
|
16
20
|
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
22
|
__setModuleDefault(result, mod);
|
|
19
23
|
return result;
|
|
20
24
|
};
|
|
@@ -19,5 +19,7 @@ export declare class YeomanConfiguration {
|
|
|
19
19
|
static set environment(value: 'spo');
|
|
20
20
|
static get packageManager(): 'npm' | 'pnpm' | 'yarn';
|
|
21
21
|
static set packageManager(value: 'npm' | 'pnpm' | 'yarn');
|
|
22
|
+
static get useHeft(): boolean;
|
|
23
|
+
static set useHeft(value: boolean);
|
|
22
24
|
}
|
|
23
25
|
//# sourceMappingURL=YeomanConfiguration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YeomanConfiguration.d.ts","sourceRoot":"","sources":["../../src/common/YeomanConfiguration.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACvC,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,GAAG,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC,CAAC;CAC5B;
|
|
1
|
+
{"version":3,"file":"YeomanConfiguration.d.ts","sourceRoot":"","sources":["../../src/common/YeomanConfiguration.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACvC,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,GAAG,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC,CAAC;CAC5B;AAaD;;;GAGG;AACH,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,MAAM,CAAC,MAAM,CAA2B;WAElC,QAAQ,CAAC,mBAAmB,EAAE,wBAAwB,GAAG,IAAI;IAI3E,WAAkB,WAAW,IAAI,MAAM,CAEtC;IACD,WAAkB,WAAW,CAAC,KAAK,EAAE,MAAM,EAE1C;IAED,WAAkB,OAAO,IAAI,MAAM,CAElC;IACD,WAAkB,OAAO,CAAC,KAAK,EAAE,MAAM,EAEtC;IAED,WAAkB,SAAS,IAAI,MAAM,CAEpC;IACD,WAAkB,SAAS,CAAC,KAAK,EAAE,MAAM,EAExC;IAED,WAAkB,WAAW,IAAI,KAAK,CAErC;IAED,WAAkB,WAAW,CAAC,KAAK,EAAE,KAAK,EAEzC;IAED,WAAkB,cAAc,IAAI,KAAK,GAAG,MAAM,GAAG,MAAM,CAE1D;IAED,WAAkB,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,EAE9D;IAED,WAAkB,OAAO,IAAI,OAAO,CAEnC;IAED,WAAkB,OAAO,CAAC,KAAK,EAAE,OAAO,EAEvC;CACF"}
|
|
@@ -8,7 +8,8 @@ const _strings = {
|
|
|
8
8
|
version: 'version',
|
|
9
9
|
libraryId: 'libraryId',
|
|
10
10
|
environment: 'environment',
|
|
11
|
-
packageManager: 'packageManager'
|
|
11
|
+
packageManager: 'packageManager',
|
|
12
|
+
useHeft: 'useHeft'
|
|
12
13
|
};
|
|
13
14
|
/**
|
|
14
15
|
* This class wraps an untyped property bag with types for
|
|
@@ -48,6 +49,12 @@ class YeomanConfiguration {
|
|
|
48
49
|
static set packageManager(value) {
|
|
49
50
|
YeomanConfiguration._store.set(_strings.packageManager, value);
|
|
50
51
|
}
|
|
52
|
+
static get useHeft() {
|
|
53
|
+
return YeomanConfiguration._store.get(_strings.useHeft);
|
|
54
|
+
}
|
|
55
|
+
static set useHeft(value) {
|
|
56
|
+
YeomanConfiguration._store.set(_strings.useHeft, value);
|
|
57
|
+
}
|
|
51
58
|
}
|
|
52
59
|
exports.YeomanConfiguration = YeomanConfiguration;
|
|
53
60
|
//# sourceMappingURL=YeomanConfiguration.js.map
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
{
|
|
2
|
+
"adaptiveCardExtension": {
|
|
3
|
+
"standard": {
|
|
4
|
+
"dependencies": {
|
|
5
|
+
"@microsoft/sp-core-library": "1.15.0-rc.0",
|
|
6
|
+
"@microsoft/sp-property-pane": "1.15.0-rc.0",
|
|
7
|
+
"@microsoft/sp-adaptive-card-extension-base": "1.15.0-rc.0"
|
|
8
|
+
},
|
|
9
|
+
"devDependencies": {
|
|
10
|
+
"@microsoft/sp-module-interfaces": "1.15.0-rc.0"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"plusBeta": {
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@microsoft/sp-core-library": "1.15.0-rc.0",
|
|
16
|
+
"@microsoft/sp-property-pane": "1.15.0-rc.0",
|
|
17
|
+
"@microsoft/sp-adaptive-card-extension-base": "1.15.0-rc.0"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@microsoft/sp-module-interfaces": "1.15.0-rc.0"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"applicationCustomizer": {
|
|
25
|
+
"standard": {
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@microsoft/sp-dialog": "1.15.0-rc.0",
|
|
28
|
+
"@microsoft/sp-application-base": "1.15.0-rc.0"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"plusBeta": null
|
|
32
|
+
},
|
|
33
|
+
"applicationCustomizerPlusBeta": {
|
|
34
|
+
"standard": {
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@microsoft/sp-dialog": "1.15.0-rc.0",
|
|
37
|
+
"@microsoft/sp-application-base": "1.15.0-rc.0"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"plusBeta": null
|
|
41
|
+
},
|
|
42
|
+
"commandSet": {
|
|
43
|
+
"standard": {
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"@microsoft/sp-listview-extensibility": "1.15.0-rc.0",
|
|
46
|
+
"@microsoft/sp-dialog": "1.15.0-rc.0"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"plusBeta": null
|
|
50
|
+
},
|
|
51
|
+
"commandSetPlusBeta": {
|
|
52
|
+
"standard": {
|
|
53
|
+
"dependencies": {
|
|
54
|
+
"@microsoft/sp-listview-extensibility": "1.15.0-rc.0",
|
|
55
|
+
"@microsoft/sp-dialog": "1.15.0-rc.0"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"plusBeta": null
|
|
59
|
+
},
|
|
60
|
+
"extension": {
|
|
61
|
+
"standard": {
|
|
62
|
+
"dependencies": {
|
|
63
|
+
"@microsoft/sp-core-library": "1.15.0-rc.0",
|
|
64
|
+
"@microsoft/decorators": "1.15.0-rc.0"
|
|
65
|
+
},
|
|
66
|
+
"devDependencies": {
|
|
67
|
+
"@microsoft/sp-module-interfaces": "1.15.0-rc.0"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"plusBeta": {
|
|
71
|
+
"dependencies": {
|
|
72
|
+
"@microsoft/sp-core-library": "1.15.0-rc.0",
|
|
73
|
+
"@microsoft/decorators": "1.15.0-rc.0"
|
|
74
|
+
},
|
|
75
|
+
"devDependencies": {
|
|
76
|
+
"@microsoft/sp-module-interfaces": "1.15.0-rc.0"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"fieldCustomizer": {
|
|
81
|
+
"standard": {
|
|
82
|
+
"dependencies": {
|
|
83
|
+
"@microsoft/sp-listview-extensibility": "1.15.0-rc.0"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"plusBeta": null
|
|
87
|
+
},
|
|
88
|
+
"fieldCustomizerPlusBeta": {
|
|
89
|
+
"standard": {
|
|
90
|
+
"dependencies": {
|
|
91
|
+
"@microsoft/sp-listview-extensibility": "1.15.0-rc.0"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"plusBeta": null
|
|
95
|
+
},
|
|
96
|
+
"library": {
|
|
97
|
+
"standard": {
|
|
98
|
+
"dependencies": {},
|
|
99
|
+
"devDependencies": {
|
|
100
|
+
"@microsoft/sp-module-interfaces": "1.15.0-rc.0"
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"plusBeta": {
|
|
104
|
+
"dependencies": {},
|
|
105
|
+
"devDependencies": {
|
|
106
|
+
"@microsoft/sp-module-interfaces": "1.15.0-rc.0"
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"react": {
|
|
111
|
+
"standard": {
|
|
112
|
+
"dependencies": {
|
|
113
|
+
"react": "16.13.1",
|
|
114
|
+
"react-dom": "16.13.1",
|
|
115
|
+
"office-ui-fabric-react": "7.183.1"
|
|
116
|
+
},
|
|
117
|
+
"devDependencies": {
|
|
118
|
+
"@types/react": "16.9.51",
|
|
119
|
+
"@types/react-dom": "16.9.8",
|
|
120
|
+
"eslint-plugin-react-hooks": "4.3.0"
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"plusBeta": null
|
|
124
|
+
},
|
|
125
|
+
"searchQueryModifier": {
|
|
126
|
+
"standard": {
|
|
127
|
+
"dependencies": {
|
|
128
|
+
"@microsoft/sp-search-extensibility": "1.15.0-rc.0"
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
"plusBeta": null
|
|
132
|
+
},
|
|
133
|
+
"searchQueryModifierPlusBeta": {
|
|
134
|
+
"standard": {
|
|
135
|
+
"dependencies": {
|
|
136
|
+
"@microsoft/sp-search-extensibility": "1.15.0-rc.0"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"plusBeta": null
|
|
140
|
+
},
|
|
141
|
+
"webpart": {
|
|
142
|
+
"standard": {
|
|
143
|
+
"dependencies": {
|
|
144
|
+
"@microsoft/sp-core-library": "1.15.0-rc.0",
|
|
145
|
+
"@microsoft/sp-property-pane": "1.15.0-rc.0",
|
|
146
|
+
"@microsoft/sp-webpart-base": "1.15.0-rc.0",
|
|
147
|
+
"@microsoft/sp-lodash-subset": "1.15.0-rc.0",
|
|
148
|
+
"@microsoft/sp-office-ui-fabric-core": "1.15.0-rc.0"
|
|
149
|
+
},
|
|
150
|
+
"devDependencies": {
|
|
151
|
+
"@microsoft/sp-module-interfaces": "1.15.0-rc.0"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"plusBeta": {
|
|
155
|
+
"dependencies": {
|
|
156
|
+
"@microsoft/sp-core-library": "1.15.0-rc.0",
|
|
157
|
+
"@microsoft/sp-property-pane": "1.15.0-rc.0",
|
|
158
|
+
"@microsoft/sp-webpart-base": "1.15.0-rc.0",
|
|
159
|
+
"@microsoft/sp-lodash-subset": "1.15.0-rc.0",
|
|
160
|
+
"@microsoft/sp-office-ui-fabric-core": "1.15.0-rc.0"
|
|
161
|
+
},
|
|
162
|
+
"devDependencies": {
|
|
163
|
+
"@microsoft/sp-module-interfaces": "1.15.0-rc.0"
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"useHeft": {
|
|
168
|
+
"standard": {
|
|
169
|
+
"dependencies": {
|
|
170
|
+
"tslib": "2.3.1"
|
|
171
|
+
},
|
|
172
|
+
"devDependencies": {
|
|
173
|
+
"@microsoft/rush-stack-compiler-4.5": "0.2.0",
|
|
174
|
+
"@rushstack/eslint-config": "2.5.1",
|
|
175
|
+
"@microsoft/eslint-plugin-spfx": "1.15.0-rc.0",
|
|
176
|
+
"@microsoft/eslint-config-spfx": "1.15.0-rc.0",
|
|
177
|
+
"@microsoft/spfx-web-build-rig": "1.15.0-rc.0",
|
|
178
|
+
"@rushstack/heft": "0.45.2",
|
|
179
|
+
"@types/webpack-env": "~1.15.2",
|
|
180
|
+
"eslint": "8.7.0"
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"plusBeta": null
|
|
184
|
+
},
|
|
185
|
+
"useGulp": {
|
|
186
|
+
"standard": {
|
|
187
|
+
"dependencies": {
|
|
188
|
+
"tslib": "2.3.1"
|
|
189
|
+
},
|
|
190
|
+
"devDependencies": {
|
|
191
|
+
"@microsoft/rush-stack-compiler-4.5": "0.2.0",
|
|
192
|
+
"@rushstack/eslint-config": "2.5.1",
|
|
193
|
+
"@microsoft/eslint-plugin-spfx": "1.15.0-rc.0",
|
|
194
|
+
"@microsoft/eslint-config-spfx": "1.15.0-rc.0",
|
|
195
|
+
"@microsoft/sp-build-web": "1.15.0-rc.0",
|
|
196
|
+
"@types/webpack-env": "~1.15.2",
|
|
197
|
+
"eslint": "8.7.0",
|
|
198
|
+
"ajv": "^6.12.5",
|
|
199
|
+
"gulp": "4.0.2"
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
"plusBeta": null
|
|
203
|
+
},
|
|
204
|
+
"formCustomizer": {
|
|
205
|
+
"standard": {
|
|
206
|
+
"dependencies": {
|
|
207
|
+
"@microsoft/sp-core-library": "1.15.0-rc.0",
|
|
208
|
+
"@microsoft/sp-listview-extensibility": "1.15.0-rc.0",
|
|
209
|
+
"@microsoft/sp-lodash-subset": "1.15.0-rc.0",
|
|
210
|
+
"@microsoft/sp-office-ui-fabric-core": "1.15.0-rc.0"
|
|
211
|
+
},
|
|
212
|
+
"devDependencies": {
|
|
213
|
+
"@microsoft/sp-module-interfaces": "1.15.0-rc.0"
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
"plusBeta": {
|
|
217
|
+
"dependencies": {
|
|
218
|
+
"@microsoft/sp-core-library": "1.15.0-rc.0",
|
|
219
|
+
"@microsoft/sp-listview-extensibility": "1.15.0-rc.0",
|
|
220
|
+
"@microsoft/sp-lodash-subset": "1.15.0-rc.0",
|
|
221
|
+
"@microsoft/sp-office-ui-fabric-core": "1.15.0-rc.0"
|
|
222
|
+
},
|
|
223
|
+
"devDependencies": {
|
|
224
|
+
"@microsoft/sp-module-interfaces": "1.15.0-rc.0"
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
package/lib/common/spsay.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export default function spsay(solutionName: string): string;
|
|
1
|
+
export default function spsay(solutionName: string, useHeft: boolean): string;
|
|
2
2
|
//# sourceMappingURL=spsay.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spsay.d.ts","sourceRoot":"","sources":["../../src/common/spsay.ts"],"names":[],"mappings":"AAuDA,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"spsay.d.ts","sourceRoot":"","sources":["../../src/common/spsay.ts"],"names":[],"mappings":"AAuDA,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,MAAM,CAK5E"}
|
package/lib/common/spsay.js
CHANGED
|
@@ -22,16 +22,16 @@ function times(n, character) {
|
|
|
22
22
|
function space(n) {
|
|
23
23
|
return times(n, ' ');
|
|
24
24
|
}
|
|
25
|
-
function getWords(solutionName) {
|
|
25
|
+
function getWords(solutionName, useHeft) {
|
|
26
26
|
const words = [
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
`Congratulations!`,
|
|
28
|
+
`Solution ${solutionName} is created.`,
|
|
29
|
+
`Run ${useHeft ? 'npm run start' : 'gulp serve'} to play with it!`
|
|
30
30
|
];
|
|
31
31
|
const colorWords = [
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
`Congratulations!`,
|
|
33
|
+
`Solution ${colors_1.default.cyan(solutionName)} is created.`,
|
|
34
|
+
`Run ${colors_1.default.yellow(useHeft ? 'npm run start' : 'gulp serve')} to play with it!`
|
|
35
35
|
];
|
|
36
36
|
const maxLength = Math.max.apply(undefined, words.map((word) => word.length));
|
|
37
37
|
const formatted = colorWords.map((word, index) => {
|
|
@@ -46,9 +46,9 @@ function getWords(solutionName) {
|
|
|
46
46
|
.concat(["'" + times(maxLength + 4, '-') + "'"]);
|
|
47
47
|
return wrapped;
|
|
48
48
|
}
|
|
49
|
-
function spsay(solutionName) {
|
|
49
|
+
function spsay(solutionName, useHeft) {
|
|
50
50
|
const colorLogo = logo.map((line) => colors_1.default.cyan(line));
|
|
51
|
-
const words = getWords(solutionName);
|
|
51
|
+
const words = getWords(solutionName, useHeft);
|
|
52
52
|
const lines = lodash.zip(colorLogo, words).map((parts) => parts.join(''));
|
|
53
53
|
return '\n' + lines.join('\n') + '\n';
|
|
54
54
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utilities.d.ts","sourceRoot":"","sources":["../../src/common/utilities.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utilities.d.ts","sourceRoot":"","sources":["../../src/common/utilities.ts"],"names":[],"mappings":"AAMA,OAAO,MAAM,GAAG,QAAQ,kBAAkB,CAAC,CAAC;AAE5C,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE9D,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAG7C;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAgB7D;AAED,wBAAgB,OAAO,CAAC,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAuBnD;AAED,wBAAsB,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAyBlG;AAED,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAGD,wBAAgB,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,OAAO,EAAE,YAAY,GAAG,IAAI,CAQrG"}
|
package/lib/common/utilities.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
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]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -14,7 +18,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
14
18
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
19
|
if (mod && mod.__esModule) return mod;
|
|
16
20
|
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
22
|
__setModuleDefault(result, mod);
|
|
19
23
|
return result;
|
|
20
24
|
};
|
|
@@ -26,6 +30,7 @@ exports.compose = exports.generateGuid = exports.checkSolutionFolder = exports.f
|
|
|
26
30
|
const colors_1 = __importDefault(require("colors"));
|
|
27
31
|
const fs = __importStar(require("fs"));
|
|
28
32
|
const lodash = __importStar(require("lodash"));
|
|
33
|
+
const node_core_library_1 = require("@rushstack/node-core-library");
|
|
29
34
|
const path = __importStar(require("path"));
|
|
30
35
|
const uuid = __importStar(require("uuid"));
|
|
31
36
|
function titleCase(str) {
|
|
@@ -68,29 +73,26 @@ function filesIn(...args) {
|
|
|
68
73
|
return files;
|
|
69
74
|
}
|
|
70
75
|
exports.filesIn = filesIn;
|
|
71
|
-
function checkSolutionFolder(generator, solutionName) {
|
|
76
|
+
async function checkSolutionFolder(generator, solutionName) {
|
|
72
77
|
if (!solutionName) {
|
|
73
78
|
generator.log(colors_1.default.red('!!! Warning !!!'));
|
|
74
|
-
|
|
75
|
-
.prompt([
|
|
79
|
+
const answers = await generator.prompt([
|
|
76
80
|
{
|
|
77
81
|
type: 'confirm',
|
|
78
82
|
name: 'continue',
|
|
79
83
|
default: undefined,
|
|
80
84
|
message: 'You are not running under solution folder. Continue?'
|
|
81
85
|
}
|
|
82
|
-
])
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}
|
|
90
|
-
});
|
|
86
|
+
]);
|
|
87
|
+
if (answers.continue) {
|
|
88
|
+
return solutionName; // resolve with the solution name
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
throw generator.log(colors_1.default.red('Bye!'));
|
|
92
|
+
}
|
|
91
93
|
}
|
|
92
94
|
else {
|
|
93
|
-
return
|
|
95
|
+
return solutionName;
|
|
94
96
|
}
|
|
95
97
|
}
|
|
96
98
|
exports.checkSolutionFolder = checkSolutionFolder;
|
|
@@ -100,7 +102,10 @@ function generateGuid() {
|
|
|
100
102
|
exports.generateGuid = generateGuid;
|
|
101
103
|
// tslint:disable-next-line
|
|
102
104
|
function compose(generator, base, options) {
|
|
103
|
-
base.composeWith(
|
|
105
|
+
base.composeWith(node_core_library_1.Import.resolveModule({
|
|
106
|
+
baseFolderPath: __dirname,
|
|
107
|
+
modulePath: `@microsoft/generator-sharepoint/lib/generators/${generator}`
|
|
108
|
+
}), options);
|
|
104
109
|
}
|
|
105
110
|
exports.compose = compose;
|
|
106
111
|
//# sourceMappingURL=utilities.js.map
|