@tywalk/pcf-helper 1.3.0 → 1.3.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/README.md CHANGED
@@ -18,9 +18,9 @@ This tool requires the following:
18
18
 
19
19
  ```json
20
20
  "scripts": {
21
- "upgrade": "pcf-helper-upgrade",
22
- "build": "pcf-helper-build",
23
- "import": "pcf-helper-import",
24
- "deploy": "pcf-helper-deploy"
21
+ "upgrade": "pcf-helper-upgrade --path <path to pcf project folder>",
22
+ "build": "pcf-helper-build --path <path to pcf project folder>",
23
+ "import": "pcf-helper-import --path <path to pcf project folder> --environment <environment guid or url>",
24
+ "deploy": "pcf-helper-deploy --path <path to pcf project folder> --environment <environment guid or url>"
25
25
  },
26
26
  ```
package/bin/build.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- const task = require('../tasks/build-pcf');
2
+ const task = require('../../../tasks/build-pcf');
3
3
  const [, , ...args] = process.argv;
4
4
 
5
5
  const pathArgument = args.find(a => ['-p', '--path'].includes(a));
package/bin/deploy.js CHANGED
@@ -1,9 +1,7 @@
1
1
  #!/usr/bin/env node
2
- const upgradeTask = require('../tasks/upgrade-pcf');
3
- const buildTask = require('../tasks/build-pcf');
4
- const importTask = require('../tasks/import-pcf');
5
- const fs = require('fs');
6
- const { join, extname } = require('path');
2
+ const upgradeTask = require('../../../tasks/upgrade-pcf');
3
+ const buildTask = require('../../../tasks/build-pcf');
4
+ const importTask = require('../../../tasks/import-pcf');
7
5
  const [, , ...args] = process.argv;
8
6
 
9
7
  const pathArgument = args.find(a => ['-p', '--path'].includes(a));
@@ -19,12 +17,6 @@ if (typeof path === 'undefined') {
19
17
  return 0;
20
18
  }
21
19
 
22
- const zipDirPath = join(path, '/bin/release');
23
- // const zipDirPath = join(path, '');
24
- const zipDirFiles = fs.readdirSync(zipDirPath);
25
- const zipFile = zipDirFiles.find(file => extname(file).toLowerCase() === '.zip');
26
- console.log(join(zipDirPath, zipFile));
27
-
28
20
  const envArgument = args.find(a => ['-env', '--environment'].includes(a));
29
21
  let envIndex = args.indexOf(envArgument) + 1;
30
22
  let env = '';
package/bin/import.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- const task = require('../tasks/import-pcf');
2
+ const task = require('../../../tasks/import-pcf');
3
3
  const [, , ...args] = process.argv;
4
4
 
5
5
  const pathArgument = args.find(a => ['-p', '--path'].includes(a));
package/bin/upgrade.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- const task = require('../tasks/upgrade-pcf');
2
+ const task = require('../../../tasks/upgrade-pcf');
3
3
  const [, , ...args] = process.argv;
4
4
 
5
5
  const pathArgument = args.find(a => ['-p', '--path'].includes(a));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tywalk/pcf-helper",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "description": "Command line helper for building and publishing PCF controls to Dataverse.",
5
5
  "scripts": {
6
6
  "test": "node test.js"
@@ -15,4 +15,4 @@
15
15
  "pcf-helper-import": "bin/import.js",
16
16
  "pcf-helper-deploy": "bin/deploy.js"
17
17
  }
18
- }
18
+ }
@@ -1,13 +0,0 @@
1
- const { spawnSync } = require('child_process');
2
-
3
- function run(path) {
4
- const task = spawnSync('dotnet build', ['--restore', '-c', 'Release', path], {
5
- cwd: process.cwd(),
6
- stdio: 'inherit',
7
- shell: true
8
- });
9
-
10
- console.log('Build complete!: ', task.status);
11
- }
12
-
13
- exports.run = run;
@@ -1,16 +0,0 @@
1
- const { spawnSync } = require('child_process');
2
-
3
- function run(path, env) {
4
- if (!env) {
5
- console.warn('Path argument not provided. Assuming active auth profile organization.');
6
- }
7
- const task = spawnSync('pac solution import', ['-env', env, '-p', path, '-pc'], {
8
- cwd: process.cwd(),
9
- stdio: 'inherit',
10
- shell: true
11
- });
12
-
13
- console.log('Import complete!: ', task.status);
14
- }
15
-
16
- exports.run = run;
@@ -1,13 +0,0 @@
1
- const { spawnSync } = require('child_process');
2
-
3
- function run(path) {
4
- const task = spawnSync(`pac solution version -s Solution -sp ${path} && pac pcf version -s Manifest && npm version patch`, {
5
- cwd: process.cwd(),
6
- stdio: 'inherit',
7
- shell: true
8
- });
9
-
10
- console.log('Upgrade complete!: ', task.status);
11
- }
12
-
13
- exports.run = run;
package/test.js DELETED
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env node
2
- const { spawnSync } = require('child_process');
3
- console.log(process.cwd());
4
- const task = spawnSync('ls bin', {
5
- cwd: process.cwd(),
6
- shell: true
7
- });
8
-
9
- console.log('Test complete!: ', task.status);