@das-fed/cli 7.1.0-qatar.11 → 7.1.0-qatar.12

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@das-fed/cli",
3
- "version": "7.1.0-qatar.11",
3
+ "version": "7.1.0-qatar.12",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -1 +1 @@
1
- import json5 from"json5";import{resolve}from"path";import{getExportDefaultsByAst}from"../../../../utils/ts-morph/index.js";import{json2type}from"../../../../utils/json2type/index.js";import{json2snippets}from"../../../../utils/json2snippets/index.js";import{getCliConfig}from"../../../../utils/get-cli-config/index.js";let watchGlob=["src/**/theme/*.ts"],handle=async(e={})=>{var t=e.cwd,s=await getCliConfig(),o=s.theme?.watchGlob||[],o=getExportDefaultsByAst([...watchGlob,...o],e);let r={},a=(o.map((e,t)=>{let s=e.defaultText;var o,e=s.match(/getVar\(.*\)/g);if(!e)return Object.assign(r,json5.parse(s));for(o of e){var a=o.replace("getVar('","").replace("')","");s=s.replace(o,`'var(${a})'`)}Object.assign(r,json5.parse(s))}),{light:""}),l=(Object.values(r).filter(e=>!!e.light).map(e=>Object.assign(a,e)),0===Object.keys(r).length&&(r.any=""),json2type({data:[{title:"ThemeName",type:"string",enum:Object.keys(a)},{title:"ThemeVarKey",type:"string",enum:Object.keys(r)}],outputFilePath:resolve(t,"src/das-fe-local-runtime/theme-runtime/type.d.ts")}),resolve(t,".vscode/das-theme.local.code-snippets"));s.workspaceRoot&&(e=resolve(t,s.workspaceRoot),l=resolve(e,".vscode/das-theme.local.code-snippets")),json2snippets({data:{"das-theme-css变量":{prefix:"dasvar",body:[`var(\${1|${Object.keys(r).join(",")}|})`],scope:"css,scss,less",description:"das-theme-css变量"}},outputFilePath:l})};export default{name:"das-theme",glob:watchGlob,ignoreGlob:[],load:handle,change:handle};
1
+ import json5 from"json5";import{resolve}from"path";import{getExportDefaultsByAst}from"../../../../utils/ts-morph/index.js";import{json2type}from"../../../../utils/json2type/index.js";import{json2snippets}from"../../../../utils/json2snippets/index.js";import{getCliConfig}from"../../../../utils/get-cli-config/index.js";let watchGlob=["src/**/theme/*.ts"],handle=async(e={})=>{var t=e.cwd,s=await getCliConfig(),o=s.theme?.watchGlob||[],o=getExportDefaultsByAst([...watchGlob,...o],e);let r={},a=(o.map((e,t)=>{let s=e.defaultText;var o,e=s.match(/getVar\('[^']*'\)/g)||s.match(/getVar\("[^"]*"\)/g);if(!e)return Object.assign(r,json5.parse(s));for(o of e){var a=o.includes("getVar('")?"'":'"',a=o.replace("getVar("+a,"").replace(a+")","");s=s.replace(o,`'var(${a})'`)}Object.assign(r,json5.parse(s))}),{light:""}),l=(Object.values(r).filter(e=>!!e.light).map(e=>Object.assign(a,e)),0===Object.keys(r).length&&(r.any=""),json2type({data:[{title:"ThemeName",type:"string",enum:Object.keys(a)},{title:"ThemeVarKey",type:"string",enum:Object.keys(r)}],outputFilePath:resolve(t,"src/das-fe-local-runtime/theme-runtime/type.d.ts")}),resolve(t,".vscode/das-theme.local.code-snippets"));s.workspaceRoot&&(e=resolve(t,s.workspaceRoot),l=resolve(e,".vscode/das-theme.local.code-snippets")),json2snippets({data:{"das-theme-css变量":{prefix:"dasvar",body:[`var(\${1|${Object.keys(r).join(",")}|})`],scope:"css,scss,less",description:"das-theme-css变量"}},outputFilePath:l})};export default{name:"das-theme",glob:watchGlob,ignoreGlob:[],load:handle,change:handle};