Skip to content

Commit

Permalink
Merge pull request #27 from Supernova-Studio/sergii/pf-178
Browse files Browse the repository at this point in the history
PF-178: Filtering by ids updated in describe commands
  • Loading branch information
tchief authored Mar 26, 2024
2 parents 9b90815 + 0cea22a commit 9ce97d9
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 8 deletions.
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

0 comments on commit 9ce97d9

Please sign in to comment.