@supernovaio/cli 1.0.10 → 1.1.1
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.
- package/dist/commands/publish-documentation.js +25 -3
- package/dist/utils/figma-tokens-data-loader.js +51 -49
- package/node_modules/@supernova-studio/pulsar-core/build/main/pulsar-core.js +2 -2
- package/node_modules/@supernova-studio/pulsar-core/package.json +8 -26
- package/node_modules/@supernova-studio/pulsar-language/build/main/language/src/extensions/dsm/DSMBridge.d.ts +4 -0
- package/node_modules/@supernova-studio/pulsar-language/build/main/pulsar-language.js +1 -1
- package/node_modules/@supernova-studio/pulsar-language/package.json +7 -22
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/SDKDocumentation.d.ts +4 -4
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/data/SDKDataCore.d.ts +2 -2
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/exports.d.ts +1 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/SDKDocumentationPageBlock.d.ts +11 -4
- package/node_modules/@supernovaio/supernova-sdk/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockAssetGroup.d.ts +25 -0
- package/node_modules/@supernovaio/supernova-sdk/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockGuideline.d.ts +11 -0
- package/node_modules/@supernovaio/supernova-sdk/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockGuidelineProps.d.ts +17 -0
- package/node_modules/@supernovaio/supernova-sdk/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockGuidelines.d.ts +8 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockImage.d.ts +2 -0
- package/node_modules/@supernovaio/supernova-sdk/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockSwatch.d.ts +9 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKDocumentationPageBlockType.d.ts +3 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/markdown-transform/SDKToolsMarkdownTransformBlock.d.ts +6 -0
- package/node_modules/@supernovaio/supernova-sdk/build/sdk-typescript/tsconfig.tsbuildinfo +6395 -0
- package/node_modules/@supernovaio/supernova-sdk/build/supernova-sdk-typescript.js +1 -1
- package/node_modules/@supernovaio/supernova-sdk/build/supernova-sdk-typescript.js.map +1 -1
- package/node_modules/@supernovaio/supernova-sdk/package.json +7 -8
- package/node_modules/axios/CHANGELOG.md +895 -746
- package/node_modules/axios/README.md +37 -42
- package/node_modules/axios/dist/axios.js +1168 -299
- package/node_modules/axios/dist/axios.js.map +1 -1
- package/node_modules/axios/dist/axios.min.js +1 -1
- package/node_modules/axios/dist/axios.min.js.map +1 -1
- package/node_modules/axios/dist/browser/axios.cjs +810 -315
- package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
- package/node_modules/axios/dist/esm/axios.js +810 -315
- package/node_modules/axios/dist/esm/axios.js.map +1 -1
- package/node_modules/axios/dist/esm/axios.min.js +1 -1
- package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
- package/node_modules/axios/dist/node/axios.cjs +824 -396
- package/node_modules/axios/dist/node/axios.cjs.map +1 -1
- package/node_modules/axios/index.d.cts +5 -2
- package/node_modules/axios/index.d.ts +5 -2
- package/node_modules/axios/lib/adapters/adapters.js +3 -1
- package/node_modules/axios/lib/adapters/fetch.js +229 -0
- package/node_modules/axios/lib/adapters/http.js +27 -17
- package/node_modules/axios/lib/adapters/xhr.js +36 -99
- package/node_modules/axios/lib/cancel/CancelToken.js +14 -0
- package/node_modules/axios/lib/core/Axios.js +9 -6
- package/node_modules/axios/lib/core/AxiosError.js +5 -2
- package/node_modules/axios/lib/core/AxiosHeaders.js +4 -0
- package/node_modules/axios/lib/defaults/index.js +7 -2
- package/node_modules/axios/lib/env/data.js +1 -1
- package/node_modules/axios/lib/helpers/AxiosTransformStream.js +3 -51
- package/node_modules/axios/lib/helpers/composeSignals.js +48 -0
- package/node_modules/axios/lib/helpers/isURLSameOrigin.js +1 -1
- package/node_modules/axios/lib/helpers/progressEventReducer.js +44 -0
- package/node_modules/axios/lib/helpers/resolveConfig.js +57 -0
- package/node_modules/axios/lib/helpers/throttle.js +30 -19
- package/node_modules/axios/lib/helpers/trackStream.js +87 -0
- package/node_modules/axios/lib/platform/common/utils.js +9 -5
- package/node_modules/axios/lib/utils.js +40 -3
- package/node_modules/axios/package.json +4 -3
- package/node_modules/{@supernovaio/supernova-sdk/node_modules/https-proxy-agent → https-proxy-agent}/dist/index.d.ts.map +1 -1
- package/node_modules/{@supernovaio/supernova-sdk/node_modules/https-proxy-agent → https-proxy-agent}/dist/index.js +2 -2
- package/node_modules/https-proxy-agent/dist/index.js.map +1 -0
- package/node_modules/{@supernovaio/supernova-sdk/node_modules/https-proxy-agent → https-proxy-agent}/package.json +2 -2
- package/oclif.manifest.json +1 -1
- package/package.json +108 -108
- package/node_modules/@supernova-studio/pulsar-core/node_modules/agent-base/README.md +0 -95
- package/node_modules/@supernova-studio/pulsar-core/node_modules/agent-base/dist/index.d.ts +0 -38
- package/node_modules/@supernova-studio/pulsar-core/node_modules/agent-base/dist/index.d.ts.map +0 -1
- package/node_modules/@supernova-studio/pulsar-core/node_modules/agent-base/dist/index.js +0 -112
- package/node_modules/@supernova-studio/pulsar-core/node_modules/agent-base/dist/index.js.map +0 -1
- package/node_modules/@supernova-studio/pulsar-core/node_modules/agent-base/package.json +0 -49
- package/node_modules/@supernova-studio/pulsar-core/node_modules/https-proxy-agent/README.md +0 -97
- package/node_modules/@supernova-studio/pulsar-core/node_modules/https-proxy-agent/dist/index.d.ts +0 -46
- package/node_modules/@supernova-studio/pulsar-core/node_modules/https-proxy-agent/dist/index.d.ts.map +0 -1
- package/node_modules/@supernova-studio/pulsar-core/node_modules/https-proxy-agent/dist/index.js +0 -174
- package/node_modules/@supernova-studio/pulsar-core/node_modules/https-proxy-agent/dist/index.js.map +0 -1
- package/node_modules/@supernova-studio/pulsar-core/node_modules/https-proxy-agent/package.json +0 -50
- package/node_modules/@supernova-studio/pulsar-language/node_modules/agent-base/dist/helpers.d.ts +0 -15
- package/node_modules/@supernova-studio/pulsar-language/node_modules/agent-base/dist/helpers.d.ts.map +0 -1
- package/node_modules/@supernova-studio/pulsar-language/node_modules/agent-base/dist/helpers.js +0 -66
- package/node_modules/@supernova-studio/pulsar-language/node_modules/agent-base/dist/helpers.js.map +0 -1
- package/node_modules/@supernova-studio/pulsar-language/node_modules/https-proxy-agent/dist/index.d.ts.map +0 -1
- package/node_modules/@supernova-studio/pulsar-language/node_modules/https-proxy-agent/dist/index.js +0 -175
- package/node_modules/@supernova-studio/pulsar-language/node_modules/https-proxy-agent/dist/index.js.map +0 -1
- package/node_modules/@supernova-studio/pulsar-language/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +0 -15
- package/node_modules/@supernova-studio/pulsar-language/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts.map +0 -1
- package/node_modules/@supernova-studio/pulsar-language/node_modules/https-proxy-agent/dist/parse-proxy-response.js +0 -101
- package/node_modules/@supernova-studio/pulsar-language/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +0 -1
- package/node_modules/@supernova-studio/pulsar-language/node_modules/https-proxy-agent/package.json +0 -50
- package/node_modules/@supernovaio/supernova-sdk/node_modules/agent-base/LICENSE +0 -22
- package/node_modules/@supernovaio/supernova-sdk/node_modules/agent-base/README.md +0 -69
- package/node_modules/@supernovaio/supernova-sdk/node_modules/agent-base/dist/helpers.d.ts +0 -15
- package/node_modules/@supernovaio/supernova-sdk/node_modules/agent-base/dist/helpers.d.ts.map +0 -1
- package/node_modules/@supernovaio/supernova-sdk/node_modules/agent-base/dist/helpers.js +0 -66
- package/node_modules/@supernovaio/supernova-sdk/node_modules/agent-base/dist/helpers.js.map +0 -1
- package/node_modules/@supernovaio/supernova-sdk/node_modules/agent-base/dist/index.d.ts +0 -41
- package/node_modules/@supernovaio/supernova-sdk/node_modules/agent-base/dist/index.d.ts.map +0 -1
- package/node_modules/@supernovaio/supernova-sdk/node_modules/agent-base/dist/index.js +0 -175
- package/node_modules/@supernovaio/supernova-sdk/node_modules/agent-base/dist/index.js.map +0 -1
- package/node_modules/@supernovaio/supernova-sdk/node_modules/agent-base/package.json +0 -49
- package/node_modules/@supernovaio/supernova-sdk/node_modules/https-proxy-agent/LICENSE +0 -22
- package/node_modules/@supernovaio/supernova-sdk/node_modules/https-proxy-agent/README.md +0 -70
- package/node_modules/@supernovaio/supernova-sdk/node_modules/https-proxy-agent/dist/index.d.ts +0 -47
- package/node_modules/@supernovaio/supernova-sdk/node_modules/https-proxy-agent/dist/index.js.map +0 -1
- package/node_modules/@supernovaio/supernova-sdk/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +0 -15
- package/node_modules/@supernovaio/supernova-sdk/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts.map +0 -1
- package/node_modules/@supernovaio/supernova-sdk/node_modules/https-proxy-agent/dist/parse-proxy-response.js +0 -101
- package/node_modules/@supernovaio/supernova-sdk/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +0 -1
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/browser-bundle.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/SDKBrand.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/SDKBrandWriter.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/SDKDesignSystem.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/SDKDesignSystemVersion.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/SDKDesignSystemVersionWriter.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/SDKSupernova.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/SDKWorkspace.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/data/SDKConfiguration.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/data/SDKDataBridge.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/errors/SDKSupernovaError.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/resolvers/SDKAssetGroupResolver.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/resolvers/SDKComponentResolver.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/resolvers/SDKDesignComponentGroupResolver.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/resolvers/SDKDocumentationItemResolver.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/resolvers/SDKTokenGroupResolver.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/resolvers/SDKTokenResolver.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/index.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/assets/SDKAsset.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/assets/SDKRenderedAsset.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/components/SDKComponent.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/components/SDKDesignComponent.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/SDKDocumentationConfiguration.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/SDKDocumentationGroup.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/SDKDocumentationItem.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/SDKDocumentationPage.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/SDKDocumentationPageAsset.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/SDKDocumentationRichText.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/SDKDocumentationRichTextSpan.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/SDKDocumentationRichTextSpanAttribute.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockAsset.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockAssets.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockCallout.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockCode.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockColumn.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockColumnItem.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockCustom.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockDivider.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockEmbedFigma.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockEmbedGeneric.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockEmbedLink.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockEmbedStorybook.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockEmbedYoutube.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockFrame.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockFrames.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockHeading.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockOrderedList.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockQuote.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockRenderCode.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockShortcut.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockShortcuts.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockTab.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockTabItem.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockTable.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockTableCell.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockTableColumn.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockTableRow.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockText.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockToken.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockTokenGroup.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockTokenList.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockUnorderedList.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/builder/SDKDocumentationBlockBuilder.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/configuration/SDKDocumentationItemConfiguration.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/configuration/SDKDocumentationItemHeader.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/elements/SDKElementDataView.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/elements/SDKElementDataViewColumn.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/elements/SDKElementProperty.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/elements/SDKElementPropertyOption.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/elements/values/SDKElementPropertyValue.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKAlignment.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKAssetFormat.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKAssetScale.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKAssetScaleType.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKBlurType.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKBorderPosition.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKDocumentationCalloutType.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKDocumentationEnvironment.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKDocumentationGroupBehavior.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKDocumentationHeadingType.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKDocumentationItemType.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKDocumentationPageAssetType.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKDocumentationPageBlockThemeType.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKFrameAlignment.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKFrameLayout.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKGradientType.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKRichTextSpanAttributeType.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKShadowType.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKSourceType.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKTextCase.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKTextDecoration.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKTokenType.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKUnit.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/exporters/SDKExporter.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/exporters/custom_blocks/SDKExporterCustomBlock.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/exporters/custom_blocks/SDKExporterCustomBlockProperty.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/exporters/custom_blocks/SDKExporterCustomBlockVariant.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/exporters/custom_properties/SDKExporterConfigurationProperty.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/groups/SDKAssetGroup.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/groups/SDKDesignComponentGroup.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/groups/SDKTokenGroup.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/support/SDKDesignComponentOrigin.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/support/SDKFrameOrigin.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/support/SDKSize.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/support/SDKSource.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/support/SDKTokenOrigin.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/support/SDKWorkspaceNPMRegistry.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/themes/SDKThemeUtilities.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/themes/SDKTokenTheme.d.ts +5 -5
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/themes/SDKTokenThemeOverride.d.ts +5 -5
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/SDKBlurToken.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/SDKBorderToken.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/SDKColorToken.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/SDKFontToken.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/SDKGenericToken.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/SDKGradientToken.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/SDKMeasureToken.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/SDKRadiusToken.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/SDKShadowToken.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/SDKTextToken.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/SDKToken.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/SDKTokenCompator.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/SDKTokenValue.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/SDKTypographyToken.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/remote/SDKRemoteTokenData.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/remote/SDKRemoteTokenModel.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/remote/SDKRemoteTokenValue.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/users/SDKUser.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tests/Accessors/Brand.spec.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tests/Accessors/Components.spec.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tests/Accessors/DesignSystem.spec.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tests/Accessors/DesignSystemVersion.spec.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tests/Accessors/Documentation.spec.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tests/Accessors/Supernova.spec.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tests/Accessors/Theme.spec.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tests/Accessors/Workspace.spec.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tests/Tooling/PluginFigmaTokens.spec.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tests/Tooling/PluginJSONBuilder.spec.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tests/Tooling/ToolDocSearch.spec.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tests/Tooling/ToolMarkdownTransform.spec.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tests/helpers.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/SDKToolsDesignTokensPlugin.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/SDKDTJSONConverter.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/SDKDTJSONGroupBuilder.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/SDKDTJSONLoader.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/SDKDTJSONParser.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/SDKDTMapLoader.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/SDKDTMapResolver.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/SDKDTThemeMerger.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/SDKDTTokenGroupTreeMerger.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/SDKDTTokenMerger.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/SDKDTTokenReferenceResolver.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/SDKDTTokenSetResolver.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/collection/SDKDTTokenCollection.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/expression/SDKDTExpressionParser.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/tree/SDKDTGroupTree.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/tree/SDKDTGroupTreeNode.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/tree/SDKDTParentChildMapping.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/json-builder/SDKToolsJSONBuilder.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/json-builder/elements-transformers/SDKToolsJSONElementFigmaTokensTransformer.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/json-builder/elements-transformers/SDKToolsJSONElementStyleDictionaryTransformer.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/json-builder/elements-transformers/SDKToolsJSONElementTransformer.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/markdown-transform/SDKToolsMarkdownTransform.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/markdown-transform/SDKToolsMarkdownTransformCustomBlock.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/markdown-transform/SDKToolsMarkdownTransformUtil.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/search-index/SDKToolsDocSearch.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/token-transform/SDKToolsTokenTransform.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/utils/FlowUtils.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/utils/StringUtils.d.ts +0 -0
- /package/node_modules/{@supernova-studio/pulsar-language/node_modules/agent-base → agent-base}/LICENSE +0 -0
- /package/node_modules/{@supernova-studio/pulsar-language/node_modules/agent-base → agent-base}/README.md +0 -0
- /package/node_modules/{@supernova-studio/pulsar-core/node_modules/agent-base → agent-base}/dist/helpers.d.ts +0 -0
- /package/node_modules/{@supernova-studio/pulsar-core/node_modules/agent-base → agent-base}/dist/helpers.d.ts.map +0 -0
- /package/node_modules/{@supernova-studio/pulsar-core/node_modules/agent-base → agent-base}/dist/helpers.js +0 -0
- /package/node_modules/{@supernova-studio/pulsar-core/node_modules/agent-base → agent-base}/dist/helpers.js.map +0 -0
- /package/node_modules/{@supernova-studio/pulsar-language/node_modules/agent-base → agent-base}/dist/index.d.ts +0 -0
- /package/node_modules/{@supernova-studio/pulsar-language/node_modules/agent-base → agent-base}/dist/index.d.ts.map +0 -0
- /package/node_modules/{@supernova-studio/pulsar-language/node_modules/agent-base → agent-base}/dist/index.js +0 -0
- /package/node_modules/{@supernova-studio/pulsar-language/node_modules/agent-base → agent-base}/dist/index.js.map +0 -0
- /package/node_modules/{@supernova-studio/pulsar-language/node_modules/agent-base → agent-base}/package.json +0 -0
- /package/node_modules/{@supernova-studio/pulsar-language/node_modules/https-proxy-agent → https-proxy-agent}/LICENSE +0 -0
- /package/node_modules/{@supernova-studio/pulsar-language/node_modules/https-proxy-agent → https-proxy-agent}/README.md +0 -0
- /package/node_modules/{@supernova-studio/pulsar-language/node_modules/https-proxy-agent → https-proxy-agent}/dist/index.d.ts +0 -0
- /package/node_modules/{@supernova-studio/pulsar-core/node_modules/https-proxy-agent → https-proxy-agent}/dist/parse-proxy-response.d.ts +0 -0
- /package/node_modules/{@supernova-studio/pulsar-core/node_modules/https-proxy-agent → https-proxy-agent}/dist/parse-proxy-response.d.ts.map +0 -0
- /package/node_modules/{@supernova-studio/pulsar-core/node_modules/https-proxy-agent → https-proxy-agent}/dist/parse-proxy-response.js +0 -0
- /package/node_modules/{@supernova-studio/pulsar-core/node_modules/https-proxy-agent → https-proxy-agent}/dist/parse-proxy-response.js.map +0 -0
|
@@ -14,6 +14,7 @@ const core_1 = require("@oclif/core");
|
|
|
14
14
|
const types_1 = require("../types/types");
|
|
15
15
|
const sdk_1 = require("../utils/sdk");
|
|
16
16
|
require("colors");
|
|
17
|
+
const sdk_2 = require("@supernovaio/sdk");
|
|
17
18
|
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
18
19
|
// MARK: - Definition
|
|
19
20
|
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
@@ -27,10 +28,17 @@ class PublishDocumentation extends core_1.Command {
|
|
|
27
28
|
async run() {
|
|
28
29
|
try {
|
|
29
30
|
const { flags } = await this.parse(PublishDocumentation);
|
|
31
|
+
const environment = tryParseDocsEnvironment(flags.target);
|
|
32
|
+
if (!environment) {
|
|
33
|
+
const supportedEnvs = [sdk_2.DocumentationEnvironment.live, sdk_2.DocumentationEnvironment.preview];
|
|
34
|
+
this.error(`Unknown target ${flags.target}, must be one of [${supportedEnvs.join(", ")}]`);
|
|
35
|
+
}
|
|
30
36
|
// Get workspace -> design system –> version
|
|
31
37
|
let { instance, id } = await (0, sdk_1.getWritableVersion)(flags);
|
|
32
|
-
let
|
|
33
|
-
|
|
38
|
+
let result = await instance.documentation.publishDrafts(id, environment, {
|
|
39
|
+
pagePersistentIds: [],
|
|
40
|
+
groupPersistentIds: [],
|
|
41
|
+
});
|
|
34
42
|
if (result.status === "Success") {
|
|
35
43
|
this.log("\nDone: Documentation queued for publishing".green);
|
|
36
44
|
}
|
|
@@ -61,7 +69,11 @@ PublishDocumentation.flags = {
|
|
|
61
69
|
apiKey: core_1.Flags.string({ description: "API key to use for accessing Supernova instance", required: true }),
|
|
62
70
|
designSystemId: core_1.Flags.string({ description: "Design System to publish the documentation", required: true }),
|
|
63
71
|
dev: core_1.Flags.boolean({ description: "When enabled, CLI will target dev server", hidden: true, default: false }),
|
|
64
|
-
target: core_1.Flags.string({
|
|
72
|
+
target: core_1.Flags.string({
|
|
73
|
+
description: "Environment to use for publishing: Live or Preview",
|
|
74
|
+
required: false,
|
|
75
|
+
default: "Live",
|
|
76
|
+
}),
|
|
65
77
|
environment: core_1.Flags.string({
|
|
66
78
|
description: "When set, CLI will target a specific environment",
|
|
67
79
|
hidden: true,
|
|
@@ -75,3 +87,13 @@ PublishDocumentation.flags = {
|
|
|
75
87
|
required: false,
|
|
76
88
|
}),
|
|
77
89
|
};
|
|
90
|
+
function tryParseDocsEnvironment(targetArg) {
|
|
91
|
+
switch (targetArg.toLowerCase()) {
|
|
92
|
+
case "live":
|
|
93
|
+
return sdk_2.DocumentationEnvironment.live;
|
|
94
|
+
case "preview":
|
|
95
|
+
return sdk_2.DocumentationEnvironment.preview;
|
|
96
|
+
default:
|
|
97
|
+
return null;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
@@ -4,7 +4,7 @@ exports.FigmaTokensDataLoader = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const sdk_1 = require("@supernovaio/sdk");
|
|
6
6
|
const fs = tslib_1.__importStar(require("fs"));
|
|
7
|
-
const path = require(
|
|
7
|
+
const path = require("path");
|
|
8
8
|
class FigmaTokensDataLoader {
|
|
9
9
|
/** Load token definitions from path */
|
|
10
10
|
async loadTokensFromPath(pathToFile) {
|
|
@@ -12,12 +12,12 @@ class FigmaTokensDataLoader {
|
|
|
12
12
|
if (!(fs.existsSync(pathToFile) && fs.lstatSync(pathToFile).isFile())) {
|
|
13
13
|
throw Error(`Provided token file directory ${pathToFile} is not a file or doesn't exist`);
|
|
14
14
|
}
|
|
15
|
-
let definition = fs.readFileSync(pathToFile,
|
|
15
|
+
let definition = fs.readFileSync(pathToFile, "utf8");
|
|
16
16
|
let parsedDefinition = this.parseDefinition(definition);
|
|
17
17
|
return parsedDefinition;
|
|
18
18
|
}
|
|
19
19
|
catch (error) {
|
|
20
|
-
throw new Error(
|
|
20
|
+
throw new Error("Unable to load JSON definition file: " + error);
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
async loadTokensFromDirectory(pathToDirectory, settingsPath) {
|
|
@@ -28,9 +28,9 @@ class FigmaTokensDataLoader {
|
|
|
28
28
|
}
|
|
29
29
|
let jsonPaths = this.getAllJSONFiles(pathToDirectory);
|
|
30
30
|
for (let path of jsonPaths) {
|
|
31
|
-
if (path.endsWith(
|
|
31
|
+
if (path.endsWith("json") && path !== settingsPath && !path.includes("$")) {
|
|
32
32
|
let result = await this.loadObjectFile(path);
|
|
33
|
-
if (typeof result ===
|
|
33
|
+
if (typeof result === "object") {
|
|
34
34
|
// let name = this.getFileNameWithoutExtension(path)
|
|
35
35
|
let name = this.getSetKey(path, pathToDirectory);
|
|
36
36
|
fullStructuredObject[name] = result;
|
|
@@ -38,21 +38,21 @@ class FigmaTokensDataLoader {
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
// Try to load themes, if any
|
|
41
|
-
let themePath = pathToDirectory +
|
|
41
|
+
let themePath = pathToDirectory + "/" + "$themes.json";
|
|
42
42
|
if (fs.existsSync(themePath)) {
|
|
43
43
|
let themes = await this.loadObjectFile(themePath);
|
|
44
|
-
fullStructuredObject[
|
|
44
|
+
fullStructuredObject["$themes"] = themes;
|
|
45
45
|
}
|
|
46
46
|
// Try to load metadata, if any
|
|
47
|
-
let metadataPath = pathToDirectory +
|
|
47
|
+
let metadataPath = pathToDirectory + "/" + "$metadata.json";
|
|
48
48
|
if (fs.existsSync(metadataPath)) {
|
|
49
49
|
let metadata = await this.loadObjectFile(metadataPath);
|
|
50
|
-
fullStructuredObject[
|
|
50
|
+
fullStructuredObject["$metadata"] = metadata;
|
|
51
51
|
}
|
|
52
52
|
return fullStructuredObject;
|
|
53
53
|
}
|
|
54
54
|
catch (error) {
|
|
55
|
-
throw new Error(
|
|
55
|
+
throw new Error("Unable to load JSON definition file: " + error);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
getAllJSONFiles(dir) {
|
|
@@ -64,7 +64,7 @@ class FigmaTokensDataLoader {
|
|
|
64
64
|
if (fileStat.isDirectory()) {
|
|
65
65
|
jsonFiles.push(...this.getAllJSONFiles(filePath));
|
|
66
66
|
}
|
|
67
|
-
else if (fileStat.isFile() && filePath.endsWith(
|
|
67
|
+
else if (fileStat.isFile() && filePath.endsWith(".json")) {
|
|
68
68
|
jsonFiles.push(filePath);
|
|
69
69
|
}
|
|
70
70
|
}
|
|
@@ -87,7 +87,7 @@ class FigmaTokensDataLoader {
|
|
|
87
87
|
return this.processFileToMapping(parsedDefinition);
|
|
88
88
|
}
|
|
89
89
|
catch (error) {
|
|
90
|
-
throw new Error(
|
|
90
|
+
throw new Error("Unable to load JSON definition file: " + error);
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
loadConfigFromPathAsIs(pathToFile) {
|
|
@@ -95,66 +95,67 @@ class FigmaTokensDataLoader {
|
|
|
95
95
|
if (!(fs.existsSync(pathToFile) && fs.lstatSync(pathToFile).isFile())) {
|
|
96
96
|
throw new Error(`Provided configuration file directory ${pathToFile} is not a file or doesn't exist`);
|
|
97
97
|
}
|
|
98
|
-
let definition = fs.readFileSync(pathToFile,
|
|
98
|
+
let definition = fs.readFileSync(pathToFile, "utf8");
|
|
99
99
|
let parsedDefinition = this.parseDefinition(definition);
|
|
100
100
|
return parsedDefinition;
|
|
101
101
|
}
|
|
102
102
|
catch (error) {
|
|
103
|
-
throw new Error(
|
|
103
|
+
throw new Error("Unable to load JSON definition file: " + error);
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
weakValidateMapping(mapping) {
|
|
107
|
-
if (!mapping.hasOwnProperty(
|
|
108
|
-
typeof mapping.mode !==
|
|
109
|
-
(mapping.mode !==
|
|
110
|
-
throw new Error(
|
|
107
|
+
if (!mapping.hasOwnProperty("mode") ||
|
|
108
|
+
typeof mapping.mode !== "string" ||
|
|
109
|
+
(mapping.mode !== "multi-file" && mapping.mode !== "single-file")) {
|
|
110
|
+
throw new Error("Unable to load mapping file: `mode` must be provided [single-file or multi-file]`");
|
|
111
111
|
}
|
|
112
112
|
if (!mapping.mapping || !(mapping.mapping instanceof Array)) {
|
|
113
|
-
throw new Error(
|
|
113
|
+
throw new Error("Unable to load mapping file: `mapping` key must be present and array.");
|
|
114
114
|
}
|
|
115
115
|
let mapPack = mapping.mapping;
|
|
116
116
|
for (let map of mapPack) {
|
|
117
|
-
if (typeof map !==
|
|
118
|
-
throw new Error(
|
|
117
|
+
if (typeof map !== "object") {
|
|
118
|
+
throw new Error("Unable to load mapping file: `mapping` must contain objects only");
|
|
119
119
|
}
|
|
120
120
|
if (!map.tokenSets && !map.tokensTheme) {
|
|
121
|
-
throw new Error(
|
|
121
|
+
throw new Error("Unable to load mapping file: `mapping` must contain either `tokensTheme` or `tokenSets`");
|
|
122
122
|
}
|
|
123
123
|
if (map.tokenSets && map.tokensTheme) {
|
|
124
|
-
throw new Error(
|
|
124
|
+
throw new Error("Unable to load mapping file: `mapping` must not contain both `tokensTheme` or `tokenSets`");
|
|
125
125
|
}
|
|
126
126
|
if (map.tokenSets && (!(map.tokenSets instanceof Array) || map.tokenSets.length === 0)) {
|
|
127
|
-
throw new Error(
|
|
127
|
+
throw new Error("Unable to load mapping file: `mapping`.`tokenSets` must be an Array with at least one entry");
|
|
128
128
|
}
|
|
129
|
-
if (map.tokensTheme &&
|
|
130
|
-
|
|
129
|
+
if (map.tokensTheme &&
|
|
130
|
+
((typeof map.tokensTheme !== "string" && !Array.isArray(map.tokensTheme)) || map.tokensTheme.length === 0)) {
|
|
131
|
+
throw new Error("Unable to load mapping file: `mapping`.`tokensTheme` must be a non-empty string or non-empty array of strings");
|
|
131
132
|
}
|
|
132
|
-
if (!map.supernovaBrand || typeof map.supernovaBrand !==
|
|
133
|
-
throw new Error(
|
|
133
|
+
if (!map.supernovaBrand || typeof map.supernovaBrand !== "string" || map.supernovaBrand.length === 0) {
|
|
134
|
+
throw new Error("Unable to load mapping file: `supernovaBrand` must be a non-empty string");
|
|
134
135
|
}
|
|
135
|
-
if (map.supernovaTheme && (typeof map.supernovaTheme !==
|
|
136
|
-
throw new Error(
|
|
136
|
+
if (map.supernovaTheme && (typeof map.supernovaTheme !== "string" || map.supernovaTheme.length === 0)) {
|
|
137
|
+
throw new Error("Unable to load mapping file: `supernovaTheme` may be empty but must be non-empty string if not");
|
|
137
138
|
}
|
|
138
139
|
}
|
|
139
140
|
if (mapping.settings) {
|
|
140
|
-
if (typeof mapping.settings !==
|
|
141
|
-
throw new Error(
|
|
141
|
+
if (typeof mapping.settings !== "object") {
|
|
142
|
+
throw new Error("Unable to load mapping file: `settings` must be an object");
|
|
142
143
|
}
|
|
143
|
-
if (mapping.settings.hasOwnProperty(
|
|
144
|
-
throw new Error(
|
|
144
|
+
if (mapping.settings.hasOwnProperty("dryRun") && typeof mapping.settings.dryRun !== "boolean") {
|
|
145
|
+
throw new Error("Unable to load mapping file: `dryRun` must be of boolean type");
|
|
145
146
|
}
|
|
146
|
-
if (mapping.settings.hasOwnProperty(
|
|
147
|
-
throw new Error(
|
|
147
|
+
if (mapping.settings.hasOwnProperty("verbose") && typeof mapping.settings.verbose !== "boolean") {
|
|
148
|
+
throw new Error("Unable to load mapping file: `verbose` must be of boolean type");
|
|
148
149
|
}
|
|
149
|
-
if (mapping.settings.hasOwnProperty(
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
throw new Error(
|
|
150
|
+
if (mapping.settings.hasOwnProperty("preciseCopy") &&
|
|
151
|
+
typeof mapping.settings.preciseCopy !== "boolean" &&
|
|
152
|
+
typeof mapping.settings.preciseCopy !== "string") {
|
|
153
|
+
throw new Error("Unable to load mapping file: `preciseCopy` must be of boolean or string type");
|
|
153
154
|
}
|
|
154
155
|
}
|
|
155
156
|
}
|
|
156
157
|
processFileToMapping(mapping) {
|
|
157
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
158
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
158
159
|
let result = new Array();
|
|
159
160
|
for (let map of mapping.mapping) {
|
|
160
161
|
result.push({
|
|
@@ -165,18 +166,19 @@ class FigmaTokensDataLoader {
|
|
|
165
166
|
bindToTheme: (_c = map.supernovaTheme) !== null && _c !== void 0 ? _c : null,
|
|
166
167
|
nodes: null,
|
|
167
168
|
processedNodes: null,
|
|
168
|
-
processedGroups: null
|
|
169
|
+
processedGroups: null,
|
|
169
170
|
});
|
|
170
171
|
}
|
|
171
172
|
let settings = {
|
|
172
173
|
...((_d = mapping.settings) !== null && _d !== void 0 ? _d : {}),
|
|
173
174
|
dryRun: (_f = (_e = mapping.settings) === null || _e === void 0 ? void 0 : _e.dryRun) !== null && _f !== void 0 ? _f : false,
|
|
174
175
|
verbose: (_h = (_g = mapping.settings) === null || _g === void 0 ? void 0 : _g.verbose) !== null && _h !== void 0 ? _h : false,
|
|
175
|
-
preciseCopy: (
|
|
176
|
+
preciseCopy: (0, sdk_1.toPreciseCopyStrategy)((_j = mapping.settings) === null || _j === void 0 ? void 0 : _j.preciseCopy),
|
|
177
|
+
themeOverridesStrategy: (_l = (_k = mapping.settings) === null || _k === void 0 ? void 0 : _k.themeOverridesStrategy) !== null && _l !== void 0 ? _l : "default",
|
|
176
178
|
};
|
|
177
179
|
return {
|
|
178
180
|
mapping: result,
|
|
179
|
-
settings: settings
|
|
181
|
+
settings: settings,
|
|
180
182
|
};
|
|
181
183
|
}
|
|
182
184
|
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
@@ -184,13 +186,13 @@ class FigmaTokensDataLoader {
|
|
|
184
186
|
parseDefinition(definition) {
|
|
185
187
|
try {
|
|
186
188
|
let object = JSON.parse(definition);
|
|
187
|
-
if (typeof object !==
|
|
188
|
-
throw new Error(
|
|
189
|
+
if (typeof object !== "object") {
|
|
190
|
+
throw new Error("Invalid Supernova mapping definition JSON file - root level entity must be object");
|
|
189
191
|
}
|
|
190
192
|
return object;
|
|
191
193
|
}
|
|
192
194
|
catch (error) {
|
|
193
|
-
throw new Error(
|
|
195
|
+
throw new Error("Invalid Supernova mapping definition JSON file - file structure invalid");
|
|
194
196
|
}
|
|
195
197
|
}
|
|
196
198
|
async loadObjectFile(pathToFile) {
|
|
@@ -198,12 +200,12 @@ class FigmaTokensDataLoader {
|
|
|
198
200
|
if (!(fs.existsSync(pathToFile) && fs.lstatSync(pathToFile).isFile())) {
|
|
199
201
|
throw new Error(`Provided token file directory ${pathToFile} is not a file or doesn't exist`);
|
|
200
202
|
}
|
|
201
|
-
let definition = fs.readFileSync(pathToFile,
|
|
203
|
+
let definition = fs.readFileSync(pathToFile, "utf8");
|
|
202
204
|
let parsedDefinition = this.parseDefinition(definition);
|
|
203
205
|
return parsedDefinition;
|
|
204
206
|
}
|
|
205
207
|
catch (error) {
|
|
206
|
-
throw new Error(
|
|
208
|
+
throw new Error("Unable to load JSON definition file: " + error);
|
|
207
209
|
}
|
|
208
210
|
}
|
|
209
211
|
}
|