diff --git a/.github/renovate.json b/.github/renovate.json new file mode 100644 index 0000000..babb041 --- /dev/null +++ b/.github/renovate.json @@ -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" + } + ] +} \ No newline at end of file diff --git a/.github/workflows/notify.yml b/.github/workflows/notify.yml index f2fb81f..bf9b7df 100644 --- a/.github/workflows/notify.yml +++ b/.github/workflows/notify.yml @@ -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 diff --git a/package-lock.json b/package-lock.json index 49f26ea..ce94fff 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@supernovaio/cli", - "version": "1.0.4", + "version": "1.0.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@supernovaio/cli", - "version": "1.0.4", + "version": "1.0.5", "bundleDependencies": [ "@supernova-studio/pulsar-core", "@supernova-studio/simple-parse-github-url", @@ -4308,6 +4308,7 @@ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", "integrity": "sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==", "inBundle": true, + "license": "MIT", "dependencies": { "debug": "^4.3.4" }, @@ -4320,6 +4321,7 @@ "resolved": "https://registry.npmjs.org/async-mutex/-/async-mutex-0.3.2.tgz", "integrity": "sha512-HuTK7E7MT7jZEh1P9GtRW9+aTWiDWWi9InbZ5hjxrnRa39KS4BW04+xLBhYNS2aXhHUIKZSw3gj4Pn1pj+qGAA==", "inBundle": true, + "license": "MIT", "dependencies": { "tslib": "^2.3.1" } @@ -4329,6 +4331,7 @@ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", "inBundle": true, + "license": "MIT", "dependencies": { "agent-base": "^7.0.2", "debug": "4" diff --git a/package.json b/package.json index e50d1a3..ac9ac9d 100644 --- a/package.json +++ b/package.json @@ -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": [ diff --git a/src/commands/describe-design-system.ts b/src/commands/describe-design-system.ts index 41302a0..7c1cb57 100644 --- a/src/commands/describe-design-system.ts +++ b/src/commands/describe-design-system.ts @@ -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}`) diff --git a/src/commands/describe-workspaces.ts b/src/commands/describe-workspaces.ts index e03fba8..2c4675b 100644 --- a/src/commands/describe-workspaces.ts +++ b/src/commands/describe-workspaces.ts @@ -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) diff --git a/test-resources/exporter/src/index.ts b/test-resources/exporter/src/index.ts index 7c181bb..e991901 100644 --- a/test-resources/exporter/src/index.ts +++ b/test-resources/exporter/src/index.ts @@ -37,7 +37,7 @@ Pulsar.export(async (sdk: Supernova, context: PulsarContext): Promise 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 {