datagrok-tools 4.7.3 → 4.7.4

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.
@@ -79,23 +79,25 @@ function test(args) {
79
79
  var packageData = JSON.parse(_fs["default"].readFileSync(_path["default"].join(curDir, 'package.json'), {
80
80
  encoding: 'utf-8'
81
81
  }));
82
- var fullName = packageData.friendlyName || packageData.fullName;
83
82
 
84
- if (fullName) {
85
- fullName = utils.friendlyNameToName(utils.kebabToCamelCase(fullName));
86
- process.env.TARGET_PACKAGE = fullName;
83
+ if (packageData.name) {
84
+ process.env.TARGET_PACKAGE = utils.kebabToCamelCase(utils.removeScope(packageData.name));
87
85
  console.log('Environment variable `TARGET_PACKAGE` is set to', process.env.TARGET_PACKAGE);
88
86
  } else {
89
- color.error('Invalid full package name. Set `friendlyName` or `fullName` field in `package.json`');
87
+ color.error('Invalid package name. Set the `name` field in `package.json`');
90
88
  return false;
91
89
  }
92
90
 
93
91
  color.info("Building package...");
94
92
  (0, _child_process.exec)('npm run build', function (err, stdout, stderr) {
95
- if (err) throw err;else {
93
+ if (err) {
94
+ console.log(stdout);
95
+ throw err;
96
+ } else {
96
97
  console.log(stdout);
97
98
  color.warn(stderr);
98
99
  }
100
+
99
101
  color.info("Publishing package \"".concat(process.env.TARGET_PACKAGE, "\" to ").concat(process.env.HOST, "..."));
100
102
  (0, _child_process.exec)("grok publish ".concat(process.platform === 'win32' ? '%HOST%' : '${HOST}'), function (err, stdout, stderr) {
101
103
  if (err) throw err;else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datagrok-tools",
3
- "version": "4.7.3",
3
+ "version": "4.7.4",
4
4
  "description": "Utility to upload and publish packages to Datagrok",
5
5
  "homepage": "https://github.com/datagrok-ai/public/tree/master/tools#readme",
6
6
  "dependencies": {