@cloudbase/cals 1.1.14 → 1.2.0
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/lib/{parser → cjs/parser}/cals/index.d.ts +1 -1
- package/lib/cjs/parser/cals/index.d.ts.map +1 -0
- package/lib/cjs/parser/cals/utils/block/helpers/get-component-namespace.d.ts.map +1 -0
- package/lib/cjs/parser/cals/utils/block/helpers/merge-dataset.d.ts.map +1 -0
- package/lib/cjs/parser/cals/utils/block/helpers/merge-listeners.d.ts.map +1 -0
- package/lib/cjs/parser/cals/utils/block/helpers/merge-resources.d.ts.map +1 -0
- package/lib/{parser → cjs/parser}/cals/utils/block/helpers/remap-component-ids.d.ts +2 -2
- package/lib/cjs/parser/cals/utils/block/helpers/remap-component-ids.d.ts.map +1 -0
- package/lib/cjs/parser/cals/utils/block/helpers/renew-id-in-code.d.ts.map +1 -0
- package/lib/cjs/parser/cals/utils/block/helpers/renew-id-in-expr.d.ts.map +1 -0
- package/lib/cjs/parser/cals/utils/block/helpers/renew-id-in-resource.d.ts.map +1 -0
- package/lib/cjs/parser/cals/utils/block/helpers/resolve-new-id.d.ts.map +1 -0
- package/lib/cjs/parser/cals/utils/block/index.d.ts.map +1 -0
- package/lib/cjs/parser/cals/utils/code/index.d.ts.map +1 -0
- package/lib/{parser → cjs/parser}/cals/utils/common.d.ts +1 -1
- package/lib/cjs/parser/cals/utils/common.d.ts.map +1 -0
- package/lib/cjs/parser/cals/utils/getUsedReference.d.ts.map +1 -0
- package/lib/cjs/parser/cals/utils/getUsedResources.d.ts.map +1 -0
- package/lib/cjs/parser/cals/utils/runtime.d.ts.map +1 -0
- package/lib/cjs/parser/cals/utils/spinoff/index.d.ts.map +1 -0
- package/lib/cjs/parser/cals/utils/style.d.ts.map +1 -0
- package/lib/cjs/parser/cals/utils/template.d.ts.map +1 -0
- package/lib/cjs/parser/cals/utils/version/common.d.ts.map +1 -0
- package/lib/cjs/parser/cals/utils/version/config.d.ts.map +1 -0
- package/lib/cjs/parser/cals/utils/version/index.d.ts.map +1 -0
- package/lib/cjs/parser/cals/utils/version/parses.d.ts.map +1 -0
- package/lib/cjs/parser/cals/utils/version/utils.d.ts.map +1 -0
- package/lib/cjs/parser/dependiencies/index.d.ts.map +1 -0
- package/lib/cjs/parser/expression/index.d.ts.map +1 -0
- package/lib/cjs/parser/index.d.ts.map +1 -0
- package/lib/cjs/parser/plugins/postcss-rpx2clac.d.ts.map +1 -0
- package/lib/cjs/types/basic/app.d.ts.map +1 -0
- package/lib/cjs/types/basic/common.d.ts.map +1 -0
- package/lib/cjs/types/basic/component.d.ts.map +1 -0
- package/lib/cjs/types/basic/datasource.d.ts.map +1 -0
- package/lib/cjs/types/index.d.ts.map +1 -0
- package/lib/{types → cjs/types}/lcds.d.ts +4 -4
- package/lib/cjs/types/lcds.d.ts.map +1 -0
- package/lib/{types → cjs/types}/platform/app.d.ts +2 -2
- package/lib/cjs/types/platform/app.d.ts.map +1 -0
- package/lib/cjs/types/platform/common.d.ts.map +1 -0
- package/lib/{types → cjs/types}/platform/component.d.ts +1 -1
- package/lib/cjs/types/platform/component.d.ts.map +1 -0
- package/lib/{types → cjs/types}/platform/datasource.d.ts +4 -4
- package/lib/cjs/types/platform/datasource.d.ts.map +1 -0
- package/lib/cjs/types/platform/eventFlow.d.ts.map +1 -0
- package/lib/cjs/types/platform/query.d.ts.map +1 -0
- package/lib/{types → cjs/types}/platform/theme.d.ts +4 -4
- package/lib/cjs/types/platform/theme.d.ts.map +1 -0
- package/lib/cjs/utils/CSSProperty.d.ts.map +1 -0
- package/lib/cjs/utils/color-generator/core.d.ts.map +1 -0
- package/lib/cjs/utils/color-generator/generate.d.ts.map +1 -0
- package/lib/cjs/utils/color-generator/utils.d.ts.map +1 -0
- package/lib/cjs/utils/constant.d.ts.map +1 -0
- package/lib/cjs/utils/dts/auto-generated.d.ts.map +1 -0
- package/lib/{utils → cjs/utils}/dts/build.d.ts.map +1 -1
- package/lib/cjs/utils/dts/index.d.ts.map +1 -0
- package/lib/cjs/utils/index.d.ts.map +1 -0
- package/lib/cjs/utils/version/common.d.ts.map +1 -0
- package/lib/cjs/utils/version/featureChecker.d.ts.map +1 -0
- package/lib/cjs/utils/version/migrations/version4.d.ts.map +1 -0
- package/lib/esm/parser/cals/index.d.ts +625 -0
- package/lib/esm/parser/cals/index.d.ts.map +1 -0
- package/lib/esm/parser/cals/index.js +1548 -0
- package/lib/esm/parser/cals/utils/block/helpers/get-component-namespace.d.ts +2 -0
- package/lib/esm/parser/cals/utils/block/helpers/get-component-namespace.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/block/helpers/get-component-namespace.js +5 -0
- package/lib/esm/parser/cals/utils/block/helpers/merge-dataset.d.ts +6 -0
- package/lib/esm/parser/cals/utils/block/helpers/merge-dataset.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/block/helpers/merge-dataset.js +13 -0
- package/lib/esm/parser/cals/utils/block/helpers/merge-listeners.d.ts +6 -0
- package/lib/esm/parser/cals/utils/block/helpers/merge-listeners.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/block/helpers/merge-listeners.js +10 -0
- package/lib/esm/parser/cals/utils/block/helpers/merge-resources.d.ts +6 -0
- package/lib/esm/parser/cals/utils/block/helpers/merge-resources.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/block/helpers/merge-resources.js +25 -0
- package/lib/esm/parser/cals/utils/block/helpers/remap-component-ids.d.ts +30 -0
- package/lib/esm/parser/cals/utils/block/helpers/remap-component-ids.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/block/helpers/remap-component-ids.js +125 -0
- package/lib/esm/parser/cals/utils/block/helpers/renew-id-in-code.d.ts +7 -0
- package/lib/esm/parser/cals/utils/block/helpers/renew-id-in-code.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/block/helpers/renew-id-in-code.js +9 -0
- package/lib/esm/parser/cals/utils/block/helpers/renew-id-in-expr.d.ts +8 -0
- package/lib/esm/parser/cals/utils/block/helpers/renew-id-in-expr.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/block/helpers/renew-id-in-expr.js +56 -0
- package/lib/esm/parser/cals/utils/block/helpers/renew-id-in-resource.d.ts +15 -0
- package/lib/esm/parser/cals/utils/block/helpers/renew-id-in-resource.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/block/helpers/renew-id-in-resource.js +13 -0
- package/lib/esm/parser/cals/utils/block/helpers/resolve-new-id.d.ts +7 -0
- package/lib/esm/parser/cals/utils/block/helpers/resolve-new-id.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/block/helpers/resolve-new-id.js +17 -0
- package/lib/esm/parser/cals/utils/block/index.d.ts +67 -0
- package/lib/esm/parser/cals/utils/block/index.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/block/index.js +451 -0
- package/lib/esm/parser/cals/utils/code/index.d.ts +36 -0
- package/lib/esm/parser/cals/utils/code/index.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/code/index.js +401 -0
- package/lib/esm/parser/cals/utils/common.d.ts +35 -0
- package/lib/esm/parser/cals/utils/common.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/common.js +301 -0
- package/lib/esm/parser/cals/utils/getUsedReference.d.ts +8 -0
- package/lib/esm/parser/cals/utils/getUsedReference.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/getUsedReference.js +54 -0
- package/lib/esm/parser/cals/utils/getUsedResources.d.ts +10 -0
- package/lib/esm/parser/cals/utils/getUsedResources.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/getUsedResources.js +132 -0
- package/lib/esm/parser/cals/utils/runtime.d.ts +14 -0
- package/lib/esm/parser/cals/utils/runtime.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/runtime.js +254 -0
- package/lib/esm/parser/cals/utils/spinoff/index.d.ts +10 -0
- package/lib/esm/parser/cals/utils/spinoff/index.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/spinoff/index.js +95 -0
- package/lib/esm/parser/cals/utils/style.d.ts +43 -0
- package/lib/esm/parser/cals/utils/style.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/style.js +463 -0
- package/lib/esm/parser/cals/utils/template.d.ts +6 -0
- package/lib/esm/parser/cals/utils/template.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/template.js +221 -0
- package/lib/esm/parser/cals/utils/version/common.d.ts +5 -0
- package/lib/esm/parser/cals/utils/version/common.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/version/common.js +375 -0
- package/lib/esm/parser/cals/utils/version/config.d.ts +16 -0
- package/lib/esm/parser/cals/utils/version/config.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/version/config.js +241 -0
- package/lib/esm/parser/cals/utils/version/index.d.ts +3 -0
- package/lib/esm/parser/cals/utils/version/index.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/version/index.js +68 -0
- package/lib/esm/parser/cals/utils/version/parses.d.ts +16 -0
- package/lib/esm/parser/cals/utils/version/parses.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/version/parses.js +560 -0
- package/lib/esm/parser/cals/utils/version/utils.d.ts +14 -0
- package/lib/esm/parser/cals/utils/version/utils.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/version/utils.js +129 -0
- package/lib/esm/parser/dependiencies/index.d.ts +143 -0
- package/lib/esm/parser/dependiencies/index.d.ts.map +1 -0
- package/lib/esm/parser/dependiencies/index.js +684 -0
- package/lib/esm/parser/expression/index.d.ts +123 -0
- package/lib/esm/parser/expression/index.d.ts.map +1 -0
- package/lib/esm/parser/expression/index.js +296 -0
- package/lib/esm/parser/index.d.ts +13 -0
- package/lib/esm/parser/index.d.ts.map +1 -0
- package/lib/esm/parser/index.js +12 -0
- package/lib/esm/parser/plugins/postcss-rpx2clac.d.ts +18 -0
- package/lib/esm/parser/plugins/postcss-rpx2clac.d.ts.map +1 -0
- package/lib/esm/parser/plugins/postcss-rpx2clac.js +67 -0
- package/lib/esm/types/basic/app.d.ts +76 -0
- package/lib/esm/types/basic/app.d.ts.map +1 -0
- package/lib/esm/types/basic/app.js +1 -0
- package/lib/esm/types/basic/common.d.ts +125 -0
- package/lib/esm/types/basic/common.d.ts.map +1 -0
- package/lib/esm/types/basic/common.js +1 -0
- package/lib/esm/types/basic/component.d.ts +212 -0
- package/lib/esm/types/basic/component.d.ts.map +1 -0
- package/lib/esm/types/basic/component.js +1 -0
- package/lib/esm/types/basic/datasource.d.ts +50 -0
- package/lib/esm/types/basic/datasource.d.ts.map +1 -0
- package/lib/esm/types/basic/datasource.js +1 -0
- package/lib/esm/types/index.d.ts +12 -0
- package/lib/esm/types/index.d.ts.map +1 -0
- package/lib/esm/types/index.js +14 -0
- package/lib/esm/types/lcds.d.ts +610 -0
- package/lib/esm/types/lcds.d.ts.map +1 -0
- package/lib/esm/types/lcds.js +22 -0
- package/lib/esm/types/platform/app.d.ts +276 -0
- package/lib/esm/types/platform/app.d.ts.map +1 -0
- package/lib/esm/types/platform/app.js +8 -0
- package/lib/esm/types/platform/common.d.ts +190 -0
- package/lib/esm/types/platform/common.d.ts.map +1 -0
- package/lib/esm/types/platform/common.js +84 -0
- package/lib/esm/types/platform/component.d.ts +166 -0
- package/lib/esm/types/platform/component.d.ts.map +1 -0
- package/lib/esm/types/platform/component.js +8 -0
- package/lib/esm/types/platform/datasource.d.ts +500 -0
- package/lib/esm/types/platform/datasource.d.ts.map +1 -0
- package/lib/esm/types/platform/datasource.js +6 -0
- package/lib/esm/types/platform/eventFlow.d.ts +20 -0
- package/lib/esm/types/platform/eventFlow.d.ts.map +1 -0
- package/lib/esm/types/platform/eventFlow.js +1 -0
- package/lib/esm/types/platform/query.d.ts +78 -0
- package/lib/esm/types/platform/query.d.ts.map +1 -0
- package/lib/esm/types/platform/query.js +12 -0
- package/lib/esm/types/platform/theme.d.ts +47 -0
- package/lib/esm/types/platform/theme.d.ts.map +1 -0
- package/lib/esm/types/platform/theme.js +1 -0
- package/lib/esm/utils/CSSProperty.d.ts +64 -0
- package/lib/esm/utils/CSSProperty.d.ts.map +1 -0
- package/lib/esm/utils/CSSProperty.js +86 -0
- package/lib/esm/utils/color-generator/core.d.ts +52 -0
- package/lib/esm/utils/color-generator/core.d.ts.map +1 -0
- package/lib/esm/utils/color-generator/core.js +57 -0
- package/lib/esm/utils/color-generator/generate.d.ts +67 -0
- package/lib/esm/utils/color-generator/generate.d.ts.map +1 -0
- package/lib/esm/utils/color-generator/generate.js +92 -0
- package/lib/esm/utils/color-generator/utils.d.ts +15 -0
- package/lib/esm/utils/color-generator/utils.d.ts.map +1 -0
- package/lib/esm/utils/color-generator/utils.js +30 -0
- package/lib/esm/utils/constant.d.ts +65 -0
- package/lib/esm/utils/constant.d.ts.map +1 -0
- package/lib/esm/utils/constant.js +69 -0
- package/lib/esm/utils/dts/auto-generated.d.ts +2 -0
- package/lib/esm/utils/dts/auto-generated.d.ts.map +1 -0
- package/lib/esm/utils/dts/auto-generated.js +1796 -0
- package/lib/esm/utils/dts/build.d.ts +2 -0
- package/lib/esm/utils/dts/build.d.ts.map +1 -0
- package/lib/esm/utils/dts/build.js +147 -0
- package/lib/esm/utils/dts/index.d.ts +141 -0
- package/lib/esm/utils/dts/index.d.ts.map +1 -0
- package/lib/esm/utils/dts/index.js +1071 -0
- package/lib/esm/utils/index.d.ts +9 -0
- package/lib/esm/utils/index.d.ts.map +1 -0
- package/lib/esm/utils/index.js +8 -0
- package/lib/esm/utils/version/common.d.ts +3 -0
- package/lib/esm/utils/version/common.d.ts.map +1 -0
- package/lib/esm/utils/version/common.js +22 -0
- package/lib/esm/utils/version/featureChecker.d.ts +5 -0
- package/lib/esm/utils/version/featureChecker.d.ts.map +1 -0
- package/lib/esm/utils/version/featureChecker.js +32 -0
- package/lib/esm/utils/version/migrations/version4.d.ts +3 -0
- package/lib/esm/utils/version/migrations/version4.d.ts.map +1 -0
- package/lib/esm/utils/version/migrations/version4.js +192 -0
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/package.json +7 -5
- package/lib/parser/cals/index.d.ts.map +0 -1
- package/lib/parser/cals/utils/block/helpers/get-component-namespace.d.ts.map +0 -1
- package/lib/parser/cals/utils/block/helpers/merge-dataset.d.ts.map +0 -1
- package/lib/parser/cals/utils/block/helpers/merge-listeners.d.ts.map +0 -1
- package/lib/parser/cals/utils/block/helpers/merge-resources.d.ts.map +0 -1
- package/lib/parser/cals/utils/block/helpers/remap-component-ids.d.ts.map +0 -1
- package/lib/parser/cals/utils/block/helpers/renew-id-in-code.d.ts.map +0 -1
- package/lib/parser/cals/utils/block/helpers/renew-id-in-expr.d.ts.map +0 -1
- package/lib/parser/cals/utils/block/helpers/renew-id-in-resource.d.ts.map +0 -1
- package/lib/parser/cals/utils/block/helpers/resolve-new-id.d.ts.map +0 -1
- package/lib/parser/cals/utils/block/index.d.ts.map +0 -1
- package/lib/parser/cals/utils/code/index.d.ts.map +0 -1
- package/lib/parser/cals/utils/common.d.ts.map +0 -1
- package/lib/parser/cals/utils/getUsedReference.d.ts.map +0 -1
- package/lib/parser/cals/utils/getUsedResources.d.ts.map +0 -1
- package/lib/parser/cals/utils/runtime.d.ts.map +0 -1
- package/lib/parser/cals/utils/spinoff/index.d.ts.map +0 -1
- package/lib/parser/cals/utils/style.d.ts.map +0 -1
- package/lib/parser/cals/utils/template.d.ts.map +0 -1
- package/lib/parser/cals/utils/version/common.d.ts.map +0 -1
- package/lib/parser/cals/utils/version/config.d.ts.map +0 -1
- package/lib/parser/cals/utils/version/index.d.ts.map +0 -1
- package/lib/parser/cals/utils/version/parses.d.ts.map +0 -1
- package/lib/parser/cals/utils/version/utils.d.ts.map +0 -1
- package/lib/parser/dependiencies/index.d.ts.map +0 -1
- package/lib/parser/expression/index.d.ts.map +0 -1
- package/lib/parser/index.d.ts.map +0 -1
- package/lib/parser/plugins/postcss-rpx2clac.d.ts.map +0 -1
- package/lib/types/basic/app.d.ts.map +0 -1
- package/lib/types/basic/common.d.ts.map +0 -1
- package/lib/types/basic/component.d.ts.map +0 -1
- package/lib/types/basic/datasource.d.ts.map +0 -1
- package/lib/types/index.d.ts.map +0 -1
- package/lib/types/lcds.d.ts.map +0 -1
- package/lib/types/platform/app.d.ts.map +0 -1
- package/lib/types/platform/common.d.ts.map +0 -1
- package/lib/types/platform/component.d.ts.map +0 -1
- package/lib/types/platform/datasource.d.ts.map +0 -1
- package/lib/types/platform/eventFlow.d.ts.map +0 -1
- package/lib/types/platform/query.d.ts.map +0 -1
- package/lib/types/platform/theme.d.ts.map +0 -1
- package/lib/utils/CSSProperty.d.ts.map +0 -1
- package/lib/utils/color-generator/core.d.ts.map +0 -1
- package/lib/utils/color-generator/generate.d.ts.map +0 -1
- package/lib/utils/color-generator/utils.d.ts.map +0 -1
- package/lib/utils/constant.d.ts.map +0 -1
- package/lib/utils/dts/auto-generated.d.ts.map +0 -1
- package/lib/utils/dts/index.d.ts.map +0 -1
- package/lib/utils/index.d.ts.map +0 -1
- package/lib/utils/version/common.d.ts.map +0 -1
- package/lib/utils/version/featureChecker.d.ts.map +0 -1
- package/lib/utils/version/migrations/version4.d.ts.map +0 -1
- /package/lib/{parser → cjs/parser}/cals/index.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/get-component-namespace.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/get-component-namespace.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/merge-dataset.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/merge-dataset.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/merge-listeners.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/merge-listeners.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/merge-resources.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/merge-resources.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/remap-component-ids.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/renew-id-in-code.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/renew-id-in-code.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/renew-id-in-expr.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/renew-id-in-expr.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/renew-id-in-resource.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/renew-id-in-resource.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/resolve-new-id.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/resolve-new-id.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/block/index.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/block/index.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/code/index.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/code/index.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/common.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/getUsedReference.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/getUsedReference.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/getUsedResources.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/getUsedResources.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/runtime.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/runtime.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/spinoff/index.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/spinoff/index.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/style.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/style.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/template.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/template.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/version/common.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/version/common.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/version/config.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/version/config.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/version/index.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/version/index.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/version/parses.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/version/parses.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/version/utils.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/version/utils.js +0 -0
- /package/lib/{parser → cjs/parser}/dependiencies/index.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/dependiencies/index.js +0 -0
- /package/lib/{parser → cjs/parser}/expression/index.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/expression/index.js +0 -0
- /package/lib/{parser → cjs/parser}/index.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/index.js +0 -0
- /package/lib/{parser → cjs/parser}/plugins/postcss-rpx2clac.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/plugins/postcss-rpx2clac.js +0 -0
- /package/lib/{types → cjs/types}/basic/app.d.ts +0 -0
- /package/lib/{types → cjs/types}/basic/app.js +0 -0
- /package/lib/{types → cjs/types}/basic/common.d.ts +0 -0
- /package/lib/{types → cjs/types}/basic/common.js +0 -0
- /package/lib/{types → cjs/types}/basic/component.d.ts +0 -0
- /package/lib/{types → cjs/types}/basic/component.js +0 -0
- /package/lib/{types → cjs/types}/basic/datasource.d.ts +0 -0
- /package/lib/{types → cjs/types}/basic/datasource.js +0 -0
- /package/lib/{types → cjs/types}/index.d.ts +0 -0
- /package/lib/{types → cjs/types}/index.js +0 -0
- /package/lib/{types → cjs/types}/lcds.js +0 -0
- /package/lib/{types → cjs/types}/platform/app.js +0 -0
- /package/lib/{types → cjs/types}/platform/common.d.ts +0 -0
- /package/lib/{types → cjs/types}/platform/common.js +0 -0
- /package/lib/{types → cjs/types}/platform/component.js +0 -0
- /package/lib/{types → cjs/types}/platform/datasource.js +0 -0
- /package/lib/{types → cjs/types}/platform/eventFlow.d.ts +0 -0
- /package/lib/{types → cjs/types}/platform/eventFlow.js +0 -0
- /package/lib/{types → cjs/types}/platform/query.d.ts +0 -0
- /package/lib/{types → cjs/types}/platform/query.js +0 -0
- /package/lib/{types → cjs/types}/platform/theme.js +0 -0
- /package/lib/{utils → cjs/utils}/CSSProperty.d.ts +0 -0
- /package/lib/{utils → cjs/utils}/CSSProperty.js +0 -0
- /package/lib/{utils → cjs/utils}/color-generator/core.d.ts +0 -0
- /package/lib/{utils → cjs/utils}/color-generator/core.js +0 -0
- /package/lib/{utils → cjs/utils}/color-generator/generate.d.ts +0 -0
- /package/lib/{utils → cjs/utils}/color-generator/generate.js +0 -0
- /package/lib/{utils → cjs/utils}/color-generator/utils.d.ts +0 -0
- /package/lib/{utils → cjs/utils}/color-generator/utils.js +0 -0
- /package/lib/{utils → cjs/utils}/constant.d.ts +0 -0
- /package/lib/{utils → cjs/utils}/constant.js +0 -0
- /package/lib/{utils → cjs/utils}/dts/auto-generated.d.ts +0 -0
- /package/lib/{utils → cjs/utils}/dts/auto-generated.js +0 -0
- /package/lib/{utils → cjs/utils}/dts/build.d.ts +0 -0
- /package/lib/{utils → cjs/utils}/dts/build.js +0 -0
- /package/lib/{utils → cjs/utils}/dts/index.d.ts +0 -0
- /package/lib/{utils → cjs/utils}/dts/index.js +0 -0
- /package/lib/{utils → cjs/utils}/index.d.ts +0 -0
- /package/lib/{utils → cjs/utils}/index.js +0 -0
- /package/lib/{utils → cjs/utils}/version/common.d.ts +0 -0
- /package/lib/{utils → cjs/utils}/version/common.js +0 -0
- /package/lib/{utils → cjs/utils}/version/featureChecker.d.ts +0 -0
- /package/lib/{utils → cjs/utils}/version/featureChecker.js +0 -0
- /package/lib/{utils → cjs/utils}/version/migrations/version4.d.ts +0 -0
- /package/lib/{utils → cjs/utils}/version/migrations/version4.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../../src/utils/dts/build.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import fs from 'fs-extra';
|
|
11
|
+
import path from 'path';
|
|
12
|
+
import childProcess from 'child_process';
|
|
13
|
+
import os from 'os';
|
|
14
|
+
import watch from 'node-watch';
|
|
15
|
+
/**
|
|
16
|
+
* 生成函数公式的 dts
|
|
17
|
+
* 已包含的函数公式:packages/weda-client/src/common/<calculation|logic|text|time>
|
|
18
|
+
*/
|
|
19
|
+
function buildFormulaDTS() {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
// 确保在 packages/cals 目录执行该脚本
|
|
22
|
+
const baseDirPath = path.resolve('..', 'weda-client', 'src', 'common');
|
|
23
|
+
const formulaDirs = [
|
|
24
|
+
{
|
|
25
|
+
dir: 'calculation',
|
|
26
|
+
ignoreFunctions: [],
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
dir: 'logic',
|
|
30
|
+
ignoreFunctions: ['NotNull'],
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
dir: 'text',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
dir: 'time',
|
|
37
|
+
ignoreFunctions: [],
|
|
38
|
+
},
|
|
39
|
+
];
|
|
40
|
+
const dtsList = yield Promise.all(formulaDirs.map((fDir) => {
|
|
41
|
+
return genDTS(fDir.dir, fDir.ignoreFunctions);
|
|
42
|
+
}));
|
|
43
|
+
return dtsList.join('\n');
|
|
44
|
+
function genDTS(fDir, ignoreFunctions = []) {
|
|
45
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
+
const randomId = Math.random().toString(36).substring(2, 6);
|
|
47
|
+
const tempDtsPath = path.resolve(os.tmpdir(), `weda-temp-${randomId}.d.ts`);
|
|
48
|
+
yield new Promise((resolve) => {
|
|
49
|
+
childProcess.exec(`tsc ${path.resolve(baseDirPath, fDir, 'index.ts')} --declaration --emitDeclarationOnly --allowSyntheticDefaultImports true --out ${tempDtsPath}`, () => {
|
|
50
|
+
resolve('done');
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
let dts = yield fs.readFile(tempDtsPath, 'utf8');
|
|
54
|
+
yield fs.remove(tempDtsPath);
|
|
55
|
+
ignoreFunctions.forEach((fnName) => {
|
|
56
|
+
dts = dts.replace(new RegExp(`/\\*\\*(?:(?!\\*\\*)[\\s\\S])*export function ${fnName}\\(.*`), '');
|
|
57
|
+
});
|
|
58
|
+
// 去掉最外层的模块声明
|
|
59
|
+
return dts.replace(/[\s\S]*?declare module "common\/.*?" \{([\s\S]*)\}/, '$1').replace(/^\s+/gm, '');
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
function genWeDaAPPDTS() {
|
|
65
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
+
console.log('genWeDaAPPDTS processing...');
|
|
67
|
+
/**
|
|
68
|
+
* 获取所有的 DTS
|
|
69
|
+
*/
|
|
70
|
+
const wedaFrameworkDTS = yield fs.readFile(path.resolve(__dirname, 'framework', 'weda-framework.d.ts'), 'utf8'); // 低码框架
|
|
71
|
+
const wedaAppDTS = yield fs.readFile(path.resolve(__dirname, 'framework', 'weda-app.d.ts'), 'utf-8'); // app对象
|
|
72
|
+
const wedaPageDTS = yield fs.readFile(path.resolve(__dirname, 'framework', 'weda-page.d.ts'), 'utf-8'); // page对象
|
|
73
|
+
const wedaAuthDTS = yield fs.readFile(path.resolve(__dirname, 'framework', 'weda-auth.d.ts'), 'utf8'); // auth对象
|
|
74
|
+
const wedaCloudDTS = yield fs.readFile(path.resolve(__dirname, 'framework', 'weda-cloud.d.ts'), 'utf-8'); // cloud对象
|
|
75
|
+
const wedaUtilsDTS = yield fs.readFile(path.resolve(__dirname, 'framework', 'weda-utils.d.ts'), 'utf-8'); // page对象
|
|
76
|
+
const wedaDeviceDTS = yield fs.readFile(path.resolve(__dirname, 'framework', 'weda-device.d.ts'), 'utf8'); // device对象
|
|
77
|
+
const wedaEnvDTS = yield fs.readFile(path.resolve(__dirname, 'framework', 'weda-env.d.ts'), 'utf8'); // env对象
|
|
78
|
+
const wedaWedaContextDTS = yield fs.readFile(path.resolve(__dirname, 'framework', 'weda-wedaContext.d.ts'), 'utf8'); // wedaContext对象
|
|
79
|
+
const formulaDTS = yield buildFormulaDTS(); // 函数公式
|
|
80
|
+
/**
|
|
81
|
+
* 聚合 DTS
|
|
82
|
+
*/
|
|
83
|
+
const wedaDTS = groupDTSs({
|
|
84
|
+
wedaFrameworkDTS,
|
|
85
|
+
wedaAppDTS,
|
|
86
|
+
wedaPageDTS,
|
|
87
|
+
wedaAuthDTS,
|
|
88
|
+
wedaCloudDTS,
|
|
89
|
+
wedaUtilsDTS,
|
|
90
|
+
wedaDeviceDTS,
|
|
91
|
+
wedaEnvDTS,
|
|
92
|
+
wedaWedaContextDTS,
|
|
93
|
+
formulaDTS,
|
|
94
|
+
});
|
|
95
|
+
/**
|
|
96
|
+
* 将聚合结果保存在 auto-generated.ts
|
|
97
|
+
*/
|
|
98
|
+
yield fs.writeFile(path.resolve(__dirname, 'auto-generated.ts'), `export const wedaDTS = \`${wedaDTS}\``, 'utf8');
|
|
99
|
+
console.log('genWeDaAPPDTS done!');
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* 聚合所有的 DTS(不包括动态生成的)
|
|
104
|
+
*/
|
|
105
|
+
function groupDTSs({ wedaFrameworkDTS = '', wedaAppDTS = '', wedaPageDTS = '', wedaAuthDTS = '', wedaCloudDTS = '', wedaUtilsDTS = '', wedaDeviceDTS = '', wedaEnvDTS = '', wedaWedaContextDTS = '', formulaDTS = '', }) {
|
|
106
|
+
let resultDts = wedaFrameworkDTS;
|
|
107
|
+
// $app
|
|
108
|
+
resultDts = resultDts.replaceAll("// $app - Don't touch me", wedaAppDTS);
|
|
109
|
+
// $page
|
|
110
|
+
resultDts = resultDts.replaceAll("// $page - Don't touch me", wedaPageDTS);
|
|
111
|
+
// $w.auth
|
|
112
|
+
resultDts = resultDts.replaceAll("// $w.auth - Don't touch me", wedaAuthDTS.replace(/declare/g, ''));
|
|
113
|
+
// $w.cloud
|
|
114
|
+
resultDts = resultDts.replaceAll("// $w.cloud - Don't touch me", wedaCloudDTS.replace(/declare/g, ''));
|
|
115
|
+
// $w.device
|
|
116
|
+
resultDts = resultDts.replaceAll("// $w.device - Don't touch me", wedaDeviceDTS.replace(/declare/g, ''));
|
|
117
|
+
// $w.env
|
|
118
|
+
resultDts = resultDts.replaceAll("// $w.env - Don't touch me", wedaEnvDTS.replace(/declare/g, ''));
|
|
119
|
+
// $w.wedaContext
|
|
120
|
+
resultDts = resultDts.replaceAll("// $w.wedaContext - Don't touch me", wedaWedaContextDTS.replace(/declare/g, ''));
|
|
121
|
+
// $w.utils
|
|
122
|
+
resultDts = resultDts.replaceAll("// $w.utils - Don't touch me", wedaUtilsDTS.replace(/declare/g, ''));
|
|
123
|
+
// 函数公式:$w.xxx
|
|
124
|
+
resultDts = resultDts.replaceAll("// Formula 函数公式 - Don't touch me", formulaDTS.replace(/export/g, ''));
|
|
125
|
+
// 函数公式:全局变量提示
|
|
126
|
+
resultDts = resultDts.replace("// Global Formula 全局函数公式- Don't touch me", formulaDTS.replace(/export/g, 'declare'));
|
|
127
|
+
return resultDts;
|
|
128
|
+
}
|
|
129
|
+
function main() {
|
|
130
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
131
|
+
yield genWeDaAPPDTS();
|
|
132
|
+
const [, , watchArgv] = process.argv;
|
|
133
|
+
if (watchArgv === '--watch') {
|
|
134
|
+
console.log('Start watching mode');
|
|
135
|
+
watch(path.resolve(__dirname, 'framework', 'weda-framework.d.ts'), genWeDaAPPDTS);
|
|
136
|
+
watch(path.resolve(__dirname, 'framework', 'weda-app.d.ts'), genWeDaAPPDTS);
|
|
137
|
+
watch(path.resolve(__dirname, 'framework', 'weda-page.d.ts'), genWeDaAPPDTS);
|
|
138
|
+
watch(path.resolve(__dirname, 'framework', 'weda-auth.d.ts'), genWeDaAPPDTS);
|
|
139
|
+
watch(path.resolve(__dirname, 'framework', 'weda-cloud.d.ts'), genWeDaAPPDTS);
|
|
140
|
+
watch(path.resolve(__dirname, 'framework', 'weda-device.d.ts'), genWeDaAPPDTS);
|
|
141
|
+
watch(path.resolve(__dirname, 'framework', 'weda-env.d.ts'), genWeDaAPPDTS);
|
|
142
|
+
watch(path.resolve(__dirname, 'framework', 'weda-wedaContext.d.ts'), genWeDaAPPDTS);
|
|
143
|
+
watch(path.resolve(__dirname, 'framework', 'weda-utils.d.ts'), genWeDaAPPDTS);
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
main();
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { IJsonSchemaAny, IJsonSchemaObject } from '../../types';
|
|
2
|
+
export interface IPrivateForWeDa {
|
|
3
|
+
displayType: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
dataFieldInfo?: {
|
|
6
|
+
type?: string;
|
|
7
|
+
format?: string;
|
|
8
|
+
'x-system': boolean;
|
|
9
|
+
};
|
|
10
|
+
insertText: string;
|
|
11
|
+
group?: string;
|
|
12
|
+
subGroup?: string;
|
|
13
|
+
doc?: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
definition?: string;
|
|
16
|
+
schema?: IJsonSchemaAny;
|
|
17
|
+
baseClass?: string;
|
|
18
|
+
datasource?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface IDTSCodeItem {
|
|
21
|
+
name: string;
|
|
22
|
+
code: string;
|
|
23
|
+
}
|
|
24
|
+
export interface IInputDataUsedComponents {
|
|
25
|
+
module: string;
|
|
26
|
+
component: string;
|
|
27
|
+
exportProperties?: IJsonSchemaObject;
|
|
28
|
+
exportMethods?: {
|
|
29
|
+
name: string;
|
|
30
|
+
input?: IJsonSchemaObject;
|
|
31
|
+
output?: IJsonSchemaAny;
|
|
32
|
+
}[];
|
|
33
|
+
}
|
|
34
|
+
export interface IInputDataWidgetItem {
|
|
35
|
+
module: string;
|
|
36
|
+
component: string;
|
|
37
|
+
idList: string[];
|
|
38
|
+
}
|
|
39
|
+
export interface IInputDataRepeaterItem {
|
|
40
|
+
widgetId: string;
|
|
41
|
+
currentItemAlias: string;
|
|
42
|
+
currentIndexAlias: string;
|
|
43
|
+
itemData: IJsonSchemaAny;
|
|
44
|
+
}
|
|
45
|
+
export interface IInputDataRedefineAnyType {
|
|
46
|
+
module: string;
|
|
47
|
+
component: string;
|
|
48
|
+
widgetId: string;
|
|
49
|
+
updateProps: {
|
|
50
|
+
widgetPropName: string;
|
|
51
|
+
widgetPropTitle: string;
|
|
52
|
+
widgetPropTypeSchema: IJsonSchemaAny;
|
|
53
|
+
datasource: {
|
|
54
|
+
id: string;
|
|
55
|
+
name: string;
|
|
56
|
+
title: string;
|
|
57
|
+
type: 'ds' | 'apis';
|
|
58
|
+
};
|
|
59
|
+
}[];
|
|
60
|
+
}
|
|
61
|
+
export interface IOptions {
|
|
62
|
+
isCompMode?: boolean;
|
|
63
|
+
needGlobalFormula?: boolean;
|
|
64
|
+
needGlobalFor?: boolean;
|
|
65
|
+
scope?: 'component' | 'page' | 'global';
|
|
66
|
+
}
|
|
67
|
+
export declare enum IInputDataType {
|
|
68
|
+
globalState = "globalState",
|
|
69
|
+
globalQuery = "globalQuery",
|
|
70
|
+
pageState = "pageState",
|
|
71
|
+
pageQuery = "pageQuery",
|
|
72
|
+
compState = "compState",
|
|
73
|
+
pageParams = "pageParams",
|
|
74
|
+
pageEventFlow = "pageEventFlow",
|
|
75
|
+
forState = "forState",
|
|
76
|
+
globalCommonCodes = "globalCommonCodes",
|
|
77
|
+
pageHandlerCodes = "pageHandlerCodes",
|
|
78
|
+
compHandlerCodes = "compHandlerCodes",
|
|
79
|
+
compPropData = "compPropData",
|
|
80
|
+
compPropEvents = "compPropEvents",
|
|
81
|
+
usedComponents = "usedComponents",
|
|
82
|
+
usedWidgets = "usedWidgets",
|
|
83
|
+
repeaterScope = "repeaterScope",
|
|
84
|
+
redefineAnyType = "redefineAnyType",
|
|
85
|
+
serverSideSate = "serverSideSate",
|
|
86
|
+
dtsString = "dtsString"
|
|
87
|
+
}
|
|
88
|
+
export interface IInputData {
|
|
89
|
+
[IInputDataType.globalState]?: IJsonSchemaObject;
|
|
90
|
+
[IInputDataType.globalQuery]?: IJsonSchemaObject;
|
|
91
|
+
[IInputDataType.pageState]?: IJsonSchemaObject;
|
|
92
|
+
[IInputDataType.pageQuery]?: IJsonSchemaObject;
|
|
93
|
+
[IInputDataType.pageEventFlow]?: IJsonSchemaObject;
|
|
94
|
+
[IInputDataType.compState]?: IJsonSchemaObject;
|
|
95
|
+
[IInputDataType.pageParams]?: IJsonSchemaObject;
|
|
96
|
+
[IInputDataType.forState]?: IJsonSchemaObject;
|
|
97
|
+
[IInputDataType.globalCommonCodes]?: IDTSCodeItem[];
|
|
98
|
+
[IInputDataType.pageHandlerCodes]?: IDTSCodeItem[];
|
|
99
|
+
[IInputDataType.compHandlerCodes]?: IDTSCodeItem[];
|
|
100
|
+
[IInputDataType.compPropData]?: IJsonSchemaObject;
|
|
101
|
+
[IInputDataType.compPropEvents]?: string[];
|
|
102
|
+
[IInputDataType.usedComponents]?: IInputDataUsedComponents[];
|
|
103
|
+
[IInputDataType.usedWidgets]?: IInputDataWidgetItem[];
|
|
104
|
+
[IInputDataType.repeaterScope]?: IInputDataRepeaterItem[];
|
|
105
|
+
[IInputDataType.redefineAnyType]?: IInputDataRedefineAnyType[];
|
|
106
|
+
[IInputDataType.serverSideSate]?: boolean;
|
|
107
|
+
[IInputDataType.dtsString]?: string;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* 通过该类可以共享同个dts。
|
|
111
|
+
* 场景:在 weda 中,低代码的变更会通知更改 dts,而低码编辑器和表达式编辑器对 dts 的需求是不一样的,这样不同的 dts 共享的是同一份全的 dts。如果直接调用 generateWeDaAppDTS 会导致 dts 重复地解析
|
|
112
|
+
*/
|
|
113
|
+
export declare class WeDaDTS {
|
|
114
|
+
private static _dts;
|
|
115
|
+
/**
|
|
116
|
+
* 全部更新
|
|
117
|
+
*/
|
|
118
|
+
static updateDTS(inputData?: IInputData, options?: Pick<IOptions, 'isCompMode'>): Promise<void>;
|
|
119
|
+
/**
|
|
120
|
+
* 部分更新 - 只更新一种类型
|
|
121
|
+
*/
|
|
122
|
+
static updateDTSPartial(inputData: IJsonSchemaObject | IDTSCodeItem[] | string[] | IInputDataUsedComponents[] | IInputDataWidgetItem[] | IInputDataRepeaterItem[] | IInputDataRedefineAnyType[] | string, itemType: IInputDataType, options?: {
|
|
123
|
+
setEmptyIfError: boolean;
|
|
124
|
+
}): Promise<void>;
|
|
125
|
+
static getDTS(options?: Omit<IOptions, 'isCompMode'>): string;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* 生成 WeDa 应用的低码代码提示的 dts 类型声明内容
|
|
129
|
+
*/
|
|
130
|
+
export declare function generateWeDaAppDTS(inputData?: IInputData, options?: IOptions): Promise<string>;
|
|
131
|
+
export declare const workerCode = "\nimportScripts('https://qbase.cdn-go.cn/lcap/lcap-resource-cdngo/-/release/_url/devtools/typescriptServices.min.js');\nimportScripts('https://qbase.cdn-go.cn/lcap/lcap-resource-cdngo/-/release/_url/devtools/ts-lib.min.js');\n\nconst files = {\n \"foo.ts\": '',\n \"lib.d.ts\": libFileMap['lib.es5.d.ts']\n};\n\nfunction createLanguageService() {\n return ts.createLanguageService({\n getCompilationSettings() {\n return {};\n },\n getScriptFileNames() {\n return [\"foo.ts\", \"lib.d.ts\"];\n },\n getScriptVersion(_fileName) {\n // \u8FD9\u6837\u53EF\u907F\u514D\u4F7F\u7528\u7F13\u5B58\n if (_fileName === 'foo.ts')\n return 'v_' + Math.random();\n return ''\n },\n getScriptSnapshot(fileName) {\n if (fileName === \".ts\") {\n return ts.ScriptSnapshot.fromString(\"\");\n }\n return ts.ScriptSnapshot.fromString(files[fileName] || \"\");\n },\n getCurrentDirectory: () => \".\",\n getDefaultLibFileName(options) {\n return 'lib.d.ts'\n },\n fileExists: name => !!files[name],\n readFile: name => {\n return files[name]\n }\n });\n}\nconst languageService = createLanguageService();\n\nfunction transpile(code) {\n files[\"foo.ts\"] = code\n const result = languageService.getEmitOutput(\n \"foo.ts\",\n /*emitOnlyDtsFiles*/ true,\n /*forceDtsEmit*/ true\n )\n return result.outputFiles[0].text.trim()\n}\n\naddEventListener('message', (message) => {\n const {action, data: {id, code}} = message.data\n switch(action) {\n case 'dts':\n const dts = transpile(code)\n postMessage({action: 'dts_back', data: {id, dts}})\n break\n default:\n break\n }\n})\n";
|
|
132
|
+
/**
|
|
133
|
+
* 通过 js/ts 代码生成 dts
|
|
134
|
+
*/
|
|
135
|
+
export declare function transpileToDTS(code: string): Promise<string>;
|
|
136
|
+
export declare const jsonToDTSWorkerCode = "\nimportScripts('https://qbase.cdn-go.cn/lcap/lcap-resource-cdngo/-/release/_url/devtools/json-schema-to-typescript-for-browser.min-11.0.5.js');\n\nfunction transpile(jsonschema) {\n return jstt.compile(jsonschema, 'IWeDa', { additionalProperties: true, bannerComment: '', format: false, unknownAny: false })\n}\n\naddEventListener('message', (message) => {\n const {action, data: {id, jsonschema}} = message.data\n switch(action) {\n case 'dts':\n transpile(jsonschema).then(dts => {\n postMessage({action: 'dts_back', data: {id, dts}})\n }).catch(err => postMessage({action: 'dts_back', data: {id, dts: 'Parse error:' + err.message}}))\n break\n default:\n break\n }\n})\n";
|
|
137
|
+
/**
|
|
138
|
+
* Webworker 版本的 JSON to DTS
|
|
139
|
+
*/
|
|
140
|
+
export declare function compileJSONToDTS(jsonschema: any): Promise<string>;
|
|
141
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/dts/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGhE,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE;QAEd,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,OAAO,CAAC;KACrB,CAAC;IACF,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAA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