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

PF-178: Filtering by ids updated in describe commands #27

Merged
merged 4 commits into from
Mar 26, 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
32 changes: 32 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"schedule": [
"after 10pm every weekday",
"before 5am every weekday",
"every weekend"
],
"extends": [
"config:base"
],
"packageRules": [
{
"matchPackagePatterns": [
"*"
],
"enabled": false
},
{
"matchPackageNames": [
"@supernovaio/sdk",
"@supernova-studio/pulsar-core"
],
"groupName": "supernova packages",
"schedule": [
"* * * * *"
],
"prHourlyLimit": 0,
"enabled": true,
"bumpVersion": "patch"
}
]
}
3 changes: 3 additions & 0 deletions .github/workflows/notify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ jobs:
with:
node-version: lts/Hydrogen

- name: Authenticate with private NPM package
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN_READ_PACKAGES }}" > ~/.npmrc

- name: Install Slack bot
run: npm i -g @supernova-studio/ci-bot

Expand Down
7 changes: 5 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@supernovaio/cli",
"description": "Supernova.io Command Line Interface",
"version": "1.0.4",
"version": "1.0.5",
"author": "Supernova.io",
"homepage": "https://supernova.io/",
"keywords": [
Expand Down
4 changes: 2 additions & 2 deletions src/commands/describe-design-system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ export class DescribeDesignSystem extends Command {

this.log(`\n↳ Design system "${designSystem.name}", id: ${designSystem.id}`.cyan)
for (let brand of brands) {
this.log(` ↳ Brand: "${brand.name}", id: ${brand.idInVersion}`)
let brandThemes = themes.filter((t) => t.brandId === brand.idInVersion)
this.log(` ↳ Brand: "${brand.name}", id: ${brand.id}`)
let brandThemes = themes.filter((t) => t.brandId === brand.id)
if (brandThemes.length > 0) {
for (let theme of brandThemes) {
this.log(` ↳ Theme: "${theme.name}", id: ${theme.id}`)
Expand Down
4 changes: 2 additions & 2 deletions src/commands/describe-workspaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ export class DescribeWorkspaces extends Command {
let brands = await instance.brands.getBrands(id)
let themes = await instance.tokens.getTokenThemes(id)
for (let brand of brands) {
this.log(` ↳ Brand: "${brand.name}", id: ${brand.idInVersion}`)
let brandThemes = themes.filter((t) => t.brandId === brand.idInVersion)
this.log(` ↳ Brand: "${brand.name}", id: ${brand.id}`)
let brandThemes = themes.filter((t) => t.brandId === brand.id)
if (brandThemes.length > 0) {
for (let theme of brandThemes) {
this.log(` ↳ Theme: "${theme.name}", id: ${theme.id}`.gray)
Expand Down
2 changes: 1 addition & 1 deletion test-resources/exporter/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Pulsar.export(async (sdk: Supernova, context: PulsarContext): Promise<Array<AnyO
// Apply theme, if specified
if (context.themeId) {
const themes = await sdk.tokens.getTokenThemes(remoteVersionIdentifier)
const theme = themes.find((theme) => theme.id === context.themeId)
const theme = themes.find((theme) => theme.id === context.themeId || theme.idInVersion === context.themeId)
if (theme) {
tokens = await sdk.tokens.computeTokensByApplyingThemes(tokens, [theme])
} else {
Expand Down
Loading