@supernovaio/cli 0.10.1 → 0.10.31
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.
|
@@ -22,6 +22,7 @@ class SyncDesignTokens extends core_1.Command {
|
|
|
22
22
|
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
23
23
|
// MARK: - Command runtime
|
|
24
24
|
async run() {
|
|
25
|
+
var _a;
|
|
25
26
|
const { args, flags } = await this.parse(SyncDesignTokens);
|
|
26
27
|
// Get workspace -> design system –> version
|
|
27
28
|
let connected = await this.getWritableVersion(flags);
|
|
@@ -42,7 +43,12 @@ class SyncDesignTokens extends core_1.Command {
|
|
|
42
43
|
let tokenDefinition = flags.tokenDirPath
|
|
43
44
|
? await dataLoader.loadTokensFromDirectory(flags.tokenDirPath, flags.configFilePath)
|
|
44
45
|
: await dataLoader.loadTokensFromPath(flags.tokenFilePath);
|
|
45
|
-
await connected.version.writer().writeTokenStudioData(buildData(tokenDefinition));
|
|
46
|
+
const response = await connected.version.writer().writeTokenStudioData(buildData(tokenDefinition));
|
|
47
|
+
if (((_a = response === null || response === void 0 ? void 0 : response.result) === null || _a === void 0 ? void 0 : _a.logs) && response.result.logs.length > 0) {
|
|
48
|
+
for (const log of response.result.logs) {
|
|
49
|
+
this.log(log);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
46
52
|
this.log(`Tokens synchronized`);
|
|
47
53
|
}
|
|
48
54
|
async getWritableVersion(flags) {
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.10.
|
|
1
|
+
{"version":"0.10.31","commands":{"describe-design-system":{"id":"describe-design-system","description":"Describe structure of single design system by provided ID","strict":true,"pluginName":"@supernovaio/cli","pluginAlias":"@supernovaio/cli","pluginType":"core","aliases":[],"examples":["$ @supernovaio/cli describe-design-system --apiKey=\"{xxx-xxx-xxx}\" --designSystemId=\"{1234}\""],"flags":{"apiKey":{"name":"apiKey","type":"option","description":"API key to use for accessing Supernova instance","required":true,"multiple":false},"designSystemId":{"name":"designSystemId","type":"option","description":"Design System to describe structure of","required":true,"multiple":false},"dev":{"name":"dev","type":"boolean","description":"When enabled, CLI will target dev server","hidden":true,"allowNo":false}},"args":[],"_globalFlags":{}},"describe-workspaces":{"id":"describe-workspaces","description":"Describe structure of all workspaces and design systems available under those workspaces available for specified API key","strict":true,"pluginName":"@supernovaio/cli","pluginAlias":"@supernovaio/cli","pluginType":"core","aliases":[],"examples":["$ @supernovaio/cli describe-workspaces --apiKey=\"{xxx-xxx-xxx}\""],"flags":{"apiKey":{"name":"apiKey","type":"option","description":"API key to use for accessing Supernova instance","required":true,"multiple":false},"dev":{"name":"dev","type":"boolean","description":"When enabled, CLI will target dev server","hidden":true,"allowNo":false}},"args":[],"_globalFlags":{}},"publish-documentation":{"id":"publish-documentation","description":"Publish latest version of the documentation","strict":true,"pluginName":"@supernovaio/cli","pluginAlias":"@supernovaio/cli","pluginType":"core","aliases":[],"examples":["$ @supernovaio/cli publish-documentation --apiKey=\"{xxx-xxx-xxx}\" --designSystemId=\"{1234}\""],"flags":{"apiKey":{"name":"apiKey","type":"option","description":"API key to use for accessing Supernova instance","required":true,"multiple":false},"designSystemId":{"name":"designSystemId","type":"option","description":"Design System to publish the documentation","required":true,"multiple":false},"dev":{"name":"dev","type":"boolean","description":"When enabled, CLI will target dev server","hidden":true,"allowNo":false},"environment":{"name":"environment","type":"option","description":"Environment to use for publishing: Live or Preview","required":false,"multiple":false,"default":"Live"}},"args":[],"_globalFlags":{}},"sync-tokens":{"id":"sync-tokens","description":"Synchronize tokens from Figma Tokens plugin to Supernova workspaces","strict":true,"pluginName":"@supernovaio/cli","pluginAlias":"@supernovaio/cli","pluginType":"core","aliases":[],"examples":["$ @supernovaio/cli sync-tokens --apiKey=\"{xxx-xxx-xxx}\" --designSystemId={1234} --tokenFilePath \"/path/to/tokens.json\" --configFilePath \"/path/to/config.json\"","$ @supernovaio/cli sync-tokens --apiKey=\"{xxx-xxx-xxx}\" --designSystemId={1234} --tokenDirPath \"/path/to/tokens/\" --configFilePath \"/path/to/config.json\""],"flags":{"apiKey":{"name":"apiKey","type":"option","description":"API key to use for accessing Supernova instance","required":true,"multiple":false},"designSystemId":{"name":"designSystemId","type":"option","description":"Design System to synchronize contents with","required":true,"multiple":false},"tokenFilePath":{"name":"tokenFilePath","type":"option","description":"Path to JSON file containing token definitions","multiple":false},"tokenDirPath":{"name":"tokenDirPath","type":"option","description":"Path to directory of JSON files containing token definitions","multiple":false},"configFilePath":{"name":"configFilePath","type":"option","description":"Path to configuration JSON file","required":true,"multiple":false,"exclusive":[]},"dev":{"name":"dev","type":"boolean","description":"When enabled, CLI will target dev server","hidden":true,"allowNo":false},"dry":{"name":"dry","type":"boolean","description":"When enabled, dry run will be performed and tokens won't write into workspace. This settings overrides settings inside configuration files.","hidden":false,"allowNo":false},"apiUrl":{"name":"apiUrl","type":"option","description":"API url to use for accessing Supernova instance, would ignore defaults","hidden":true,"multiple":false}},"args":[],"_globalFlags":{}}}}
|
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": "0.10.
|
|
4
|
+
"version": "0.10.31",
|
|
5
5
|
"author": "Supernova.io",
|
|
6
6
|
"homepage": "https://supernova.io/",
|
|
7
7
|
"keywords": [
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@oclif/core": "^1",
|
|
26
26
|
"@oclif/plugin-help": "^5",
|
|
27
27
|
"@oclif/plugin-plugins": "^2.0.1",
|
|
28
|
-
"@supernovaio/supernova-sdk": "1.
|
|
28
|
+
"@supernovaio/supernova-sdk": "1.9.5",
|
|
29
29
|
"chalk": "^5.0.1",
|
|
30
30
|
"node-fetch": "^3.2.4",
|
|
31
31
|
"dotenv": "^16.0.0"
|