@ibm-cloud/cd-tools 1.5.0 → 1.5.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.
@@ -8,7 +8,13 @@
8
8
  */
9
9
 
10
10
  import { exit } from 'node:process';
11
- import { resolve } from 'node:path';
11
+
12
+ import { resolve, dirname } from 'node:path';
13
+ import { fileURLToPath } from 'node:url';
14
+
15
+ const __filename = fileURLToPath(import.meta.url);
16
+ const __dirname = dirname(__filename);
17
+
12
18
  import fs from 'node:fs';
13
19
 
14
20
  import { Command, Option } from 'commander';
@@ -314,7 +320,8 @@ async function main(options) {
314
320
  fs.writeFileSync(resolve(`${outputDir}/create-s2s.json`), JSON.stringify(s2sRequests));
315
321
 
316
322
  // copy script
317
- fs.copyFileSync(resolve('create-s2s-script.js'), resolve(`${outputDir}/create-s2s-script.js`), fs.constants.COPYFILE_EXCL);
323
+ const s2sScript = fs.readFileSync(resolve(__dirname, '../create-s2s-script.js'));
324
+ fs.writeFileSync(resolve(`${outputDir}/create-s2s-script.js`), s2sScript);
318
325
  }
319
326
 
320
327
  // create toolchain, which invokes script to create s2s if applicable
@@ -7,8 +7,8 @@
7
7
  * Contract with IBM Corp.
8
8
  */
9
9
 
10
- import fs from 'node:fs';
11
- import { resolve } from 'node:path';
10
+ const fs = require('node:fs');
11
+ const { resolve } = require('node:path');
12
12
 
13
13
  const API_KEY = process.env['IBMCLOUD_API_KEY'];
14
14
  if (!API_KEY) throw Error(`Missing 'IBMCLOUD_API_KEY'`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibm-cloud/cd-tools",
3
- "version": "1.5.0",
3
+ "version": "1.5.2",
4
4
  "description": "Tools and utilities for the IBM Cloud Continuous Delivery service and resources",
5
5
  "repository": {
6
6
  "type": "git",