@pnp/cli-microsoft365 4.2.0-beta.bf7382d → 4.3.0-beta.0aaa522
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/.devcontainer/Dockerfile +2 -2
- package/.eslintrc.js +1 -0
- package/README.md +1 -1
- package/dist/appInsights.js +5 -2
- package/dist/cli/Cli.js +26 -4
- package/dist/m365/aad/commands/app/app-add.js +58 -5
- package/dist/m365/aad/commands/app/app-get.js +97 -0
- package/dist/m365/aad/commands/o365group/o365group-add.js +56 -50
- package/dist/m365/aad/commands/oauth2grant/oauth2grant-add.js +5 -8
- package/dist/m365/aad/commands/oauth2grant/oauth2grant-remove.js +6 -3
- package/dist/m365/aad/commands/oauth2grant/oauth2grant-set.js +3 -3
- package/dist/m365/aad/commands/sp/sp-add.js +107 -0
- package/dist/m365/aad/commands/user/user-password-validate.js +42 -0
- package/dist/m365/aad/commands.js +3 -0
- package/dist/m365/app/commands/permission/permission-list.js +266 -0
- package/dist/m365/app/commands.js +7 -0
- package/dist/m365/base/AppCommand.js +76 -0
- package/dist/m365/base/M365RcJson.js +3 -0
- package/dist/m365/cli/commands/cli-doctor.js +2 -0
- package/dist/m365/file/commands/file-add.js +32 -13
- package/dist/m365/file/commands/file-list.js +181 -0
- package/dist/m365/file/commands.js +2 -1
- package/dist/m365/pa/commands/app/app-list.js +28 -1
- package/dist/m365/search/commands/externalconnection/externalconnection-add.js +99 -0
- package/dist/m365/search/commands.js +7 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN006005_CFG_PS_metadata.js +63 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN006006_CFG_PS_features.js +60 -0
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.13.1.js +53 -0
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.14.0-beta.4.js +57 -0
- package/dist/m365/spfx/commands/project/project-upgrade.js +17 -13
- package/dist/m365/spfx/commands/spfx-doctor.js +176 -62
- package/dist/m365/spo/commands/contenttype/contenttype-list.js +52 -0
- package/dist/m365/spo/commands/list/list-get.js +6 -2
- package/dist/m365/spo/commands/listitem/listitem-attachment-list.js +90 -0
- package/dist/m365/spo/commands/page/Page.js +3 -1
- package/dist/m365/spo/commands/page/page-add.js +7 -10
- package/dist/m365/spo/commands/page/page-set.js +7 -10
- package/dist/m365/spo/commands/site/site-remove.js +98 -30
- package/dist/m365/spo/commands/web/web-installedlanguage-list.js +48 -0
- package/dist/m365/spo/commands.js +4 -1
- package/dist/m365/teams/commands/report/report-directroutingcalls.js +1 -1
- package/dist/m365/teams/commands/report/report-pstncalls.js +1 -1
- package/dist/request.js +9 -4
- package/docs/docs/cmd/_global.md +2 -2
- package/docs/docs/cmd/aad/app/app-add.md +11 -0
- package/docs/docs/cmd/aad/app/app-get.md +48 -0
- package/docs/docs/cmd/aad/o365group/o365group-add.md +1 -0
- package/docs/docs/cmd/aad/oauth2grant/oauth2grant-remove.md +2 -1
- package/docs/docs/cmd/aad/oauth2grant/oauth2grant-set.md +3 -2
- package/docs/docs/cmd/aad/sp/sp-add.md +53 -0
- package/docs/docs/cmd/aad/user/user-password-validate.md +29 -0
- package/docs/docs/cmd/app/permission/permission-list.md +36 -0
- package/docs/docs/cmd/file/file-add.md +11 -0
- package/docs/docs/cmd/file/file-list.md +46 -0
- package/docs/docs/cmd/pa/app/app-list.md +17 -1
- package/docs/docs/cmd/search/externalconnection/externalconnection-add.md +43 -0
- package/docs/docs/cmd/spfx/project/project-externalize.md +1 -1
- package/docs/docs/cmd/spfx/project/project-rename.md +1 -1
- package/docs/docs/cmd/spfx/project/project-upgrade.md +1 -1
- package/docs/docs/cmd/spfx/spfx-doctor.md +1 -1
- package/docs/docs/cmd/spo/contenttype/contenttype-list.md +33 -0
- package/docs/docs/cmd/spo/list/list-get.md +9 -0
- package/docs/docs/cmd/spo/listitem/listitem-attachment-list.md +39 -0
- package/docs/docs/cmd/spo/page/page-add.md +2 -2
- package/docs/docs/cmd/spo/page/page-set.md +3 -3
- package/docs/docs/cmd/spo/site/site-remove.md +3 -1
- package/docs/docs/cmd/spo/web/web-installedlanguage-list.md +24 -0
- package/docs/docs/cmd/teams/report/report-directroutingcalls.md +0 -3
- package/docs/docs/cmd/teams/report/report-pstncalls.md +4 -3
- package/npm-shrinkwrap.json +1050 -1568
- package/package.json +29 -24
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const request_1 = require("../../../request");
|
|
4
|
+
const GraphItemsListCommand_1 = require("../../base/GraphItemsListCommand");
|
|
5
|
+
const SpoCommand_1 = require("../../base/SpoCommand");
|
|
6
|
+
const commands_1 = require("../commands");
|
|
7
|
+
class FileListCommand extends GraphItemsListCommand_1.GraphItemsListCommand {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
this.foldersToGetFilesFrom = [];
|
|
11
|
+
}
|
|
12
|
+
get name() {
|
|
13
|
+
return commands_1.default.LIST;
|
|
14
|
+
}
|
|
15
|
+
get description() {
|
|
16
|
+
return 'Retrieves files from the specified folder and site';
|
|
17
|
+
}
|
|
18
|
+
defaultProperties() {
|
|
19
|
+
return ['name', 'lastModifiedByUser'];
|
|
20
|
+
}
|
|
21
|
+
commandAction(logger, args, cb) {
|
|
22
|
+
let webUrl = args.options.webUrl;
|
|
23
|
+
if (!webUrl.endsWith('/')) {
|
|
24
|
+
webUrl += '/';
|
|
25
|
+
}
|
|
26
|
+
const folderUrl = new URL(args.options.folderUrl, webUrl);
|
|
27
|
+
let driveId = '';
|
|
28
|
+
this
|
|
29
|
+
.getSiteId(args.options.webUrl, logger)
|
|
30
|
+
.then((siteId) => this.getDocumentLibrary(siteId, folderUrl, args.options.folderUrl, logger))
|
|
31
|
+
.then((drive) => {
|
|
32
|
+
driveId = drive.id;
|
|
33
|
+
return this.getStartingFolderId(drive, folderUrl, logger);
|
|
34
|
+
})
|
|
35
|
+
.then((folderId) => {
|
|
36
|
+
if (this.verbose) {
|
|
37
|
+
logger.logToStderr(`Loading folders to get files from...`);
|
|
38
|
+
}
|
|
39
|
+
// add the starting folder to the list of folders to get files from
|
|
40
|
+
this.foldersToGetFilesFrom.push(folderId);
|
|
41
|
+
return this.loadFoldersToGetFilesFrom(folderId, driveId, args.options.recursive);
|
|
42
|
+
})
|
|
43
|
+
.then(_ => {
|
|
44
|
+
if (this.debug) {
|
|
45
|
+
logger.logToStderr(`Folders to get files from: ${this.foldersToGetFilesFrom.join(', ')}`);
|
|
46
|
+
}
|
|
47
|
+
return this.loadFilesFromFolders(driveId, this.foldersToGetFilesFrom, logger);
|
|
48
|
+
})
|
|
49
|
+
.then(_ => {
|
|
50
|
+
logger.log(this.items);
|
|
51
|
+
cb();
|
|
52
|
+
}, err => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
53
|
+
}
|
|
54
|
+
getSiteId(webUrl, logger) {
|
|
55
|
+
if (this.verbose) {
|
|
56
|
+
logger.logToStderr(`Getting site id...`);
|
|
57
|
+
}
|
|
58
|
+
const url = new URL(webUrl);
|
|
59
|
+
const requestOptions = {
|
|
60
|
+
url: `${this.resource}/v1.0/sites/${encodeURIComponent(url.host)}:${url.pathname}?$select=id`,
|
|
61
|
+
headers: {
|
|
62
|
+
accept: 'application/json;odata.metadata=none'
|
|
63
|
+
},
|
|
64
|
+
responseType: 'json'
|
|
65
|
+
};
|
|
66
|
+
return request_1.default
|
|
67
|
+
.get(requestOptions)
|
|
68
|
+
.then((site) => {
|
|
69
|
+
if (this.verbose) {
|
|
70
|
+
logger.logToStderr(`Site id: ${site.id}`);
|
|
71
|
+
}
|
|
72
|
+
return site.id;
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
getDocumentLibrary(siteId, folderUrl, folderUrlFromUser, logger) {
|
|
76
|
+
if (this.verbose) {
|
|
77
|
+
logger.logToStderr(`Getting document library...`);
|
|
78
|
+
}
|
|
79
|
+
const requestOptions = {
|
|
80
|
+
url: `${this.resource}/v1.0/sites/${siteId}/drives?$select=webUrl,id`,
|
|
81
|
+
headers: {
|
|
82
|
+
accept: 'application/json;odata.metadata=none'
|
|
83
|
+
},
|
|
84
|
+
responseType: 'json'
|
|
85
|
+
};
|
|
86
|
+
return request_1.default
|
|
87
|
+
.get(requestOptions)
|
|
88
|
+
.then((drives) => {
|
|
89
|
+
const lowerCaseFolderUrl = folderUrl.href.toLowerCase();
|
|
90
|
+
const drive = drives.value
|
|
91
|
+
.sort((a, b) => b.webUrl.localeCompare(a.webUrl))
|
|
92
|
+
.find((d) => {
|
|
93
|
+
const driveUrl = d.webUrl.toLowerCase();
|
|
94
|
+
// ensure that the drive url is a prefix of the folder url
|
|
95
|
+
return lowerCaseFolderUrl.startsWith(driveUrl) &&
|
|
96
|
+
(driveUrl.length === lowerCaseFolderUrl.length ||
|
|
97
|
+
lowerCaseFolderUrl[driveUrl.length] === '/');
|
|
98
|
+
});
|
|
99
|
+
if (!drive) {
|
|
100
|
+
return Promise.reject(`Document library '${folderUrlFromUser}' not found`);
|
|
101
|
+
}
|
|
102
|
+
if (this.verbose) {
|
|
103
|
+
logger.logToStderr(`Document library: ${drive.webUrl}, ${drive.id}`);
|
|
104
|
+
}
|
|
105
|
+
return Promise.resolve(drive);
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
getStartingFolderId(documentLibrary, folderUrl, logger) {
|
|
109
|
+
if (this.verbose) {
|
|
110
|
+
logger.logToStderr(`Getting starting folder id...`);
|
|
111
|
+
}
|
|
112
|
+
const documentLibraryRelativeFolderUrl = folderUrl.href.replace(new RegExp(documentLibrary.webUrl, 'i'), '');
|
|
113
|
+
const requestOptions = {
|
|
114
|
+
url: `${this.resource}/v1.0/drives/${documentLibrary.id}/root${documentLibraryRelativeFolderUrl.length > 0 ? `:${documentLibraryRelativeFolderUrl}` : ''}?$select=id`,
|
|
115
|
+
headers: {
|
|
116
|
+
accept: 'application/json;odata.metadata=none'
|
|
117
|
+
},
|
|
118
|
+
responseType: 'json'
|
|
119
|
+
};
|
|
120
|
+
return request_1.default
|
|
121
|
+
.get(requestOptions)
|
|
122
|
+
.then((folder) => {
|
|
123
|
+
if (this.verbose) {
|
|
124
|
+
logger.logToStderr(`Starting folder id: ${folder.id}`);
|
|
125
|
+
}
|
|
126
|
+
return folder.id;
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
loadFoldersToGetFilesFrom(folderId, driveId, recursive) {
|
|
130
|
+
if (!recursive) {
|
|
131
|
+
return Promise.resolve();
|
|
132
|
+
}
|
|
133
|
+
const requestOptions = {
|
|
134
|
+
url: `${this.resource}/v1.0/drives/${driveId}/items('${folderId}')/children?$filter=folder ne null&$select=id`,
|
|
135
|
+
headers: {
|
|
136
|
+
accept: 'application/json;odata.metadata=none'
|
|
137
|
+
},
|
|
138
|
+
responseType: 'json'
|
|
139
|
+
};
|
|
140
|
+
return request_1.default
|
|
141
|
+
.get(requestOptions)
|
|
142
|
+
.then((subfolders) => {
|
|
143
|
+
const subfolderIds = subfolders.value.map((subfolder) => subfolder.id);
|
|
144
|
+
this.foldersToGetFilesFrom = this.foldersToGetFilesFrom.concat(subfolderIds);
|
|
145
|
+
return Promise
|
|
146
|
+
.all(subfolderIds.map((subfolderId) => this.loadFoldersToGetFilesFrom(subfolderId, driveId, recursive)))
|
|
147
|
+
.then(_ => Promise.resolve());
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
loadFilesFromFolders(driveId, folderIds, logger) {
|
|
151
|
+
if (this.verbose) {
|
|
152
|
+
logger.logToStderr(`Loading files from folders...`);
|
|
153
|
+
}
|
|
154
|
+
this.items = [];
|
|
155
|
+
return Promise
|
|
156
|
+
.all(folderIds.map((folderId) =>
|
|
157
|
+
// get items from folder. Because we can't filter out folders here
|
|
158
|
+
// we need to get all items from the folder and filter them out later
|
|
159
|
+
this.getAllItems(`${this.resource}/v1.0/drives/${driveId}/items/${folderId}/children`, logger, false)))
|
|
160
|
+
.then(_ => {
|
|
161
|
+
// remove folders from the list of files
|
|
162
|
+
this.items = this.items.filter((item) => item.file);
|
|
163
|
+
this.items.forEach(file => { var _a, _b; return file.lastModifiedByUser = (_b = (_a = file.lastModifiedBy) === null || _a === void 0 ? void 0 : _a.user) === null || _b === void 0 ? void 0 : _b.displayName; });
|
|
164
|
+
return Promise.resolve();
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
options() {
|
|
168
|
+
const options = [
|
|
169
|
+
{ option: '-u, --webUrl <webUrl>' },
|
|
170
|
+
{ option: '-f, --folderUrl <folderUrl>' },
|
|
171
|
+
{ option: '--recursive' }
|
|
172
|
+
];
|
|
173
|
+
const parentOptions = super.options();
|
|
174
|
+
return options.concat(parentOptions);
|
|
175
|
+
}
|
|
176
|
+
validate(args) {
|
|
177
|
+
return SpoCommand_1.default.isValidSharePointUrl(args.options.webUrl);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
module.exports = new FileListCommand();
|
|
181
|
+
//# sourceMappingURL=file-list.js.map
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const prefix = 'file';
|
|
4
4
|
exports.default = {
|
|
5
5
|
ADD: `${prefix} add`,
|
|
6
|
-
CONVERT_PDF: `${prefix} convert pdf
|
|
6
|
+
CONVERT_PDF: `${prefix} convert pdf`,
|
|
7
|
+
LIST: `${prefix} list`
|
|
7
8
|
};
|
|
8
9
|
//# sourceMappingURL=commands.js.map
|
|
@@ -12,8 +12,14 @@ class PaAppListCommand extends AzmgmtItemsListCommand_1.AzmgmtItemsListCommand {
|
|
|
12
12
|
defaultProperties() {
|
|
13
13
|
return ['name', 'displayName'];
|
|
14
14
|
}
|
|
15
|
+
getTelemetryProperties(args) {
|
|
16
|
+
const telemetryProps = super.getTelemetryProperties(args);
|
|
17
|
+
telemetryProps.asAdmin = args.options.asAdmin === true;
|
|
18
|
+
telemetryProps.environment = typeof args.options.environment !== 'undefined';
|
|
19
|
+
return telemetryProps;
|
|
20
|
+
}
|
|
15
21
|
commandAction(logger, args, cb) {
|
|
16
|
-
const url = `${this.resource}providers/Microsoft.PowerApps/apps?api-version=2017-08-01`;
|
|
22
|
+
const url = `${this.resource}providers/Microsoft.PowerApps${args.options.asAdmin ? '/scopes/admin' : ''}${args.options.environment ? '/environments/' + encodeURIComponent(args.options.environment) : ''}/apps?api-version=2017-08-01`;
|
|
17
23
|
this
|
|
18
24
|
.getAllItems(url, logger, true)
|
|
19
25
|
.then(() => {
|
|
@@ -31,6 +37,27 @@ class PaAppListCommand extends AzmgmtItemsListCommand_1.AzmgmtItemsListCommand {
|
|
|
31
37
|
cb();
|
|
32
38
|
}, (rawRes) => this.handleRejectedODataJsonPromise(rawRes, logger, cb));
|
|
33
39
|
}
|
|
40
|
+
options() {
|
|
41
|
+
const options = [
|
|
42
|
+
{
|
|
43
|
+
option: '-e, --environment [environment]'
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
option: '--asAdmin'
|
|
47
|
+
}
|
|
48
|
+
];
|
|
49
|
+
const parentOptions = super.options();
|
|
50
|
+
return options.concat(parentOptions);
|
|
51
|
+
}
|
|
52
|
+
validate(args) {
|
|
53
|
+
if (args.options.asAdmin && !args.options.environment) {
|
|
54
|
+
return 'When specifying the asAdmin option the environment option is required as well';
|
|
55
|
+
}
|
|
56
|
+
if (args.options.environment && !args.options.asAdmin) {
|
|
57
|
+
return 'When specifying the environment option the asAdmin option is required as well';
|
|
58
|
+
}
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
34
61
|
}
|
|
35
62
|
module.exports = new PaAppListCommand();
|
|
36
63
|
//# sourceMappingURL=app-list.js.map
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const request_1 = require("../../../../request");
|
|
4
|
+
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
5
|
+
const commands_1 = require("../../commands");
|
|
6
|
+
class SearchExternalConnectionAddCommand extends GraphCommand_1.default {
|
|
7
|
+
get name() {
|
|
8
|
+
return commands_1.default.EXTERNALCONNECTION_ADD;
|
|
9
|
+
}
|
|
10
|
+
get description() {
|
|
11
|
+
return 'Adds a new External Connection for Microsoft Search';
|
|
12
|
+
}
|
|
13
|
+
getTelemetryProperties(args) {
|
|
14
|
+
const telemetryProps = super.getTelemetryProperties(args);
|
|
15
|
+
telemetryProps.authorizedAppIds = typeof args.options.authorizedAppIds !== undefined;
|
|
16
|
+
return telemetryProps;
|
|
17
|
+
}
|
|
18
|
+
commandAction(logger, args, cb) {
|
|
19
|
+
let appIds = [];
|
|
20
|
+
if (args.options.authorizedAppIds !== undefined &&
|
|
21
|
+
args.options.authorizedAppIds !== '') {
|
|
22
|
+
appIds = args.options.authorizedAppIds.split(',');
|
|
23
|
+
}
|
|
24
|
+
const commandData = {
|
|
25
|
+
id: args.options.id,
|
|
26
|
+
name: args.options.name,
|
|
27
|
+
description: args.options.description,
|
|
28
|
+
configuration: {
|
|
29
|
+
authorizedAppIds: appIds
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
const requestOptions = {
|
|
33
|
+
url: `${this.resource}/v1.0/external/connections`,
|
|
34
|
+
headers: {
|
|
35
|
+
accept: 'application/json;odata.metadata=none'
|
|
36
|
+
},
|
|
37
|
+
responseType: 'json',
|
|
38
|
+
data: commandData
|
|
39
|
+
};
|
|
40
|
+
request_1.default
|
|
41
|
+
.post(requestOptions)
|
|
42
|
+
.then(_ => cb(), err => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
43
|
+
}
|
|
44
|
+
options() {
|
|
45
|
+
const options = [
|
|
46
|
+
{
|
|
47
|
+
option: '-i, --id <id>'
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
option: '-n, --name <name>'
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
option: '-d, --description <description>'
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
option: '--authorizedAppIds [authorizedAppIds]'
|
|
57
|
+
}
|
|
58
|
+
];
|
|
59
|
+
const parentOptions = super.options();
|
|
60
|
+
return options.concat(parentOptions);
|
|
61
|
+
}
|
|
62
|
+
validate(args) {
|
|
63
|
+
const id = args.options.id;
|
|
64
|
+
if (id.length < 3 || id.length > 32) {
|
|
65
|
+
return 'ID must be between 3 and 32 characters in length.';
|
|
66
|
+
}
|
|
67
|
+
const alphaNumericRegEx = /[^\w]|_/g;
|
|
68
|
+
if (alphaNumericRegEx.test(id)) {
|
|
69
|
+
return 'ID must only contain alphanumeric characters.';
|
|
70
|
+
}
|
|
71
|
+
if (id.length > 9 &&
|
|
72
|
+
id.startsWith('Microsoft')) {
|
|
73
|
+
return 'ID cannot begin with Microsoft';
|
|
74
|
+
}
|
|
75
|
+
const invalidIds = ['None',
|
|
76
|
+
'Directory',
|
|
77
|
+
'Exchange',
|
|
78
|
+
'ExchangeArchive',
|
|
79
|
+
'LinkedIn',
|
|
80
|
+
'Mailbox',
|
|
81
|
+
'OneDriveBusiness',
|
|
82
|
+
'SharePoint',
|
|
83
|
+
'Teams',
|
|
84
|
+
'Yammer',
|
|
85
|
+
'Connectors',
|
|
86
|
+
'TaskFabric',
|
|
87
|
+
'PowerBI',
|
|
88
|
+
'Assistant',
|
|
89
|
+
'TopicEngine',
|
|
90
|
+
'MSFT_All_Connectors'
|
|
91
|
+
];
|
|
92
|
+
if (invalidIds.indexOf(id) > -1) {
|
|
93
|
+
return `ID cannot be one of the following values: ${invalidIds.join(', ')}.`;
|
|
94
|
+
}
|
|
95
|
+
return true;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
module.exports = new SearchExternalConnectionAddCommand();
|
|
99
|
+
//# sourceMappingURL=externalconnection-add.js.map
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FN006005_CFG_PS_metadata = void 0;
|
|
4
|
+
const JsonRule_1 = require("./JsonRule");
|
|
5
|
+
class FN006005_CFG_PS_metadata extends JsonRule_1.JsonRule {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
}
|
|
9
|
+
get id() {
|
|
10
|
+
return 'FN006005';
|
|
11
|
+
}
|
|
12
|
+
get title() {
|
|
13
|
+
return 'package-solution.json metadata';
|
|
14
|
+
}
|
|
15
|
+
get description() {
|
|
16
|
+
return `In package-solution.json add metadata section`;
|
|
17
|
+
}
|
|
18
|
+
get resolution() {
|
|
19
|
+
return '';
|
|
20
|
+
}
|
|
21
|
+
get resolutionType() {
|
|
22
|
+
return 'json';
|
|
23
|
+
}
|
|
24
|
+
get severity() {
|
|
25
|
+
return 'Required';
|
|
26
|
+
}
|
|
27
|
+
get file() {
|
|
28
|
+
return './config/package-solution.json';
|
|
29
|
+
}
|
|
30
|
+
visit(project, findings) {
|
|
31
|
+
var _a;
|
|
32
|
+
if (!project.packageSolutionJson ||
|
|
33
|
+
!project.packageSolutionJson.solution) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
if (!project.packageSolutionJson.solution.metadata) {
|
|
37
|
+
const solutionDescription = `${(_a = project.packageJson) === null || _a === void 0 ? void 0 : _a.name} description`;
|
|
38
|
+
const resolution = {
|
|
39
|
+
solution: {
|
|
40
|
+
metadata: {
|
|
41
|
+
shortDescription: {
|
|
42
|
+
default: solutionDescription
|
|
43
|
+
},
|
|
44
|
+
longDescription: {
|
|
45
|
+
default: solutionDescription
|
|
46
|
+
},
|
|
47
|
+
screenshotPaths: [],
|
|
48
|
+
videoUrl: '',
|
|
49
|
+
categories: []
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
const node = this.getAstNodeFromFile(project.packageSolutionJson, 'solution');
|
|
54
|
+
this.addFindingWithOccurrences([{
|
|
55
|
+
file: this.file,
|
|
56
|
+
resolution: JSON.stringify(resolution, null, 2),
|
|
57
|
+
position: this.getPositionFromNode(node)
|
|
58
|
+
}], findings);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
exports.FN006005_CFG_PS_metadata = FN006005_CFG_PS_metadata;
|
|
63
|
+
//# sourceMappingURL=FN006005_CFG_PS_metadata.js.map
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FN006006_CFG_PS_features = void 0;
|
|
4
|
+
const JsonRule_1 = require("./JsonRule");
|
|
5
|
+
const uuid_1 = require("uuid");
|
|
6
|
+
class FN006006_CFG_PS_features extends JsonRule_1.JsonRule {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
}
|
|
10
|
+
get id() {
|
|
11
|
+
return 'FN006006';
|
|
12
|
+
}
|
|
13
|
+
get title() {
|
|
14
|
+
return 'package-solution.json features';
|
|
15
|
+
}
|
|
16
|
+
get description() {
|
|
17
|
+
return `In package-solution.json add features section`;
|
|
18
|
+
}
|
|
19
|
+
get resolution() {
|
|
20
|
+
return '';
|
|
21
|
+
}
|
|
22
|
+
get resolutionType() {
|
|
23
|
+
return 'json';
|
|
24
|
+
}
|
|
25
|
+
get severity() {
|
|
26
|
+
return 'Required';
|
|
27
|
+
}
|
|
28
|
+
get file() {
|
|
29
|
+
return './config/package-solution.json';
|
|
30
|
+
}
|
|
31
|
+
visit(project, findings) {
|
|
32
|
+
var _a, _b;
|
|
33
|
+
if (!project.packageSolutionJson ||
|
|
34
|
+
!project.packageSolutionJson.solution) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
if (!project.packageSolutionJson.solution.features) {
|
|
38
|
+
const resolution = {
|
|
39
|
+
solution: {
|
|
40
|
+
features: [
|
|
41
|
+
{
|
|
42
|
+
title: `${(_a = project.packageJson) === null || _a === void 0 ? void 0 : _a.name} Feature`,
|
|
43
|
+
description: `The feature that activates elements of the ${(_b = project.packageJson) === null || _b === void 0 ? void 0 : _b.name} solution.`,
|
|
44
|
+
id: (0, uuid_1.v4)(),
|
|
45
|
+
version: project.packageSolutionJson.solution.version
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
const node = this.getAstNodeFromFile(project.packageSolutionJson, 'solution');
|
|
51
|
+
this.addFindingWithOccurrences([{
|
|
52
|
+
file: this.file,
|
|
53
|
+
resolution: JSON.stringify(resolution, null, 2),
|
|
54
|
+
position: this.getPositionFromNode(node)
|
|
55
|
+
}], findings);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
exports.FN006006_CFG_PS_features = FN006006_CFG_PS_features;
|
|
60
|
+
//# sourceMappingURL=FN006006_CFG_PS_features.js.map
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const FN001001_DEP_microsoft_sp_core_library_1 = require("./rules/FN001001_DEP_microsoft_sp_core_library");
|
|
4
|
+
const FN001002_DEP_microsoft_sp_lodash_subset_1 = require("./rules/FN001002_DEP_microsoft_sp_lodash_subset");
|
|
5
|
+
const FN001003_DEP_microsoft_sp_office_ui_fabric_core_1 = require("./rules/FN001003_DEP_microsoft_sp_office_ui_fabric_core");
|
|
6
|
+
const FN001004_DEP_microsoft_sp_webpart_base_1 = require("./rules/FN001004_DEP_microsoft_sp_webpart_base");
|
|
7
|
+
const FN001011_DEP_microsoft_sp_dialog_1 = require("./rules/FN001011_DEP_microsoft_sp_dialog");
|
|
8
|
+
const FN001012_DEP_microsoft_sp_application_base_1 = require("./rules/FN001012_DEP_microsoft_sp_application_base");
|
|
9
|
+
const FN001013_DEP_microsoft_decorators_1 = require("./rules/FN001013_DEP_microsoft_decorators");
|
|
10
|
+
const FN001014_DEP_microsoft_sp_listview_extensibility_1 = require("./rules/FN001014_DEP_microsoft_sp_listview_extensibility");
|
|
11
|
+
const FN001021_DEP_microsoft_sp_property_pane_1 = require("./rules/FN001021_DEP_microsoft_sp_property_pane");
|
|
12
|
+
const FN001023_DEP_microsoft_sp_component_base_1 = require("./rules/FN001023_DEP_microsoft_sp_component_base");
|
|
13
|
+
const FN001024_DEP_microsoft_sp_diagnostics_1 = require("./rules/FN001024_DEP_microsoft_sp_diagnostics");
|
|
14
|
+
const FN001025_DEP_microsoft_sp_dynamic_data_1 = require("./rules/FN001025_DEP_microsoft_sp_dynamic_data");
|
|
15
|
+
const FN001026_DEP_microsoft_sp_extension_base_1 = require("./rules/FN001026_DEP_microsoft_sp_extension_base");
|
|
16
|
+
const FN001027_DEP_microsoft_sp_http_1 = require("./rules/FN001027_DEP_microsoft_sp_http");
|
|
17
|
+
const FN001028_DEP_microsoft_sp_list_subscription_1 = require("./rules/FN001028_DEP_microsoft_sp_list_subscription");
|
|
18
|
+
const FN001029_DEP_microsoft_sp_loader_1 = require("./rules/FN001029_DEP_microsoft_sp_loader");
|
|
19
|
+
const FN001030_DEP_microsoft_sp_module_interfaces_1 = require("./rules/FN001030_DEP_microsoft_sp_module_interfaces");
|
|
20
|
+
const FN001031_DEP_microsoft_sp_odata_types_1 = require("./rules/FN001031_DEP_microsoft_sp_odata_types");
|
|
21
|
+
const FN001032_DEP_microsoft_sp_page_context_1 = require("./rules/FN001032_DEP_microsoft_sp_page_context");
|
|
22
|
+
const FN002001_DEVDEP_microsoft_sp_build_web_1 = require("./rules/FN002001_DEVDEP_microsoft_sp_build_web");
|
|
23
|
+
const FN002002_DEVDEP_microsoft_sp_module_interfaces_1 = require("./rules/FN002002_DEVDEP_microsoft_sp_module_interfaces");
|
|
24
|
+
const FN002009_DEVDEP_microsoft_sp_tslint_rules_1 = require("./rules/FN002009_DEVDEP_microsoft_sp_tslint_rules");
|
|
25
|
+
const FN006004_CFG_PS_developer_1 = require("./rules/FN006004_CFG_PS_developer");
|
|
26
|
+
const FN010001_YORC_version_1 = require("./rules/FN010001_YORC_version");
|
|
27
|
+
module.exports = [
|
|
28
|
+
new FN001001_DEP_microsoft_sp_core_library_1.FN001001_DEP_microsoft_sp_core_library('1.13.1'),
|
|
29
|
+
new FN001002_DEP_microsoft_sp_lodash_subset_1.FN001002_DEP_microsoft_sp_lodash_subset('1.13.1'),
|
|
30
|
+
new FN001003_DEP_microsoft_sp_office_ui_fabric_core_1.FN001003_DEP_microsoft_sp_office_ui_fabric_core('1.13.1'),
|
|
31
|
+
new FN001004_DEP_microsoft_sp_webpart_base_1.FN001004_DEP_microsoft_sp_webpart_base('1.13.1'),
|
|
32
|
+
new FN001011_DEP_microsoft_sp_dialog_1.FN001011_DEP_microsoft_sp_dialog('1.13.1'),
|
|
33
|
+
new FN001012_DEP_microsoft_sp_application_base_1.FN001012_DEP_microsoft_sp_application_base('1.13.1'),
|
|
34
|
+
new FN001013_DEP_microsoft_decorators_1.FN001013_DEP_microsoft_decorators('1.13.1'),
|
|
35
|
+
new FN001014_DEP_microsoft_sp_listview_extensibility_1.FN001014_DEP_microsoft_sp_listview_extensibility('1.13.1'),
|
|
36
|
+
new FN001021_DEP_microsoft_sp_property_pane_1.FN001021_DEP_microsoft_sp_property_pane('1.13.1'),
|
|
37
|
+
new FN001023_DEP_microsoft_sp_component_base_1.FN001023_DEP_microsoft_sp_component_base('1.13.1'),
|
|
38
|
+
new FN001024_DEP_microsoft_sp_diagnostics_1.FN001024_DEP_microsoft_sp_diagnostics('1.13.1'),
|
|
39
|
+
new FN001025_DEP_microsoft_sp_dynamic_data_1.FN001025_DEP_microsoft_sp_dynamic_data('1.13.1'),
|
|
40
|
+
new FN001026_DEP_microsoft_sp_extension_base_1.FN001026_DEP_microsoft_sp_extension_base('1.13.1'),
|
|
41
|
+
new FN001027_DEP_microsoft_sp_http_1.FN001027_DEP_microsoft_sp_http('1.13.1'),
|
|
42
|
+
new FN001028_DEP_microsoft_sp_list_subscription_1.FN001028_DEP_microsoft_sp_list_subscription('1.13.1'),
|
|
43
|
+
new FN001029_DEP_microsoft_sp_loader_1.FN001029_DEP_microsoft_sp_loader('1.13.1'),
|
|
44
|
+
new FN001030_DEP_microsoft_sp_module_interfaces_1.FN001030_DEP_microsoft_sp_module_interfaces('1.13.1'),
|
|
45
|
+
new FN001031_DEP_microsoft_sp_odata_types_1.FN001031_DEP_microsoft_sp_odata_types('1.13.1'),
|
|
46
|
+
new FN001032_DEP_microsoft_sp_page_context_1.FN001032_DEP_microsoft_sp_page_context('1.13.1'),
|
|
47
|
+
new FN002001_DEVDEP_microsoft_sp_build_web_1.FN002001_DEVDEP_microsoft_sp_build_web('1.13.1'),
|
|
48
|
+
new FN002002_DEVDEP_microsoft_sp_module_interfaces_1.FN002002_DEVDEP_microsoft_sp_module_interfaces('1.13.1'),
|
|
49
|
+
new FN002009_DEVDEP_microsoft_sp_tslint_rules_1.FN002009_DEVDEP_microsoft_sp_tslint_rules('1.13.1'),
|
|
50
|
+
new FN006004_CFG_PS_developer_1.FN006004_CFG_PS_developer('1.13.1'),
|
|
51
|
+
new FN010001_YORC_version_1.FN010001_YORC_version('1.13.1')
|
|
52
|
+
];
|
|
53
|
+
//# sourceMappingURL=upgrade-1.13.1.js.map
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const FN001001_DEP_microsoft_sp_core_library_1 = require("./rules/FN001001_DEP_microsoft_sp_core_library");
|
|
4
|
+
const FN001002_DEP_microsoft_sp_lodash_subset_1 = require("./rules/FN001002_DEP_microsoft_sp_lodash_subset");
|
|
5
|
+
const FN001003_DEP_microsoft_sp_office_ui_fabric_core_1 = require("./rules/FN001003_DEP_microsoft_sp_office_ui_fabric_core");
|
|
6
|
+
const FN001004_DEP_microsoft_sp_webpart_base_1 = require("./rules/FN001004_DEP_microsoft_sp_webpart_base");
|
|
7
|
+
const FN001011_DEP_microsoft_sp_dialog_1 = require("./rules/FN001011_DEP_microsoft_sp_dialog");
|
|
8
|
+
const FN001012_DEP_microsoft_sp_application_base_1 = require("./rules/FN001012_DEP_microsoft_sp_application_base");
|
|
9
|
+
const FN001013_DEP_microsoft_decorators_1 = require("./rules/FN001013_DEP_microsoft_decorators");
|
|
10
|
+
const FN001014_DEP_microsoft_sp_listview_extensibility_1 = require("./rules/FN001014_DEP_microsoft_sp_listview_extensibility");
|
|
11
|
+
const FN001021_DEP_microsoft_sp_property_pane_1 = require("./rules/FN001021_DEP_microsoft_sp_property_pane");
|
|
12
|
+
const FN001023_DEP_microsoft_sp_component_base_1 = require("./rules/FN001023_DEP_microsoft_sp_component_base");
|
|
13
|
+
const FN001024_DEP_microsoft_sp_diagnostics_1 = require("./rules/FN001024_DEP_microsoft_sp_diagnostics");
|
|
14
|
+
const FN001025_DEP_microsoft_sp_dynamic_data_1 = require("./rules/FN001025_DEP_microsoft_sp_dynamic_data");
|
|
15
|
+
const FN001026_DEP_microsoft_sp_extension_base_1 = require("./rules/FN001026_DEP_microsoft_sp_extension_base");
|
|
16
|
+
const FN001027_DEP_microsoft_sp_http_1 = require("./rules/FN001027_DEP_microsoft_sp_http");
|
|
17
|
+
const FN001028_DEP_microsoft_sp_list_subscription_1 = require("./rules/FN001028_DEP_microsoft_sp_list_subscription");
|
|
18
|
+
const FN001029_DEP_microsoft_sp_loader_1 = require("./rules/FN001029_DEP_microsoft_sp_loader");
|
|
19
|
+
const FN001030_DEP_microsoft_sp_module_interfaces_1 = require("./rules/FN001030_DEP_microsoft_sp_module_interfaces");
|
|
20
|
+
const FN001031_DEP_microsoft_sp_odata_types_1 = require("./rules/FN001031_DEP_microsoft_sp_odata_types");
|
|
21
|
+
const FN001032_DEP_microsoft_sp_page_context_1 = require("./rules/FN001032_DEP_microsoft_sp_page_context");
|
|
22
|
+
const FN002001_DEVDEP_microsoft_sp_build_web_1 = require("./rules/FN002001_DEVDEP_microsoft_sp_build_web");
|
|
23
|
+
const FN002002_DEVDEP_microsoft_sp_module_interfaces_1 = require("./rules/FN002002_DEVDEP_microsoft_sp_module_interfaces");
|
|
24
|
+
const FN002009_DEVDEP_microsoft_sp_tslint_rules_1 = require("./rules/FN002009_DEVDEP_microsoft_sp_tslint_rules");
|
|
25
|
+
const FN006004_CFG_PS_developer_1 = require("./rules/FN006004_CFG_PS_developer");
|
|
26
|
+
const FN006005_CFG_PS_metadata_1 = require("./rules/FN006005_CFG_PS_metadata");
|
|
27
|
+
const FN006006_CFG_PS_features_1 = require("./rules/FN006006_CFG_PS_features");
|
|
28
|
+
const FN010001_YORC_version_1 = require("./rules/FN010001_YORC_version");
|
|
29
|
+
module.exports = [
|
|
30
|
+
new FN001001_DEP_microsoft_sp_core_library_1.FN001001_DEP_microsoft_sp_core_library('1.14.0-beta.4'),
|
|
31
|
+
new FN001002_DEP_microsoft_sp_lodash_subset_1.FN001002_DEP_microsoft_sp_lodash_subset('1.14.0-beta.4'),
|
|
32
|
+
new FN001003_DEP_microsoft_sp_office_ui_fabric_core_1.FN001003_DEP_microsoft_sp_office_ui_fabric_core('1.14.0-beta.4'),
|
|
33
|
+
new FN001004_DEP_microsoft_sp_webpart_base_1.FN001004_DEP_microsoft_sp_webpart_base('1.14.0-beta.4'),
|
|
34
|
+
new FN001011_DEP_microsoft_sp_dialog_1.FN001011_DEP_microsoft_sp_dialog('1.14.0-beta.4'),
|
|
35
|
+
new FN001012_DEP_microsoft_sp_application_base_1.FN001012_DEP_microsoft_sp_application_base('1.14.0-beta.4'),
|
|
36
|
+
new FN001013_DEP_microsoft_decorators_1.FN001013_DEP_microsoft_decorators('1.14.0-beta.4'),
|
|
37
|
+
new FN001014_DEP_microsoft_sp_listview_extensibility_1.FN001014_DEP_microsoft_sp_listview_extensibility('1.14.0-beta.4'),
|
|
38
|
+
new FN001021_DEP_microsoft_sp_property_pane_1.FN001021_DEP_microsoft_sp_property_pane('1.14.0-beta.4'),
|
|
39
|
+
new FN001023_DEP_microsoft_sp_component_base_1.FN001023_DEP_microsoft_sp_component_base('1.14.0-beta.4'),
|
|
40
|
+
new FN001024_DEP_microsoft_sp_diagnostics_1.FN001024_DEP_microsoft_sp_diagnostics('1.14.0-beta.4'),
|
|
41
|
+
new FN001025_DEP_microsoft_sp_dynamic_data_1.FN001025_DEP_microsoft_sp_dynamic_data('1.14.0-beta.4'),
|
|
42
|
+
new FN001026_DEP_microsoft_sp_extension_base_1.FN001026_DEP_microsoft_sp_extension_base('1.14.0-beta.4'),
|
|
43
|
+
new FN001027_DEP_microsoft_sp_http_1.FN001027_DEP_microsoft_sp_http('1.14.0-beta.4'),
|
|
44
|
+
new FN001028_DEP_microsoft_sp_list_subscription_1.FN001028_DEP_microsoft_sp_list_subscription('1.14.0-beta.4'),
|
|
45
|
+
new FN001029_DEP_microsoft_sp_loader_1.FN001029_DEP_microsoft_sp_loader('1.14.0-beta.4'),
|
|
46
|
+
new FN001030_DEP_microsoft_sp_module_interfaces_1.FN001030_DEP_microsoft_sp_module_interfaces('1.14.0-beta.4'),
|
|
47
|
+
new FN001031_DEP_microsoft_sp_odata_types_1.FN001031_DEP_microsoft_sp_odata_types('1.14.0-beta.4'),
|
|
48
|
+
new FN001032_DEP_microsoft_sp_page_context_1.FN001032_DEP_microsoft_sp_page_context('1.14.0-beta.4'),
|
|
49
|
+
new FN002001_DEVDEP_microsoft_sp_build_web_1.FN002001_DEVDEP_microsoft_sp_build_web('1.14.0-beta.4'),
|
|
50
|
+
new FN002002_DEVDEP_microsoft_sp_module_interfaces_1.FN002002_DEVDEP_microsoft_sp_module_interfaces('1.14.0-beta.4'),
|
|
51
|
+
new FN002009_DEVDEP_microsoft_sp_tslint_rules_1.FN002009_DEVDEP_microsoft_sp_tslint_rules('1.14.0-beta.4'),
|
|
52
|
+
new FN006004_CFG_PS_developer_1.FN006004_CFG_PS_developer('1.14.0-beta.4'),
|
|
53
|
+
new FN006005_CFG_PS_metadata_1.FN006005_CFG_PS_metadata(),
|
|
54
|
+
new FN006006_CFG_PS_features_1.FN006006_CFG_PS_features(),
|
|
55
|
+
new FN010001_YORC_version_1.FN010001_YORC_version('1.14.0-beta.4')
|
|
56
|
+
];
|
|
57
|
+
//# sourceMappingURL=upgrade-1.14.0-beta.4.js.map
|
|
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const fs = require("fs");
|
|
4
4
|
const os = require("os");
|
|
5
5
|
const path = require("path");
|
|
6
|
+
// uncomment to support upgrading to preview releases
|
|
7
|
+
const semver_1 = require("semver");
|
|
6
8
|
const Command_1 = require("../../../../Command");
|
|
7
9
|
const commands_1 = require("../../commands");
|
|
8
10
|
const base_project_command_1 = require("./base-project-command");
|
|
@@ -41,7 +43,9 @@ class SpfxProjectUpgradeCommand extends base_project_command_1.BaseProjectComman
|
|
|
41
43
|
'1.11.0',
|
|
42
44
|
'1.12.0',
|
|
43
45
|
'1.12.1',
|
|
44
|
-
'1.13.0'
|
|
46
|
+
'1.13.0',
|
|
47
|
+
'1.13.1',
|
|
48
|
+
'1.14.0-beta.4'
|
|
45
49
|
];
|
|
46
50
|
}
|
|
47
51
|
get name() {
|
|
@@ -54,9 +58,9 @@ class SpfxProjectUpgradeCommand extends base_project_command_1.BaseProjectComman
|
|
|
54
58
|
const telemetryProps = super.getTelemetryProperties(args);
|
|
55
59
|
telemetryProps.toVersion = args.options.toVersion || this.supportedVersions[this.supportedVersions.length - 1];
|
|
56
60
|
// uncomment to support upgrading to preview releases
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
61
|
+
if ((0, semver_1.prerelease)(telemetryProps.toVersion) && !args.options.preview) {
|
|
62
|
+
telemetryProps.toVersion = this.supportedVersions[this.supportedVersions.length - 2];
|
|
63
|
+
}
|
|
60
64
|
telemetryProps.packageManager = args.options.packageManager || 'npm';
|
|
61
65
|
telemetryProps.shell = args.options.shell || 'bash';
|
|
62
66
|
telemetryProps.preview = args.options.preview;
|
|
@@ -70,15 +74,15 @@ class SpfxProjectUpgradeCommand extends base_project_command_1.BaseProjectComman
|
|
|
70
74
|
}
|
|
71
75
|
this.toVersion = args.options.toVersion ? args.options.toVersion : this.supportedVersions[this.supportedVersions.length - 1];
|
|
72
76
|
// uncomment to support upgrading to preview releases
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
77
|
+
if (!args.options.toVersion &&
|
|
78
|
+
!args.options.preview &&
|
|
79
|
+
(0, semver_1.prerelease)(this.toVersion)) {
|
|
80
|
+
// no version and no preview specified while the current version to
|
|
81
|
+
// upgrade to is a prerelease so let's grab the first non-preview version
|
|
82
|
+
// since we're supporting only one preview version, it's sufficient for
|
|
83
|
+
// us to take second to last version
|
|
84
|
+
this.toVersion = this.supportedVersions[this.supportedVersions.length - 2];
|
|
85
|
+
}
|
|
82
86
|
this.packageManager = args.options.packageManager || 'npm';
|
|
83
87
|
this.shell = args.options.shell || 'bash';
|
|
84
88
|
if (this.supportedVersions.indexOf(this.toVersion) < 0) {
|