create-powerapps-project 0.16.6 → 0.17.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md DELETED
@@ -1,474 +0,0 @@
1
- # Change Log - create-powerapps-project
2
-
3
- This log was last generated on Wed, 16 Feb 2022 00:36:07 GMT and should not be manually modified.
4
-
5
- <!-- Start content -->
6
-
7
- ## 0.16.6
8
-
9
- Wed, 16 Feb 2022 00:36:07 GMT
10
-
11
- ### Patches
12
-
13
- - Re-add sn.exe; React PCF updates (derek.finlinson@journeyteam.com)
14
-
15
- ## 0.16.5
16
-
17
- Mon, 14 Feb 2022 23:29:54 GMT
18
-
19
- ### Patches
20
-
21
- - Set class name from prompts (derek.finlinson@journeyteam.com)
22
-
23
- ## 0.16.4
24
-
25
- Fri, 11 Feb 2022 16:59:23 GMT
26
-
27
- ### Patches
28
-
29
- - Comment out pcf plop for now (derek.finlinson@journeyteam.com)
30
-
31
- ## 0.16.3
32
-
33
- Wed, 09 Feb 2022 16:19:05 GMT
34
-
35
- ### Patches
36
-
37
- - Catch errors on commands (derek.finlinson@journeyteam.com)
38
-
39
- ## 0.16.2
40
-
41
- Tue, 08 Feb 2022 18:47:13 GMT
42
-
43
- ### Patches
44
-
45
- - Update symbols (derek.finlinson@journeyteam.com)
46
-
47
- ## 0.16.1
48
-
49
- Tue, 08 Feb 2022 18:13:53 GMT
50
-
51
- ### Patches
52
-
53
- - Fix logger and file paths (derek.finlinson@journeyteam.com)
54
-
55
- ## 0.16.0
56
-
57
- Mon, 07 Feb 2022 22:02:33 GMT
58
-
59
- ### Minor changes
60
-
61
- - Add support for PCF projects (derek.finlinson@journeyteam.com)
62
-
63
- ## 0.15.6
64
-
65
- Mon, 17 Jan 2022 15:43:56 GMT
66
-
67
- ### Patches
68
-
69
- - Rework logger (derek.finlinson@journeyteam.com)
70
-
71
- ## 0.15.5
72
-
73
- Sun, 16 Jan 2022 23:22:22 GMT
74
-
75
- ### Patches
76
-
77
- - Switch symbols (derek.finlinson@journeyteam.com)
78
-
79
- ## 0.15.4
80
-
81
- Sun, 16 Jan 2022 22:57:19 GMT
82
-
83
- ### Patches
84
-
85
- - Fix logging for real (derek.finlinson@journeyteam.com)
86
-
87
- ## 0.15.3
88
-
89
- Sun, 16 Jan 2022 22:41:55 GMT
90
-
91
- ### Patches
92
-
93
- - Fix logging (derek.finlinson@journeyteam.com)
94
-
95
- ## 0.15.2
96
-
97
- Sun, 16 Jan 2022 22:28:32 GMT
98
-
99
- ### Patches
100
-
101
- - Remove pnpm (derek.finlinson@journeyteam.com)
102
-
103
- ## 0.15.1
104
-
105
- Sun, 16 Jan 2022 22:08:05 GMT
106
-
107
- ### Patches
108
-
109
- - Fix program command (derek.finlinson@journeyteam.com)
110
-
111
- ## 0.15.0
112
-
113
- Sun, 16 Jan 2022 21:30:27 GMT
114
-
115
- ### Minor changes
116
-
117
- - Remove dependencies; Fix plop dependency (derek.finlinson@journeyteam.com)
118
-
119
- ## 0.14.7
120
-
121
- Tue, 07 Dec 2021 19:52:53 GMT
122
-
123
- ### Patches
124
-
125
- - Switch to commonjs (derek.finlinson@journeyteam.com)
126
-
127
- ## 0.14.6
128
-
129
- Tue, 07 Dec 2021 19:41:35 GMT
130
-
131
- ### Patches
132
-
133
- - Revert to plop v2 (derek.finlinson@journeyteam.com)
134
-
135
- ## 0.14.5
136
-
137
- Tue, 07 Dec 2021 18:47:59 GMT
138
-
139
- ### Patches
140
-
141
- - Swap to commonjs (derek.finlinson@journeyteam.com)
142
-
143
- ## 0.14.4
144
-
145
- Thu, 02 Dec 2021 20:50:52 GMT
146
-
147
- ### Patches
148
-
149
- - Fix node-plop (derek.finlinson@journeyteam.com)
150
- - Update plop (derek.finlinson@journeyteam.com)
151
-
152
- ## 0.14.3
153
-
154
- Wed, 22 Sep 2021 16:01:21 GMT
155
-
156
- ### Patches
157
-
158
- - Update deploy script (derek.finlinson@journeyteam.com)
159
-
160
- ## 0.14.2
161
-
162
- Thu, 16 Sep 2021 20:49:48 GMT
163
-
164
- ### Patches
165
-
166
- - New dataverse-utils scripts (derek.finlinson@journeyteam.com)
167
-
168
- ## 0.14.1
169
-
170
- Thu, 02 Sep 2021 16:46:01 GMT
171
-
172
- ### Patches
173
-
174
- - Update default scripts (derek.finlinson@journeyteam.com)
175
-
176
- ## 0.14.0
177
-
178
- Thu, 02 Sep 2021 16:22:00 GMT
179
-
180
- ### Minor changes
181
-
182
- - Use new dataverse-utils package (derek.finlinson@journeyteam.com)
183
-
184
- ## 0.13.1
185
-
186
- Mon, 28 Jun 2021 20:38:16 GMT
187
-
188
- ### Patches
189
-
190
- - Update package versions (derek.finlinson@journeyteam.com)
191
-
192
- ## 0.12.1
193
-
194
- Wed, 02 Jun 2021 16:21:14 GMT
195
-
196
- ### Patches
197
-
198
- - applying package updates (derek.finlinson@journeyteam.com)
199
-
200
- ## 0.12.0
201
-
202
- Mon, 24 May 2021 16:33:16 GMT
203
-
204
- ### Minor changes
205
-
206
- - Merge creds with config.json (derek.finlinson@journeyteam.com)
207
-
208
- ## 0.11.4
209
-
210
- Fri, 12 Feb 2021 17:05:15 GMT
211
-
212
- ### Patches
213
-
214
- - Use assets if emittedAssets is empty (derek.finlinson@journeyteam.com)
215
-
216
- ## 0.11.3
217
-
218
- Mon, 01 Feb 2021 18:27:32 GMT
219
-
220
- ### Patches
221
-
222
- - Fix scripts (derek.finlinson@journeyteam.com)
223
-
224
- ## 0.11.2
225
-
226
- Mon, 01 Feb 2021 17:31:23 GMT
227
-
228
- ### Patches
229
-
230
- - Make executable (derek.finlinson@journeyteam.com)
231
-
232
- ## 0.11.1
233
-
234
- Mon, 01 Feb 2021 17:20:22 GMT
235
-
236
- ### Patches
237
-
238
- - Fix package dependencies (derek.finlinson@journeyteam.com)
239
-
240
- ## 0.11.0
241
-
242
- Sat, 30 Jan 2021 05:31:27 GMT
243
-
244
- ### Minor changes
245
-
246
- - Update deployment scripts; Refactor (derek.finlinson@journeyteam.com)
247
-
248
- ## 0.10.3
249
-
250
- Tue, 19 Jan 2021 16:29:25 GMT
251
-
252
- ### Patches
253
-
254
- - Always add solution (derek.finlinson@journeyteam.com)
255
-
256
- ## 0.10.2
257
-
258
- Mon, 18 Jan 2021 20:48:31 GMT
259
-
260
- ### Patches
261
-
262
- - Fix default webpack config (derek.finlinson@journeyteam.com)
263
-
264
- ## 0.10.1
265
-
266
- Fri, 15 Jan 2021 21:17:38 GMT
267
-
268
- ### Patches
269
-
270
- - Remove dependency (derek.finlinson@journeyteam.com)
271
-
272
- ## 0.10.0
273
-
274
- Thu, 14 Jan 2021 23:48:11 GMT
275
-
276
- ### Minor changes
277
-
278
- - Remove just-scripts (derek.finlinson@journeyteam.com)
279
-
280
- ### Patches
281
-
282
- - Bump dataverse-webapi to v1.0.1 (derek.finlinson@journeyteam.com)
283
-
284
- ## 0.9.0
285
-
286
- Thu, 14 Jan 2021 00:33:39 GMT
287
-
288
- ### Minor changes
289
-
290
- - Switch to dataverse-webapi (derek.finlinson@journeyteam.com)
291
-
292
- ## 0.8.2
293
-
294
- Tue, 29 Dec 2020 19:55:03 GMT
295
-
296
- ### Patches
297
-
298
- - Fix webpack compilation assets (derek.finlinson@journeyteam.com)
299
-
300
- ## 0.8.1
301
-
302
- Tue, 15 Dec 2020 20:28:34 GMT
303
-
304
- ### Patches
305
-
306
- - Fix files (derek.finlinson@journeyteam.com)
307
-
308
- ## 0.8.0
309
-
310
- Tue, 08 Dec 2020 18:10:21 GMT
311
-
312
- ### Minor changes
313
-
314
- - Add files to package.json (derek.finlinson@journeyteam.com)
315
-
316
- ## 0.7.0
317
-
318
- Mon, 07 Dec 2020 22:04:22 GMT
319
-
320
- ### Minor changes
321
-
322
- - Switch to TS just.config (derek.finlinson@journeyteam.com)
323
-
324
- ## 0.6.7
325
-
326
- Tue, 01 Dec 2020 19:40:31 GMT
327
-
328
- ### Patches
329
-
330
- - Remove IE support; Fix webpack config (derek.finlinson@journeyteam.com)
331
-
332
- ## 0.6.6
333
-
334
- Tue, 01 Dec 2020 17:28:45 GMT
335
-
336
- ### Patches
337
-
338
- - Fix bug when adding plugin step; Add tasks.json (derek.finlinson@journeyteam.com)
339
-
340
- ## 0.6.5
341
-
342
- Wed, 18 Nov 2020 15:18:31 GMT
343
-
344
- ### Patches
345
-
346
- - Remove default namespace for assemblies (derek.finlinson@journeyteam.com)
347
-
348
- ## 0.6.4
349
-
350
- Thu, 15 Oct 2020 20:08:59 GMT
351
-
352
- ### Patches
353
-
354
- - Re-add corejs (derek.finlinson@journeyteam.com)
355
-
356
- ## 0.6.3
357
-
358
- Thu, 15 Oct 2020 17:22:02 GMT
359
-
360
- ### Patches
361
-
362
- - Update dependencies (derek.finlinson@journeyteam.com)
363
-
364
- ## 0.6.2
365
-
366
- Tue, 13 Oct 2020 15:42:51 GMT
367
-
368
- ### Patches
369
-
370
- - Use specific just-scripts version (derek.finlinson@journeyteam.com)
371
-
372
- ## 0.6.1
373
-
374
- Tue, 13 Oct 2020 15:38:50 GMT
375
-
376
- ### Patches
377
-
378
- - Update dependencies (derek.finlinson@journeyteam.com)
379
-
380
- ## 0.6.0
381
-
382
- Fri, 02 Oct 2020 16:20:30 GMT
383
-
384
- ### Minor changes
385
-
386
- - Add tenant back but default to common (derek.finlinson@journeyteam.com)
387
-
388
- ## 0.5.1
389
-
390
- Tue, 25 Aug 2020 22:13:42 GMT
391
-
392
- ### Patches
393
-
394
- - Fix adding project to solution (derek.finlinson@journeyteam.com)
395
-
396
- ## 0.5.0
397
-
398
- Tue, 25 Aug 2020 22:05:30 GMT
399
-
400
- ### Minor changes
401
-
402
- - Add option to add VS solution (derek.finlinson@journeyteam.com)
403
-
404
- ## 0.4.0
405
-
406
- Wed, 19 Aug 2020 15:10:11 GMT
407
-
408
- ### Minor changes
409
-
410
- - Add deploy to webpack config (derek.finlinson@journeyteam.com)
411
-
412
- ## 0.3.6
413
-
414
- Tue, 21 Jul 2020 21:04:25 GMT
415
-
416
- ### Patches
417
-
418
- - Remove rename action (derek.finlinson@journeyteam.com)
419
-
420
- ## 0.3.5
421
-
422
- Tue, 21 Jul 2020 20:30:49 GMT
423
-
424
- ### Patches
425
-
426
- - Fix rename action (derek.finlinson@journeyteam.com)
427
-
428
- ## 0.3.4
429
-
430
- Tue, 21 Jul 2020 19:05:10 GMT
431
-
432
- ### Patches
433
-
434
- - Fix renaming (derek.finlinson@journeyteam.com)
435
-
436
- ## 0.3.3
437
-
438
- Mon, 20 Jul 2020 14:46:25 GMT
439
-
440
- ### Patches
441
-
442
- - Rename dot files (derek.finlinson@journeyteam.com)
443
-
444
- ## 0.3.2
445
-
446
- Mon, 20 Jul 2020 14:16:22 GMT
447
-
448
- ### Patches
449
-
450
- - Fix missing dependencies (derek.finlinson@journeyteam.com)
451
-
452
- ## 0.3.1
453
-
454
- Mon, 20 Jul 2020 13:55:48 GMT
455
-
456
- ### Patches
457
-
458
- - Add yargs as dependency (derek.finlinson@journeyteam.com)
459
-
460
- ## 0.3.0
461
-
462
- Sun, 19 Jul 2020 16:43:41 GMT
463
-
464
- ### Minor changes
465
-
466
- - Use new Nuget API URL (derek.finlinson@journeyteam.com)
467
-
468
- ## 0.2.0
469
-
470
- Thu, 16 Jul 2020 15:09:52 GMT
471
-
472
- ### Minor changes
473
-
474
- - Enable powerapps dependencies (derek.finlinson@journeyteam.com)
@@ -1,220 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
- var __importDefault = (this && this.__importDefault) || function (mod) {
22
- return (mod && mod.__esModule) ? mod : { "default": mod };
23
- };
24
- Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.done = void 0;
26
- const prompts_1 = __importDefault(require("prompts"));
27
- const nuget_1 = require("./nuget");
28
- const path_1 = __importDefault(require("path"));
29
- const plop_1 = require("./plop");
30
- const pkg = __importStar(require("./packageManager"));
31
- const getEnvInfo_1 = require("./getEnvInfo");
32
- const logger_1 = require("./logger");
33
- exports.default = async (type) => {
34
- await (0, getEnvInfo_1.initialize)();
35
- const name = path_1.default.basename(process.cwd());
36
- if (!type || (type !== 'webresource' && type !== 'assembly' && type !== 'pcf')) {
37
- const invalid = type !== undefined && type !== 'webresource' && type !== 'assembly' && type !== 'pcf';
38
- const invalidMessage = invalid ? `${type} is not a valid project type.` : '';
39
- const { promptType } = await (0, prompts_1.default)({
40
- type: 'select',
41
- name: 'promptType',
42
- message: `${invalidMessage} Select dataverse project to create?`,
43
- choices: [
44
- { title: 'web resource', value: 'webresource' },
45
- { title: 'plugin or workflow activity', value: 'assembly' },
46
- { title: 'powerapps component framework control', value: 'pcf' }
47
- ]
48
- });
49
- type = promptType;
50
- }
51
- const questions = await getAnswers(type);
52
- const config = (await (0, prompts_1.default)(questions));
53
- if (type === 'assembly') {
54
- const xrmVersions = await (0, nuget_1.getNugetPackageVersions)('JourneyTeam.Xrm');
55
- config.xrmVersion = xrmVersions.shift();
56
- }
57
- else if (type === 'webresource') {
58
- config.name = name;
59
- }
60
- const generator = await (0, plop_1.getGenerator)(type, name);
61
- logger_1.logger.info(`run powerapps-project-${type} code generator`);
62
- try {
63
- await (0, plop_1.runGenerator)(generator, config);
64
- }
65
- catch (ex) {
66
- logger_1.logger.error(ex.message);
67
- return;
68
- }
69
- logger_1.logger.info('initialize project');
70
- if (type !== 'pcf' || config.react) {
71
- pkg.install(process.cwd(), type);
72
- }
73
- if (type === 'assembly') {
74
- logger_1.logger.info('add nuget packages');
75
- (0, nuget_1.install)(config.name, config.sdkVersion, config.xrmVersion);
76
- }
77
- (0, exports.done)(type);
78
- };
79
- const getAnswers = async (type) => {
80
- let questions = [];
81
- if (type === 'pcf') {
82
- questions = [
83
- {
84
- type: 'select',
85
- name: 'template',
86
- message: 'template',
87
- choices: [
88
- { title: 'field', value: 'field' },
89
- { title: 'dataset', value: 'dataset' }
90
- ]
91
- },
92
- {
93
- type: 'text',
94
- name: 'namespace',
95
- message: 'namespace'
96
- },
97
- {
98
- type: 'text',
99
- name: 'name',
100
- message: 'name'
101
- },
102
- {
103
- type: 'confirm',
104
- name: 'react',
105
- message: 'install react?'
106
- }
107
- ];
108
- return questions;
109
- }
110
- if (type === 'webresource') {
111
- questions.push({
112
- type: 'text',
113
- name: 'namespace',
114
- message: 'namespace for form and ribbon scripts:'
115
- });
116
- }
117
- else {
118
- const versions = await (0, nuget_1.getNugetPackageVersions)('Microsoft.CrmSdk.Workflow');
119
- questions = [
120
- {
121
- type: 'select',
122
- name: 'sdkVersion',
123
- message: 'select sdk version',
124
- choices: versions.map(v => ({ title: v, value: v }))
125
- },
126
- {
127
- type: 'text',
128
- name: 'name',
129
- message: 'default namespace'
130
- },
131
- {
132
- type: 'select',
133
- name: 'isolation',
134
- message: 'select isolation mode',
135
- initial: 0,
136
- choices: [
137
- {
138
- title: 'sandbox',
139
- value: 2
140
- },
141
- {
142
- title: 'none',
143
- value: 1
144
- }
145
- ]
146
- }
147
- ];
148
- }
149
- questions = [
150
- ...questions,
151
- {
152
- type: 'text',
153
- name: 'server',
154
- message: 'enter dataverse url (https://org.crm.dynamics.com):'
155
- },
156
- {
157
- type: 'text',
158
- name: 'tenant',
159
- message: 'enter azure ad tenant (org.onmicrosoft.com):'
160
- },
161
- {
162
- type: 'text',
163
- name: 'solution',
164
- message: 'dataverse solution unique name:'
165
- }
166
- ];
167
- return questions;
168
- };
169
- const done = (type) => {
170
- if (process.env.JEST_WORKER_ID !== undefined) {
171
- return;
172
- }
173
- let message;
174
- if (type === 'pcf') {
175
- message = `
176
-
177
- ${logger_1.icons.done} ${type} project created!
178
-
179
- keep your build tools up-to-date by updating these two devDependencies:
180
- ${logger_1.icons.info} powerapps-project-${type}
181
-
182
- build your project in watch mode with this command:
183
- ${logger_1.icons.info} npm start watch
184
- build your project in production mode with this command:
185
- ${logger_1.icons.info} npm run build
186
-
187
- run code generator with this command:
188
- ${logger_1.icons.info} npm run gen
189
-
190
- `;
191
- }
192
- else {
193
- message = `
194
-
195
- ${logger_1.icons.done} ${type} project created!
196
-
197
- keep your build tools up-to-date by updating these two devDependencies:
198
- ${logger_1.icons.info} dataverse-utils
199
- ${logger_1.icons.info} powerapps-project-${type}
200
-
201
- ${type === 'webresource' ?
202
- `build your project in watch mode with this command:
203
- ${logger_1.icons.info} ${pkg.getYarn() ? 'yarn' : 'npm run'} start
204
- build your project in production mode with this command:
205
- ${logger_1.icons.info} ${pkg.getYarn() ? 'yarn' : 'npm run'} build
206
- generate table definition files with this command:
207
- ${logger_1.icons.info} ${pkg.getYarn() ? 'yarn' : 'npm run'} generate` :
208
- `build your project with this command:
209
- dotnet build
210
- deploy your project with this command:
211
- ${logger_1.icons.info} ${pkg.getYarn() ? 'yarn' : 'npm run'} deploy`}
212
-
213
- run code generator with this command:
214
- ${logger_1.icons.info} ${pkg.getYarn() ? 'yarn' : 'npm run'} gen
215
-
216
- `;
217
- }
218
- console.info(message);
219
- };
220
- exports.done = done;
package/lib/logger.js DELETED
@@ -1,36 +0,0 @@
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
- exports.logger = exports.icons = void 0;
7
- const kleur_1 = __importDefault(require("kleur"));
8
- const isTest = process.env.JEST_WORKER_ID !== undefined;
9
- exports.icons = {
10
- done: kleur_1.default.green('◉'),
11
- info: kleur_1.default.cyan('◎'),
12
- error: kleur_1.default.red('⨂'),
13
- warn: kleur_1.default.yellow('⨁')
14
- };
15
- exports.logger = {
16
- info(...args) {
17
- if (!isTest) {
18
- console.info(exports.icons.info, ...args);
19
- }
20
- },
21
- warn(...args) {
22
- if (!isTest) {
23
- console.warn(exports.icons.warn, ...args);
24
- }
25
- },
26
- error(...args) {
27
- if (!isTest) {
28
- console.error(exports.icons.error, ...args);
29
- }
30
- },
31
- done(...args) {
32
- if (!isTest) {
33
- console.info(exports.icons.done, ...args);
34
- }
35
- },
36
- };