@pnp/cli-microsoft365-spfx-toolkit 1.4.1 → 1.6.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/dist/Auth.js CHANGED
@@ -237,7 +237,7 @@ class Auth {
237
237
  thumbprint: certificateThumbprint,
238
238
  privateKey: certificatePrivateKey
239
239
  };
240
- let azureCloudInstance = msal_common_1.AzureCloudInstance.AzurePublic;
240
+ let azureCloudInstance = 0;
241
241
  switch (this.service.cloudType) {
242
242
  case CloudType.Public:
243
243
  azureCloudInstance = msal_common_1.AzureCloudInstance.AzurePublic;
@@ -13,7 +13,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
13
13
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
14
14
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15
15
  };
16
- var _SpoListRemoveCommand_instances, _SpoListRemoveCommand_initTelemetry, _SpoListRemoveCommand_initOptions, _SpoListRemoveCommand_initValidators, _SpoListRemoveCommand_initOptionSets;
16
+ var _SpoListRemoveCommand_instances, _SpoListRemoveCommand_initTelemetry, _SpoListRemoveCommand_initOptions, _SpoListRemoveCommand_initValidators, _SpoListRemoveCommand_initOptionSets, _SpoListRemoveCommand_initTypes;
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  const Cli_1 = require("../../../../cli/Cli");
19
19
  const request_1 = require("../../../../request");
@@ -33,6 +33,7 @@ class SpoListRemoveCommand extends SpoCommand_1.default {
33
33
  _SpoListRemoveCommand_instances.add(this);
34
34
  __classPrivateFieldGet(this, _SpoListRemoveCommand_instances, "m", _SpoListRemoveCommand_initTelemetry).call(this);
35
35
  __classPrivateFieldGet(this, _SpoListRemoveCommand_instances, "m", _SpoListRemoveCommand_initOptions).call(this);
36
+ __classPrivateFieldGet(this, _SpoListRemoveCommand_instances, "m", _SpoListRemoveCommand_initTypes).call(this);
36
37
  __classPrivateFieldGet(this, _SpoListRemoveCommand_instances, "m", _SpoListRemoveCommand_initValidators).call(this);
37
38
  __classPrivateFieldGet(this, _SpoListRemoveCommand_instances, "m", _SpoListRemoveCommand_initOptionSets).call(this);
38
39
  }
@@ -49,6 +50,9 @@ class SpoListRemoveCommand extends SpoCommand_1.default {
49
50
  else {
50
51
  requestUrl = `${args.options.webUrl}/_api/web/lists/GetByTitle('${formatting_1.formatting.encodeQueryParameter(args.options.title)}')`;
51
52
  }
53
+ if (args.options.recycle) {
54
+ requestUrl += `/recycle`;
55
+ }
52
56
  const requestOptions = {
53
57
  url: requestUrl,
54
58
  method: 'POST',
@@ -86,9 +90,10 @@ class SpoListRemoveCommand extends SpoCommand_1.default {
86
90
  _SpoListRemoveCommand_instances = new WeakSet(), _SpoListRemoveCommand_initTelemetry = function _SpoListRemoveCommand_initTelemetry() {
87
91
  this.telemetry.push((args) => {
88
92
  Object.assign(this.telemetryProperties, {
89
- id: (!(!args.options.id)).toString(),
90
- title: (!(!args.options.title)).toString(),
91
- force: (!(!args.options.force)).toString()
93
+ id: typeof args.options.id !== 'undefined',
94
+ title: typeof args.options.title !== 'undefined',
95
+ force: !!args.options.force,
96
+ recycle: !!args.options.recycle
92
97
  });
93
98
  });
94
99
  }, _SpoListRemoveCommand_initOptions = function _SpoListRemoveCommand_initOptions() {
@@ -98,6 +103,8 @@ _SpoListRemoveCommand_instances = new WeakSet(), _SpoListRemoveCommand_initTelem
98
103
  option: '-i, --id [id]'
99
104
  }, {
100
105
  option: '-t, --title [title]'
106
+ }, {
107
+ option: '--recycle'
101
108
  }, {
102
109
  option: '-f, --force'
103
110
  });
@@ -115,6 +122,9 @@ _SpoListRemoveCommand_instances = new WeakSet(), _SpoListRemoveCommand_initTelem
115
122
  }));
116
123
  }, _SpoListRemoveCommand_initOptionSets = function _SpoListRemoveCommand_initOptionSets() {
117
124
  this.optionSets.push({ options: ['id', 'title'] });
125
+ }, _SpoListRemoveCommand_initTypes = function _SpoListRemoveCommand_initTypes() {
126
+ this.types.string.push('id', 'title', 'webUrl');
127
+ this.types.boolean.push('force', 'recycle');
118
128
  };
119
129
  module.exports = new SpoListRemoveCommand();
120
130
  //# sourceMappingURL=list-remove.js.map
package/dist/request.js CHANGED
@@ -41,10 +41,11 @@ class Request {
41
41
  }
42
42
  return response;
43
43
  }, (error) => {
44
+ var _a, _b;
44
45
  if (this._logger) {
45
46
  const properties = ['status', 'statusText', 'headers'];
46
47
  this._logger.logToStderr('Request error:');
47
- this._logger.logToStderr(JSON.stringify(Object.assign(Object.assign({ url: error.config.url }, formatting_1.formatting.filterObject(error.response, properties)), { error: error.error }), null, 2));
48
+ this._logger.logToStderr(JSON.stringify(Object.assign(Object.assign({ url: (_b = (_a = error.config) === null || _a === void 0 ? void 0 : _a.url) !== null && _b !== void 0 ? _b : '' }, formatting_1.formatting.filterObject(error.response, properties)), { error: error.error }), null, 2));
48
49
  }
49
50
  throw error;
50
51
  });