@tywalk/pcf-helper 1.3.0 → 1.3.1

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/deploy.js CHANGED
@@ -19,12 +19,6 @@ if (typeof path === 'undefined') {
19
19
  return 0;
20
20
  }
21
21
 
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
22
  const envArgument = args.find(a => ['-env', '--environment'].includes(a));
29
23
  let envIndex = args.indexOf(envArgument) + 1;
30
24
  let env = '';
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.1",
4
4
  "description": "Command line helper for building and publishing PCF controls to Dataverse.",
5
5
  "scripts": {
6
6
  "test": "node test.js"
@@ -1,10 +1,19 @@
1
1
  const { spawnSync } = require('child_process');
2
+ const { join, extname } = require('path');
3
+ const fs = require('fs');
2
4
 
3
5
  function run(path, env) {
4
6
  if (!env) {
5
7
  console.warn('Path argument not provided. Assuming active auth profile organization.');
6
8
  }
7
- const task = spawnSync('pac solution import', ['-env', env, '-p', path, '-pc'], {
9
+
10
+ const zipDirPath = join(path, '/bin/release');
11
+ // const zipDirPath = join(path, '');
12
+ const zipDirFiles = fs.readdirSync(zipDirPath);
13
+ const zipFile = zipDirFiles.find(file => extname(file).toLowerCase() === '.zip');
14
+ const zipFilePath = join(zipDirPath, zipFile);
15
+
16
+ const task = spawnSync('pac solution import', ['-env', env, '-p', zipFilePath, '-pc'], {
8
17
  cwd: process.cwd(),
9
18
  stdio: 'inherit',
10
19
  shell: true