@supernovaio/cli 1.0.5 → 1.0.6

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.
@@ -141,18 +141,20 @@ class FigmaTokensDataLoader {
141
141
  throw new Error('Unable to load mapping file: `settings` must be an object');
142
142
  }
143
143
  if (mapping.settings.hasOwnProperty('dryRun') && typeof mapping.settings.dryRun !== 'boolean') {
144
- throw new Error('Unable to load mapping file: `dryRun` must be of boolan type');
144
+ throw new Error('Unable to load mapping file: `dryRun` must be of boolean type');
145
145
  }
146
146
  if (mapping.settings.hasOwnProperty('verbose') && typeof mapping.settings.verbose !== 'boolean') {
147
- throw new Error('Unable to load mapping file: `verbose` must be of boolan type');
147
+ throw new Error('Unable to load mapping file: `verbose` must be of boolean type');
148
148
  }
149
- if (mapping.settings.hasOwnProperty('preciseCopy') && typeof mapping.settings.preciseCopy !== 'boolean') {
150
- throw new Error('Unable to load mapping file: `preciseCopy` must be of boolan type');
149
+ if (mapping.settings.hasOwnProperty('preciseCopy')
150
+ && typeof mapping.settings.preciseCopy !== 'boolean'
151
+ && typeof mapping.settings.preciseCopy !== "string") {
152
+ throw new Error('Unable to load mapping file: `preciseCopy` must be of boolean or string type');
151
153
  }
152
154
  }
153
155
  }
154
156
  processFileToMapping(mapping) {
155
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
157
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
156
158
  let result = new Array();
157
159
  for (let map of mapping.mapping) {
158
160
  result.push({
@@ -167,9 +169,10 @@ class FigmaTokensDataLoader {
167
169
  });
168
170
  }
169
171
  let settings = {
170
- dryRun: (_e = (_d = mapping.settings) === null || _d === void 0 ? void 0 : _d.dryRun) !== null && _e !== void 0 ? _e : false,
171
- verbose: (_g = (_f = mapping.settings) === null || _f === void 0 ? void 0 : _f.verbose) !== null && _g !== void 0 ? _g : false,
172
- preciseCopy: (_j = (_h = mapping.settings) === null || _h === void 0 ? void 0 : _h.preciseCopy) !== null && _j !== void 0 ? _j : false
172
+ ...((_d = mapping.settings) !== null && _d !== void 0 ? _d : {}),
173
+ dryRun: (_f = (_e = mapping.settings) === null || _e === void 0 ? void 0 : _e.dryRun) !== null && _f !== void 0 ? _f : false,
174
+ verbose: (_h = (_g = mapping.settings) === null || _g === void 0 ? void 0 : _g.verbose) !== null && _h !== void 0 ? _h : false,
175
+ preciseCopy: (_k = (_j = mapping.settings) === null || _j === void 0 ? void 0 : _j.preciseCopy) !== null && _k !== void 0 ? _k : false
173
176
  };
174
177
  return {
175
178
  mapping: result,
@@ -405,5 +405,5 @@
405
405
  ]
406
406
  }
407
407
  },
408
- "version": "1.0.5"
408
+ "version": "1.0.6"
409
409
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@supernovaio/cli",
3
3
  "description": "Supernova.io Command Line Interface",
4
- "version": "1.0.5",
4
+ "version": "1.0.6",
5
5
  "author": "Supernova.io",
6
6
  "homepage": "https://supernova.io/",
7
7
  "keywords": [
@@ -104,7 +104,7 @@
104
104
  "lint": "eslint . --ext .ts --config .eslintrc",
105
105
  "postpack": "shx rm -f oclif.manifest.json",
106
106
  "prepack": "yarn build && oclif manifest",
107
- "test": "DEBUG=* && npm run build && env TS_NODE_PROJECT=\"tsconfig.testing.json\" mocha --require ts-node/register --forbid-only \"test/**/*.test.ts\"",
107
+ "test": "DEBUG=* && npm run build && env TS_NODE_PROJECT=\"tsconfig.testing.json\" mocha --require ts-node/register --forbid-only \"test/**/sync-tokens.test.ts\"",
108
108
  "publish-package": "npm run build && npm run prepack && npm publish --access public && npm run postpack"
109
109
  },
110
110
  "types": "dist/index.d.ts"