@microsoft/generator-sharepoint 1.20.0 → 1.21.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/lib/common/BaseGenerator.js +161 -121
  2. package/lib/common/ConfigJsonManager.js +45 -29
  3. package/lib/common/JsonManager.js +70 -29
  4. package/lib/common/PackageJsonManager.js +28 -8
  5. package/lib/common/PackageSolutionJsonManager.js +41 -23
  6. package/lib/common/ServeJsonManager.js +69 -31
  7. package/lib/common/TeamsManifestJsonManager.js +33 -21
  8. package/lib/common/YeomanConfiguration.js +25 -8
  9. package/lib/common/bundles-versions.json +1 -4
  10. package/lib/common/dependencies.json +62 -100
  11. package/lib/common/spsay.js +32 -19
  12. package/lib/common/utilities.js +97 -63
  13. package/lib/generators/adaptiveCardExtension/BaseAdaptiveCardExtensionGenerator.js +86 -41
  14. package/lib/generators/adaptiveCardExtension/index.js +103 -62
  15. package/lib/generators/app/index.js +138 -117
  16. package/lib/generators/applicationCustomizer/index.js +89 -45
  17. package/lib/generators/commandSet/index.js +89 -45
  18. package/lib/generators/component/BaseComponentGenerator.js +130 -77
  19. package/lib/generators/component/index.js +108 -69
  20. package/lib/generators/dataVisualizationAdaptiveCardExtension/index.js +72 -43
  21. package/lib/generators/extension/BaseExtensionGenerator.js +95 -49
  22. package/lib/generators/extension/index.js +104 -64
  23. package/lib/generators/fieldCustomizer/index.js +97 -50
  24. package/lib/generators/formCustomizer/index.js +99 -52
  25. package/lib/generators/formCustomizer/templates/none/{componentClassName}.ts +6 -2
  26. package/lib/generators/genericAdaptiveCardExtension/index.js +80 -46
  27. package/lib/generators/library/index.js +89 -43
  28. package/lib/generators/searchAdaptiveCardExtension/index.js +72 -43
  29. package/lib/generators/searchQueryModifier/index.js +89 -45
  30. package/lib/generators/solution/heft.package.json +1 -1
  31. package/lib/generators/solution/index.js +110 -80
  32. package/lib/generators/solution/non-heft.package.json +1 -1
  33. package/lib/generators/webpart/index.js +99 -50
  34. package/lib/generators/webpart/initial.teamsManifest.json +2 -4
  35. package/package.json +38 -12
  36. package/lib/common/BaseGenerator.d.ts +0 -59
  37. package/lib/common/BaseGenerator.d.ts.map +0 -1
  38. package/lib/common/ConfigJsonManager.d.ts +0 -16
  39. package/lib/common/ConfigJsonManager.d.ts.map +0 -1
  40. package/lib/common/JsonManager.d.ts +0 -12
  41. package/lib/common/JsonManager.d.ts.map +0 -1
  42. package/lib/common/PackageJsonManager.d.ts +0 -18
  43. package/lib/common/PackageJsonManager.d.ts.map +0 -1
  44. package/lib/common/PackageSolutionJsonManager.d.ts +0 -20
  45. package/lib/common/PackageSolutionJsonManager.d.ts.map +0 -1
  46. package/lib/common/ServeJsonManager.d.ts +0 -12
  47. package/lib/common/ServeJsonManager.d.ts.map +0 -1
  48. package/lib/common/TeamsManifestJsonManager.d.ts +0 -51
  49. package/lib/common/TeamsManifestJsonManager.d.ts.map +0 -1
  50. package/lib/common/YeomanConfiguration.d.ts +0 -25
  51. package/lib/common/YeomanConfiguration.d.ts.map +0 -1
  52. package/lib/common/spsay.d.ts +0 -2
  53. package/lib/common/spsay.d.ts.map +0 -1
  54. package/lib/common/utilities.d.ts +0 -9
  55. package/lib/common/utilities.d.ts.map +0 -1
  56. package/lib/generators/adaptiveCardExtension/BaseAdaptiveCardExtensionGenerator.d.ts +0 -18
  57. package/lib/generators/adaptiveCardExtension/BaseAdaptiveCardExtensionGenerator.d.ts.map +0 -1
  58. package/lib/generators/adaptiveCardExtension/index.d.ts +0 -23
  59. package/lib/generators/adaptiveCardExtension/index.d.ts.map +0 -1
  60. package/lib/generators/app/index.d.ts +0 -10
  61. package/lib/generators/app/index.d.ts.map +0 -1
  62. package/lib/generators/applicationCustomizer/index.d.ts +0 -24
  63. package/lib/generators/applicationCustomizer/index.d.ts.map +0 -1
  64. package/lib/generators/commandSet/index.d.ts +0 -23
  65. package/lib/generators/commandSet/index.d.ts.map +0 -1
  66. package/lib/generators/component/BaseComponentGenerator.d.ts +0 -56
  67. package/lib/generators/component/BaseComponentGenerator.d.ts.map +0 -1
  68. package/lib/generators/component/index.d.ts +0 -23
  69. package/lib/generators/component/index.d.ts.map +0 -1
  70. package/lib/generators/dataVisualizationAdaptiveCardExtension/index.d.ts +0 -19
  71. package/lib/generators/dataVisualizationAdaptiveCardExtension/index.d.ts.map +0 -1
  72. package/lib/generators/extension/BaseExtensionGenerator.d.ts +0 -19
  73. package/lib/generators/extension/BaseExtensionGenerator.d.ts.map +0 -1
  74. package/lib/generators/extension/index.d.ts +0 -26
  75. package/lib/generators/extension/index.d.ts.map +0 -1
  76. package/lib/generators/fieldCustomizer/index.d.ts +0 -24
  77. package/lib/generators/fieldCustomizer/index.d.ts.map +0 -1
  78. package/lib/generators/formCustomizer/index.d.ts +0 -24
  79. package/lib/generators/formCustomizer/index.d.ts.map +0 -1
  80. package/lib/generators/genericAdaptiveCardExtension/index.d.ts +0 -21
  81. package/lib/generators/genericAdaptiveCardExtension/index.d.ts.map +0 -1
  82. package/lib/generators/library/index.d.ts +0 -23
  83. package/lib/generators/library/index.d.ts.map +0 -1
  84. package/lib/generators/searchAdaptiveCardExtension/index.d.ts +0 -19
  85. package/lib/generators/searchAdaptiveCardExtension/index.d.ts.map +0 -1
  86. package/lib/generators/searchQueryModifier/index.d.ts +0 -23
  87. package/lib/generators/searchQueryModifier/index.d.ts.map +0 -1
  88. package/lib/generators/solution/index.d.ts +0 -19
  89. package/lib/generators/solution/index.d.ts.map +0 -1
  90. package/lib/generators/webpart/index.d.ts +0 -23
  91. package/lib/generators/webpart/index.d.ts.map +0 -1
@@ -2,36 +2,30 @@
2
2
  "adaptiveCardExtension": {
3
3
  "standard": {
4
4
  "dependencies": {
5
- "@microsoft/sp-core-library": "1.20.0",
6
- "@microsoft/sp-property-pane": "1.20.0",
7
- "@microsoft/sp-adaptive-card-extension-base": "1.20.0"
5
+ "@microsoft/sp-core-library": "1.21.0-beta.2",
6
+ "@microsoft/sp-property-pane": "1.21.0-beta.2",
7
+ "@microsoft/sp-adaptive-card-extension-base": "1.21.0-beta.2"
8
8
  },
9
9
  "devDependencies": {
10
- "@microsoft/sp-module-interfaces": "1.20.2"
11
- },
12
- "preferredVersions": {
13
- "@microsoft/sp-module-interfaces": "1.20.2"
10
+ "@microsoft/sp-module-interfaces": "1.21.0-beta.2"
14
11
  }
15
12
  },
16
13
  "plusBeta": {
17
14
  "dependencies": {
18
- "@microsoft/sp-core-library": "1.20.0",
19
- "@microsoft/sp-property-pane": "1.20.0",
20
- "@microsoft/sp-adaptive-card-extension-base": "1.20.0"
15
+ "@microsoft/sp-core-library": "1.21.0-beta.2",
16
+ "@microsoft/sp-property-pane": "1.21.0-beta.2",
17
+ "@microsoft/sp-adaptive-card-extension-base": "1.21.0-beta.2"
21
18
  },
22
19
  "devDependencies": {
23
- "@microsoft/sp-module-interfaces": "1.20.2"
24
- },
25
- "preferredVersions": {
26
- "@microsoft/sp-module-interfaces": "1.20.2"
20
+ "@microsoft/sp-module-interfaces": "1.21.0-beta.2"
27
21
  }
28
22
  }
29
23
  },
30
24
  "applicationCustomizer": {
31
25
  "standard": {
32
26
  "dependencies": {
33
- "@microsoft/sp-dialog": "1.20.0",
34
- "@microsoft/sp-application-base": "1.20.0"
27
+ "@microsoft/sp-dialog": "1.21.0-beta.2",
28
+ "@microsoft/sp-application-base": "1.21.0-beta.2"
35
29
  }
36
30
  },
37
31
  "plusBeta": null
@@ -39,8 +33,8 @@
39
33
  "applicationCustomizerPlusBeta": {
40
34
  "standard": {
41
35
  "dependencies": {
42
- "@microsoft/sp-dialog": "1.20.0",
43
- "@microsoft/sp-application-base": "1.20.0"
36
+ "@microsoft/sp-dialog": "1.21.0-beta.2",
37
+ "@microsoft/sp-application-base": "1.21.0-beta.2"
44
38
  }
45
39
  },
46
40
  "plusBeta": null
@@ -48,8 +42,8 @@
48
42
  "commandSet": {
49
43
  "standard": {
50
44
  "dependencies": {
51
- "@microsoft/sp-listview-extensibility": "1.20.0",
52
- "@microsoft/sp-dialog": "1.20.0"
45
+ "@microsoft/sp-listview-extensibility": "1.21.0-beta.2",
46
+ "@microsoft/sp-dialog": "1.21.0-beta.2"
53
47
  }
54
48
  },
55
49
  "plusBeta": null
@@ -57,8 +51,8 @@
57
51
  "commandSetPlusBeta": {
58
52
  "standard": {
59
53
  "dependencies": {
60
- "@microsoft/sp-listview-extensibility": "1.20.0",
61
- "@microsoft/sp-dialog": "1.20.0"
54
+ "@microsoft/sp-listview-extensibility": "1.21.0-beta.2",
55
+ "@microsoft/sp-dialog": "1.21.0-beta.2"
62
56
  }
63
57
  },
64
58
  "plusBeta": null
@@ -66,33 +60,27 @@
66
60
  "extension": {
67
61
  "standard": {
68
62
  "dependencies": {
69
- "@microsoft/sp-core-library": "1.20.0",
70
- "@microsoft/decorators": "1.20.0"
63
+ "@microsoft/sp-core-library": "1.21.0-beta.2",
64
+ "@microsoft/decorators": "1.21.0-beta.2"
71
65
  },
72
66
  "devDependencies": {
73
- "@microsoft/sp-module-interfaces": "1.20.2"
74
- },
75
- "preferredVersions": {
76
- "@microsoft/sp-module-interfaces": "1.20.2"
67
+ "@microsoft/sp-module-interfaces": "1.21.0-beta.2"
77
68
  }
78
69
  },
79
70
  "plusBeta": {
80
71
  "dependencies": {
81
- "@microsoft/sp-core-library": "1.20.0",
82
- "@microsoft/decorators": "1.20.0"
72
+ "@microsoft/sp-core-library": "1.21.0-beta.2",
73
+ "@microsoft/decorators": "1.21.0-beta.2"
83
74
  },
84
75
  "devDependencies": {
85
- "@microsoft/sp-module-interfaces": "1.20.2"
86
- },
87
- "preferredVersions": {
88
- "@microsoft/sp-module-interfaces": "1.20.2"
76
+ "@microsoft/sp-module-interfaces": "1.21.0-beta.2"
89
77
  }
90
78
  }
91
79
  },
92
80
  "fieldCustomizer": {
93
81
  "standard": {
94
82
  "dependencies": {
95
- "@microsoft/sp-listview-extensibility": "1.20.0"
83
+ "@microsoft/sp-listview-extensibility": "1.21.0-beta.2"
96
84
  }
97
85
  },
98
86
  "plusBeta": null
@@ -100,7 +88,7 @@
100
88
  "fieldCustomizerPlusBeta": {
101
89
  "standard": {
102
90
  "dependencies": {
103
- "@microsoft/sp-listview-extensibility": "1.20.0"
91
+ "@microsoft/sp-listview-extensibility": "1.21.0-beta.2"
104
92
  }
105
93
  },
106
94
  "plusBeta": null
@@ -109,19 +97,13 @@
109
97
  "standard": {
110
98
  "dependencies": {},
111
99
  "devDependencies": {
112
- "@microsoft/sp-module-interfaces": "1.20.2"
113
- },
114
- "preferredVersions": {
115
- "@microsoft/sp-module-interfaces": "1.20.2"
100
+ "@microsoft/sp-module-interfaces": "1.21.0-beta.2"
116
101
  }
117
102
  },
118
103
  "plusBeta": {
119
104
  "dependencies": {},
120
105
  "devDependencies": {
121
- "@microsoft/sp-module-interfaces": "1.20.2"
122
- },
123
- "preferredVersions": {
124
- "@microsoft/sp-module-interfaces": "1.20.2"
106
+ "@microsoft/sp-module-interfaces": "1.21.0-beta.2"
125
107
  }
126
108
  }
127
109
  },
@@ -143,7 +125,7 @@
143
125
  "searchQueryModifier": {
144
126
  "standard": {
145
127
  "dependencies": {
146
- "@microsoft/sp-search-extensibility": "1.20.0"
128
+ "@microsoft/sp-search-extensibility": "1.21.0-beta.2"
147
129
  }
148
130
  },
149
131
  "plusBeta": null
@@ -151,7 +133,7 @@
151
133
  "searchQueryModifierPlusBeta": {
152
134
  "standard": {
153
135
  "dependencies": {
154
- "@microsoft/sp-search-extensibility": "1.20.0"
136
+ "@microsoft/sp-search-extensibility": "1.21.0-beta.2"
155
137
  }
156
138
  },
157
139
  "plusBeta": null
@@ -159,35 +141,29 @@
159
141
  "webpart": {
160
142
  "standard": {
161
143
  "dependencies": {
162
- "@microsoft/sp-core-library": "1.20.0",
163
- "@microsoft/sp-component-base": "1.20.0",
164
- "@microsoft/sp-property-pane": "1.20.0",
165
- "@microsoft/sp-webpart-base": "1.20.0",
166
- "@microsoft/sp-lodash-subset": "1.20.0",
167
- "@microsoft/sp-office-ui-fabric-core": "1.20.0"
144
+ "@microsoft/sp-core-library": "1.21.0-beta.2",
145
+ "@microsoft/sp-component-base": "1.21.0-beta.2",
146
+ "@microsoft/sp-property-pane": "1.21.0-beta.2",
147
+ "@microsoft/sp-webpart-base": "1.21.0-beta.2",
148
+ "@microsoft/sp-lodash-subset": "1.21.0-beta.2",
149
+ "@microsoft/sp-office-ui-fabric-core": "1.21.0-beta.2"
168
150
  },
169
151
  "devDependencies": {
170
- "@microsoft/sp-module-interfaces": "1.20.2",
152
+ "@microsoft/sp-module-interfaces": "1.21.0-beta.2",
171
153
  "@fluentui/react": "^8.106.4"
172
- },
173
- "preferredVersions": {
174
- "@microsoft/sp-module-interfaces": "1.20.2"
175
154
  }
176
155
  },
177
156
  "plusBeta": {
178
157
  "dependencies": {
179
- "@microsoft/sp-core-library": "1.20.0",
180
- "@microsoft/sp-component-base": "1.20.0",
181
- "@microsoft/sp-property-pane": "1.20.0",
182
- "@microsoft/sp-webpart-base": "1.20.0",
183
- "@microsoft/sp-lodash-subset": "1.20.0",
184
- "@microsoft/sp-office-ui-fabric-core": "1.20.0"
158
+ "@microsoft/sp-core-library": "1.21.0-beta.2",
159
+ "@microsoft/sp-component-base": "1.21.0-beta.2",
160
+ "@microsoft/sp-property-pane": "1.21.0-beta.2",
161
+ "@microsoft/sp-webpart-base": "1.21.0-beta.2",
162
+ "@microsoft/sp-lodash-subset": "1.21.0-beta.2",
163
+ "@microsoft/sp-office-ui-fabric-core": "1.21.0-beta.2"
185
164
  },
186
165
  "devDependencies": {
187
- "@microsoft/sp-module-interfaces": "1.20.2"
188
- },
189
- "preferredVersions": {
190
- "@microsoft/sp-module-interfaces": "1.20.2"
166
+ "@microsoft/sp-module-interfaces": "1.21.0-beta.2"
191
167
  }
192
168
  }
193
169
  },
@@ -199,17 +175,12 @@
199
175
  "devDependencies": {
200
176
  "@microsoft/rush-stack-compiler-4.7": "0.1.0",
201
177
  "@rushstack/eslint-config": "4.0.1",
202
- "@microsoft/eslint-plugin-spfx": "1.20.2",
203
- "@microsoft/eslint-config-spfx": "1.20.2",
204
- "@microsoft/spfx-web-build-rig": "1.20.2",
205
- "@rushstack/heft": "0.67.0",
178
+ "@microsoft/eslint-plugin-spfx": "1.21.0-beta.2",
179
+ "@microsoft/eslint-config-spfx": "1.21.0-beta.2",
180
+ "@microsoft/spfx-web-build-rig": "1.21.0-beta.2",
181
+ "@rushstack/heft": "0.71.0",
206
182
  "@types/webpack-env": "~1.15.2",
207
- "eslint": "8.57.0"
208
- },
209
- "preferredVersions": {
210
- "@microsoft/eslint-plugin-spfx": "1.20.2",
211
- "@microsoft/eslint-config-spfx": "1.20.2",
212
- "@microsoft/spfx-web-build-rig": "1.20.2"
183
+ "eslint": "8.57.1"
213
184
  }
214
185
  },
215
186
  "plusBeta": null
@@ -222,20 +193,17 @@
222
193
  "devDependencies": {
223
194
  "@microsoft/rush-stack-compiler-4.7": "0.1.0",
224
195
  "@rushstack/eslint-config": "4.0.1",
225
- "@microsoft/eslint-plugin-spfx": "1.20.2",
226
- "@microsoft/eslint-config-spfx": "1.20.2",
227
- "@microsoft/sp-build-web": "1.20.2",
196
+ "@microsoft/eslint-plugin-spfx": "1.21.0-beta.2",
197
+ "@microsoft/eslint-config-spfx": "1.21.0-beta.2",
198
+ "@microsoft/sp-build-web": "1.21.0-beta.2",
228
199
  "@types/webpack-env": "~1.15.2",
229
200
  "ajv": "^6.12.5",
230
- "eslint": "8.57.0",
201
+ "eslint": "8.57.1",
231
202
  "gulp": "4.0.2",
232
203
  "typescript": "4.7.4"
233
204
  },
234
205
  "preferredVersions": {
235
- "typescript": "4.7.4",
236
- "@microsoft/eslint-plugin-spfx": "1.20.2",
237
- "@microsoft/eslint-config-spfx": "1.20.2",
238
- "@microsoft/sp-build-web": "1.20.2"
206
+ "typescript": "4.7.4"
239
207
  }
240
208
  },
241
209
  "plusBeta": null
@@ -243,30 +211,24 @@
243
211
  "formCustomizer": {
244
212
  "standard": {
245
213
  "dependencies": {
246
- "@microsoft/sp-core-library": "1.20.0",
247
- "@microsoft/sp-listview-extensibility": "1.20.0",
248
- "@microsoft/sp-lodash-subset": "1.20.0",
249
- "@microsoft/sp-office-ui-fabric-core": "1.20.0"
214
+ "@microsoft/sp-core-library": "1.21.0-beta.2",
215
+ "@microsoft/sp-listview-extensibility": "1.21.0-beta.2",
216
+ "@microsoft/sp-lodash-subset": "1.21.0-beta.2",
217
+ "@microsoft/sp-office-ui-fabric-core": "1.21.0-beta.2"
250
218
  },
251
219
  "devDependencies": {
252
- "@microsoft/sp-module-interfaces": "1.20.2"
253
- },
254
- "preferredVersions": {
255
- "@microsoft/sp-module-interfaces": "1.20.2"
220
+ "@microsoft/sp-module-interfaces": "1.21.0-beta.2"
256
221
  }
257
222
  },
258
223
  "plusBeta": {
259
224
  "dependencies": {
260
- "@microsoft/sp-core-library": "1.20.0",
261
- "@microsoft/sp-listview-extensibility": "1.20.0",
262
- "@microsoft/sp-lodash-subset": "1.20.0",
263
- "@microsoft/sp-office-ui-fabric-core": "1.20.0"
225
+ "@microsoft/sp-core-library": "1.21.0-beta.2",
226
+ "@microsoft/sp-listview-extensibility": "1.21.0-beta.2",
227
+ "@microsoft/sp-lodash-subset": "1.21.0-beta.2",
228
+ "@microsoft/sp-office-ui-fabric-core": "1.21.0-beta.2"
264
229
  },
265
230
  "devDependencies": {
266
- "@microsoft/sp-module-interfaces": "1.20.2"
267
- },
268
- "preferredVersions": {
269
- "@microsoft/sp-module-interfaces": "1.20.2"
231
+ "@microsoft/sp-module-interfaces": "1.21.0-beta.2"
270
232
  }
271
233
  }
272
234
  }
@@ -1,10 +1,20 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const colors_1 = __importDefault(require("colors"));
7
- const lodash = require("lodash");
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "default", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return spsay;
9
+ }
10
+ });
11
+ const _colors = /*#__PURE__*/ _interop_require_default(require("colors"));
12
+ const _lodash = /*#__PURE__*/ _interop_require_default(require("lodash"));
13
+ function _interop_require_default(obj) {
14
+ return obj && obj.__esModule ? obj : {
15
+ default: obj
16
+ };
17
+ }
8
18
  const logo = [
9
19
  ' _=+#####! ',
10
20
  ' ###########| ',
@@ -17,7 +27,7 @@ const logo = [
17
27
  ' **=+####! '
18
28
  ];
19
29
  function times(n, character) {
20
- return lodash.times(n, () => character).join('');
30
+ return _lodash.default.times(n, ()=>character).join('');
21
31
  }
22
32
  function space(n) {
23
33
  return times(n, ' ');
@@ -30,27 +40,30 @@ function getWords(solutionName, useHeft) {
30
40
  ];
31
41
  const colorWords = [
32
42
  `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!`
43
+ `Solution ${_colors.default.cyan(solutionName)} is created.`,
44
+ `Run ${_colors.default.yellow(useHeft ? 'npm run start' : 'gulp serve')} to play with it!`
35
45
  ];
36
- const maxLength = Math.max.apply(undefined, words.map((word) => word.length));
37
- const formatted = colorWords.map((word, index) => {
46
+ const maxLength = Math.max.apply(undefined, words.map((word)=>word.length));
47
+ const formatted = colorWords.map((word, index)=>{
38
48
  const padding = maxLength - words[index].length;
39
49
  const rightPadding = Math.floor(padding / 2);
40
50
  const leftPadding = padding - rightPadding;
41
51
  return space(leftPadding) + word + space(rightPadding);
42
52
  });
43
- const wrapped = ['']
44
- .concat(['.' + times(maxLength + 4, '-') + '.'])
45
- .concat(formatted.map((word) => '| ' + word + ' |'))
46
- .concat(["'" + times(maxLength + 4, '-') + "'"]);
53
+ const wrapped = [
54
+ ''
55
+ ].concat([
56
+ '.' + times(maxLength + 4, '-') + '.'
57
+ ]).concat(formatted.map((word)=>'| ' + word + ' |')).concat([
58
+ "'" + times(maxLength + 4, '-') + "'"
59
+ ]);
47
60
  return wrapped;
48
61
  }
49
62
  function spsay(solutionName, useHeft) {
50
- const colorLogo = logo.map((line) => colors_1.default.cyan(line));
63
+ const colorLogo = logo.map((line)=>_colors.default.cyan(line));
51
64
  const words = getWords(solutionName, useHeft);
52
- const lines = lodash.zip(colorLogo, words).map((parts) => parts.join(''));
65
+ const lines = _lodash.default.zip(colorLogo, words).map((parts)=>parts.join(''));
53
66
  return '\n' + lines.join('\n') + '\n';
54
67
  }
55
- exports.default = spsay;
56
- //# sourceMappingURL=spsay.js.map
68
+
69
+ //#sourceMappingUrl=./spsay.js.map
@@ -1,82 +1,121 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ checkSolutionFolder: function() {
13
+ return checkSolutionFolder;
14
+ },
15
+ compose: function() {
16
+ return compose;
17
+ },
18
+ filesIn: function() {
19
+ return filesIn;
20
+ },
21
+ generateGuid: function() {
22
+ return generateGuid;
23
+ },
24
+ titleCase: function() {
25
+ return titleCase;
26
+ },
27
+ untokenize: function() {
28
+ return untokenize;
7
29
  }
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
30
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.compose = exports.generateGuid = exports.checkSolutionFolder = exports.filesIn = exports.untokenize = exports.titleCase = void 0;
30
- const colors_1 = __importDefault(require("colors"));
31
- const fs = __importStar(require("fs"));
32
- const lodash = __importStar(require("lodash"));
33
- const node_core_library_1 = require("@rushstack/node-core-library");
34
- const path = __importStar(require("path"));
35
- const uuid = __importStar(require("uuid"));
31
+ const _colors = /*#__PURE__*/ _interop_require_default(require("colors"));
32
+ const _fs = /*#__PURE__*/ _interop_require_wildcard(require("fs"));
33
+ const _lodash = /*#__PURE__*/ _interop_require_wildcard(require("lodash"));
34
+ const _nodecorelibrary = require("@rushstack/node-core-library");
35
+ const _path = /*#__PURE__*/ _interop_require_wildcard(require("path"));
36
+ const _uuid = /*#__PURE__*/ _interop_require_wildcard(require("uuid"));
37
+ function _interop_require_default(obj) {
38
+ return obj && obj.__esModule ? obj : {
39
+ default: obj
40
+ };
41
+ }
42
+ function _getRequireWildcardCache(nodeInterop) {
43
+ if (typeof WeakMap !== "function") return null;
44
+ var cacheBabelInterop = new WeakMap();
45
+ var cacheNodeInterop = new WeakMap();
46
+ return (_getRequireWildcardCache = function(nodeInterop) {
47
+ return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
48
+ })(nodeInterop);
49
+ }
50
+ function _interop_require_wildcard(obj, nodeInterop) {
51
+ if (!nodeInterop && obj && obj.__esModule) {
52
+ return obj;
53
+ }
54
+ if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
55
+ return {
56
+ default: obj
57
+ };
58
+ }
59
+ var cache = _getRequireWildcardCache(nodeInterop);
60
+ if (cache && cache.has(obj)) {
61
+ return cache.get(obj);
62
+ }
63
+ var newObj = {
64
+ __proto__: null
65
+ };
66
+ var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
67
+ for(var key in obj){
68
+ if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
69
+ var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
70
+ if (desc && (desc.get || desc.set)) {
71
+ Object.defineProperty(newObj, key, desc);
72
+ } else {
73
+ newObj[key] = obj[key];
74
+ }
75
+ }
76
+ }
77
+ newObj.default = obj;
78
+ if (cache) {
79
+ cache.set(obj, newObj);
80
+ }
81
+ return newObj;
82
+ }
36
83
  function titleCase(str) {
37
- str = lodash.camelCase(str);
38
- return lodash.upperFirst(str);
84
+ str = _lodash.camelCase(str);
85
+ return _lodash.upperFirst(str);
39
86
  }
40
- exports.titleCase = titleCase;
41
87
  function untokenize(str, props) {
42
- for (const [prop, propValue] of Object.entries(props)) {
88
+ for (const [prop, propValue] of Object.entries(props)){
43
89
  if (typeof propValue === 'string') {
44
90
  // eslint-disable-next-line @rushstack/security/no-unsafe-regexp
45
91
  str = str.replace(new RegExp(`{${prop}}`, 'g'), propValue);
46
92
  }
47
93
  }
48
94
  // Convert file name prefix with '_' to '.'
49
- const basename = path.basename(str);
95
+ const basename = _path.basename(str);
50
96
  if (basename[0] === '_') {
51
97
  const filename = '.' + basename.substr(1);
52
- const dirname = path.dirname(str);
53
- str = path.join(dirname, filename);
98
+ const dirname = _path.dirname(str);
99
+ str = _path.join(dirname, filename);
54
100
  }
55
101
  return str;
56
102
  }
57
- exports.untokenize = untokenize;
58
103
  function filesIn(...args) {
59
- const inputPath = path.join.apply(undefined, args);
104
+ const inputPath = _path.join.apply(undefined, args);
60
105
  const files = [];
61
106
  function traversePath(innerPath) {
62
- const subPaths = fs
63
- .readdirSync(innerPath)
64
- .filter((filename) => filename !== '.' && filename !== '..')
65
- .map((filename) => path.join(innerPath, filename));
66
- const subFiles = subPaths
67
- .filter((pathname) => fs.statSync(pathname).isFile())
68
- .map((pathname) => path.relative(inputPath, pathname));
69
- const subFolders = subPaths.filter((pathname) => fs.statSync(pathname).isDirectory());
107
+ const subPaths = _fs.readdirSync(innerPath).filter((filename)=>filename !== '.' && filename !== '..').map((filename)=>_path.join(innerPath, filename));
108
+ const subFiles = subPaths.filter((pathname)=>_fs.statSync(pathname).isFile()).map((pathname)=>_path.relative(inputPath, pathname));
109
+ const subFolders = subPaths.filter((pathname)=>_fs.statSync(pathname).isDirectory());
70
110
  subFolders.forEach(traversePath);
71
111
  files.push.apply(files, subFiles);
72
112
  }
73
113
  traversePath(inputPath);
74
114
  return files;
75
115
  }
76
- exports.filesIn = filesIn;
77
116
  async function checkSolutionFolder(generator, solutionName) {
78
117
  if (!solutionName) {
79
- generator.log(colors_1.default.red('!!! Warning !!!'));
118
+ generator.log(_colors.default.red('!!! Warning !!!'));
80
119
  const answers = await generator.prompt([
81
120
  {
82
121
  type: 'confirm',
@@ -87,27 +126,22 @@ async function checkSolutionFolder(generator, solutionName) {
87
126
  ]);
88
127
  if (answers.continue) {
89
128
  return solutionName; // resolve with the solution name
129
+ } else {
130
+ throw generator.log(_colors.default.red('Bye!'));
90
131
  }
91
- else {
92
- throw generator.log(colors_1.default.red('Bye!'));
93
- }
94
- }
95
- else {
132
+ } else {
96
133
  return solutionName;
97
134
  }
98
135
  }
99
- exports.checkSolutionFolder = checkSolutionFolder;
100
136
  function generateGuid() {
101
- return uuid.v4();
137
+ return _uuid.v4();
102
138
  }
103
- exports.generateGuid = generateGuid;
104
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
105
139
  function compose(generator, base, options) {
106
- base.composeWith(node_core_library_1.Import.resolveModule({
140
+ base.composeWith(_nodecorelibrary.Import.resolveModule({
107
141
  baseFolderPath: __dirname,
108
142
  modulePath: `@microsoft/generator-sharepoint/lib/generators/${generator}`,
109
143
  allowSelfReference: true
110
144
  }), options);
111
145
  }
112
- exports.compose = compose;
113
- //# sourceMappingURL=utilities.js.map
146
+
147
+ //#sourceMappingUrl=./utilities.js.map