@supernovaio/cli 1.0.5 → 1.0.7
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
|
|
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
|
|
147
|
+
throw new Error('Unable to load mapping file: `verbose` must be of boolean type');
|
|
148
148
|
}
|
|
149
|
-
if (mapping.settings.hasOwnProperty('preciseCopy')
|
|
150
|
-
|
|
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
|
-
|
|
171
|
-
|
|
172
|
-
|
|
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,
|
package/oclif.manifest.json
CHANGED
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.
|
|
4
|
+
"version": "1.0.7",
|
|
5
5
|
"author": "Supernova.io",
|
|
6
6
|
"homepage": "https://supernova.io/",
|
|
7
7
|
"keywords": [
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
},
|
|
23
23
|
"bugs": "https://github.com/Supernova-Studio/cli/issues",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@oclif/core": "3.
|
|
26
|
-
"@oclif/plugin-help": "6.0.
|
|
27
|
-
"@oclif/plugin-plugins": "
|
|
25
|
+
"@oclif/core": "3.26.6",
|
|
26
|
+
"@oclif/plugin-help": "6.0.22",
|
|
27
|
+
"@oclif/plugin-plugins": "5.1.2",
|
|
28
28
|
"@supernova-studio/pulsar-core": "2.1.7",
|
|
29
29
|
"@supernovaio/sdk": "2.0.12",
|
|
30
30
|
"axios": "^1.6.2",
|
|
@@ -104,8 +104,8 @@
|
|
|
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
|
|
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"
|
|
111
|
-
}
|
|
111
|
+
}
|