Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump oclif #33

Merged
merged 4 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9,668 changes: 5,857 additions & 3,811 deletions package-lock.json

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
},
"bugs": "https://github.com/Supernova-Studio/cli/issues",
"dependencies": {
"@oclif/core": "3.26.6",
"@oclif/plugin-help": "6.0.22",
"@oclif/plugin-plugins": "5.1.2",
"@oclif/core": "4.0.17",
"@oclif/plugin-help": "6.2.8",
"@oclif/plugin-plugins": "5.4.2",
"@supernova-studio/pulsar-core": "2.2.3",
"@supernovaio/sdk": "2.0.12",
"axios": "^1.6.2",
Expand All @@ -44,18 +44,18 @@
"@babel/preset-env": "^7.3.4",
"@babel/preset-react": "7.18.6",
"@babel/register": "^7.18.9",
"@oclif/test": "3.1.2",
"@oclif/test": "4.0.8",
"@types/chai": "^4",
"@types/colors": "^1.2.1",
"@types/mocha": "^9.0.0",
"@types/node": "^16.11.36",
"chai": "^4",
"eslint": "^7.32.0",
"eslint-config-oclif": "^4",
"eslint-config-oclif-typescript": "^1.0.2",
"eslint-config-oclif": "^5.2.1",
"eslint-config-oclif-typescript": "^3.1.9",
"globby": "^11",
"mocha": "^9",
"oclif": "4.11.3",
"oclif": "4.14.15",
"shx": "^0.3.3",
"ts-node": "10.9.1",
"tslib": "^2.3.1",
Expand Down
29 changes: 14 additions & 15 deletions test/describe-design-system.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,24 @@
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
// MARK: - Imports

import { expect, test } from "@oclif/test"
import * as path from "path"
import { runCommand } from "@oclif/test"
import { expect } from "chai"

// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
// MARK: - Tests

describe("describe-design-system", function () {
this.timeout(30000)
const commandAttributes = [
"describe-design-system",
`--apiKey=${process.env.TEST_API_KEY}`,
`--designSystemId=${process.env.TEST_DESIGN_SYSTEM_ID}`,
`--environment=${process.env.TEST_ENVIRONMENT}`,
]
it("should run command", async function () {
this.timeout(30000)
const commandAttributes = [
"describe-design-system",
`--apiKey=${process.env.TEST_API_KEY}`,
`--designSystemId=${process.env.TEST_DESIGN_SYSTEM_ID}`,
`--environment=${process.env.TEST_ENVIRONMENT}`,
]

test
.do((ctx) => {
console.log(commandAttributes.join(" \\\n "))
})
.command(commandAttributes)
.it()
const result = await runCommand(commandAttributes)
if (result.error) console.error(result.error);
expect(result.error).to.be.undefined;
})
})
20 changes: 10 additions & 10 deletions test/describe-workspaces.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
// MARK: - Imports

import { test } from "@oclif/test"
import { runCommand } from "@oclif/test"
import { expect } from "chai"

// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
// MARK: - Tests

describe("describe-workspaces", function () {
this.timeout(1200000)
const commandAttributes = ["describe-workspaces", `--apiKey=${process.env.TEST_API_KEY}`, `--environment=${process.env.TEST_ENVIRONMENT}`]
it("should run command", async function () {
this.timeout(1200000)
const commandAttributes = ["describe-workspaces", `--apiKey=${process.env.TEST_API_KEY}`, `--environment=${process.env.TEST_ENVIRONMENT}`]

test
.do((ctx) => {
console.log(commandAttributes.join(" \\\n "))
})
.command(commandAttributes)
.it()
})
const result = await runCommand(commandAttributes)
if (result.error) console.error(result.error);
expect(result.error).to.be.undefined;
})
});
34 changes: 19 additions & 15 deletions test/publish-documentation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,29 @@
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
// MARK: - Imports

import { test } from "@oclif/test"
import { runCommand } from "@oclif/test"
import { expect } from "chai";

// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
// MARK: - Tests

describe("publish-documentation", function () {
this.timeout(10000)
const commandAttributes = [
"publish-documentation",
`--apiKey=${process.env.TEST_API_KEY}`,
`--designSystemId=${process.env.TEST_DESIGN_SYSTEM_ID}`,
`--target=${process.env.TEST_DOC_ENVIRONMENT}`,
`--environment=${process.env.TEST_ENVIRONMENT}`,
]
it("should run command", async function() {
this.timeout(10000)
const commandAttributes = [
"publish-documentation",
`--apiKey=${process.env.TEST_API_KEY}`,
`--designSystemId=${process.env.TEST_DESIGN_SYSTEM_ID}`,
`--target=${process.env.TEST_DOC_ENVIRONMENT}`,
`--environment=${process.env.TEST_ENVIRONMENT}`,
]

test
.do((ctx) => {
console.log(commandAttributes.join(" \\\n "))
})
.command(commandAttributes)
.it()
const result = await runCommand(commandAttributes);
if (result.error) {
console.error("Command has failed")
console.error(commandAttributes.join("\n"))
console.error(result.error);
}
expect(result.error).to.be.undefined;
})
})
46 changes: 23 additions & 23 deletions test/run-exporter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,35 @@
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
// MARK: - Imports

import { expect, test } from "@oclif/test"
import { runCommand } from "@oclif/test"
import { expect } from "chai"
import * as path from "path"

// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
// MARK: - Tests

describe("run-local-exporter", function () {
this.timeout(10000)
let commandAttributes = [
"run-local-exporter",
`--apiKey=${process.env.TEST_API_KEY}`,
`--designSystemId=${process.env.TEST_DESIGN_SYSTEM_ID}`,
`--exporterDir=${path.join(process.cwd(), "test-resources", "exporter")}`,
`--outputDir=${path.join(process.cwd(), "test-resources", "exporter-output")}`,
`--environment=${process.env.TEST_ENVIRONMENT}`,
`--allowOverridingOutput`,
]
it("should run command", async function () {
this.timeout(10000)
let commandAttributes = [
"run-local-exporter",
`--apiKey=${process.env.TEST_API_KEY}`,
`--designSystemId=${process.env.TEST_DESIGN_SYSTEM_ID}`,
`--exporterDir=${path.join(process.cwd(), "test-resources", "exporter")}`,
`--outputDir=${path.join(process.cwd(), "test-resources", "exporter-output")}`,
`--environment=${process.env.TEST_ENVIRONMENT}`,
`--allowOverridingOutput`,
]

if (process.env.TEST_THEME_ID) {
commandAttributes.push(`--themeId=${process.env.TEST_THEME_ID}`)
}
if (process.env.TEST_BRAND_ID) {
commandAttributes.push(`--brandId=${process.env.TEST_BRAND_ID}`)
}
if (process.env.TEST_THEME_ID) {
commandAttributes.push(`--themeId=${process.env.TEST_THEME_ID}`)
}
if (process.env.TEST_BRAND_ID) {
commandAttributes.push(`--brandId=${process.env.TEST_BRAND_ID}`)
}

test
.do((ctx) => {
console.log(commandAttributes.join(" \\\n "))
})
.command(commandAttributes)
.it()
const result = await runCommand(commandAttributes);
if (result.error) console.error(result.error);
expect(result.error).to.be.undefined;
})
})
36 changes: 20 additions & 16 deletions test/sync-tokens.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,31 @@
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
// MARK: - Imports

import { expect, test } from "@oclif/test"
import { runCommand } from "@oclif/test"
import { expect } from "chai"
import * as path from "path"

// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
// MARK: - Tests

describe("sync-tokens-single-file", function () {
this.timeout(30000)
const commandAttributes = [
"sync-tokens",
`--apiKey=${process.env.TEST_API_KEY}`,
`--designSystemId=${process.env.TEST_SYNC_DESIGN_SYSTEM_ID}`,
`--tokenFilePath=${path.join(process.cwd(), "test-resources", "figma-tokens", "single-file-sync", "tokens.json")}`,
`--configFilePath=${path.join(process.cwd(), "test-resources", "figma-tokens", "single-file-sync", "supernova.settings.json")}`,
`--environment=${process.env.TEST_ENVIRONMENT}`,
]
it("should run command", async function () {
this.timeout(30000)
const commandAttributes = [
"sync-tokens",
`--apiKey=${process.env.TEST_API_KEY}`,
`--designSystemId=${process.env.TEST_SYNC_DESIGN_SYSTEM_ID}`,
`--tokenFilePath=${path.join(process.cwd(), "test-resources", "figma-tokens", "single-file-sync", "tokens.json")}`,
`--configFilePath=${path.join(process.cwd(), "test-resources", "figma-tokens", "single-file-sync", "supernova.settings.json")}`,
`--environment=${process.env.TEST_ENVIRONMENT}`,
]

test
.do((ctx) => {
console.log(commandAttributes.join(" \\\n "))
})
.command(commandAttributes)
.it()
const result = await runCommand(commandAttributes);
if (result.error) {
console.error("Command has failed")
console.error(commandAttributes.join("\n"))
console.error(result.error);
}
expect(result.error).to.be.undefined;
})
})
Loading
Loading