@das-fed/cli 6.4.0-hot.27 → 6.4.0-hot.28
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 +1 -1
- package/src/commands/build/get-window-config.js +1 -0
- package/src/commands/build/index.js +1 -1
- package/src/commands/build/nginx.main.conf +54 -54
- package/src/commands/build/nginx.micro.conf +61 -61
- package/src/commands/dev-helper/watchers/i18n/index.js +1 -1
- package/src/commands/extra/i18n/index.js +2 -2
- package/src/commands/helper/modules/gen-auth/gen/dist/config.js +1 -0
- package/src/commands/helper/modules/gen-auth/gen/dist/config.local.js +1 -0
- package/src/commands/helper/modules/gen-auth/gen/dist/index.js +1 -0
- package/src/commands/init/template/.prettierignore +21 -21
- package/src/commands/init/template/.prettierrc +8 -8
- package/src/commands/init/template/README.md +28 -28
- package/src/commands/init/template/config.js +3 -3
- package/src/commands/init/template/index.html +12 -12
- package/src/commands/init/template/package.json +12 -12
- package/src/commands/init/template/public/config.js +4 -4
- package/src/commands/init/template/src/das-web-app.ts +9 -9
- package/src/commands/init/template/src/main.ts +9 -9
- package/src/commands/init/template/src/micro-app.ts +8 -8
- package/src/commands/init/template/src/views/demo/app.vue +61 -61
- package/src/commands/init/template/src/views/demo/i18n/index.ts +14 -14
- package/src/commands/init/template/src/views/demo/router.ts +13 -13
- package/src/commands/init/template/src/views/demo/theme/index.ts +7 -7
- package/src/commands/init/template/src/views/hello/api/index.ts +6 -6
- package/src/commands/init/template/src/views/hello/app.vue +157 -157
- package/src/commands/init/template/src/views/hello/i18n/index.ts +16 -16
- package/src/commands/init/template/src/views/hello/router.ts +12 -12
- package/src/commands/init/template/src/views/hello/theme/index.ts +18 -18
- package/src/commands/init/template/src/vite-env.d.ts +1 -1
- package/src/commands/init/template/tsconfig.app.json +28 -28
- package/src/commands/init/template/tsconfig.json +11 -11
- package/src/commands/init/template/tsconfig.node.json +13 -13
- package/src/commands/init/template/vite.config.ts +11 -11
- package/src/vite-plugins/das-fe-ui/index.js +1 -1
- package/src/vite-plugins/das-fe-web/index.js +1 -1
- package/src/vite-plugins/das-fe-resolve/index.js +0 -1
- package/src/vite-plugins/dynamic-entry/index.js +0 -1
@@ -1,28 +1,28 @@
|
|
1
|
-
{
|
2
|
-
"compilerOptions": {
|
3
|
-
"composite": true,
|
4
|
-
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
5
|
-
"target": "ES2020",
|
6
|
-
"useDefineForClassFields": true,
|
7
|
-
"module": "ESNext",
|
8
|
-
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
9
|
-
"skipLibCheck": true,
|
10
|
-
|
11
|
-
/* Bundler mode */
|
12
|
-
"moduleResolution": "bundler",
|
13
|
-
"allowImportingTsExtensions": true,
|
14
|
-
"resolveJsonModule": true,
|
15
|
-
"isolatedModules": true,
|
16
|
-
"moduleDetection": "force",
|
17
|
-
"noEmit": true,
|
18
|
-
"jsx": "preserve",
|
19
|
-
"jsxImportSource": "vue", // vue 3.4+ 需要显示指定jsx导出为vue
|
20
|
-
|
21
|
-
/* Linting */
|
22
|
-
"strict": true,
|
23
|
-
"noUnusedLocals": true,
|
24
|
-
"noUnusedParameters": true,
|
25
|
-
"noFallthroughCasesInSwitch": true
|
26
|
-
},
|
27
|
-
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"]
|
28
|
-
}
|
1
|
+
{
|
2
|
+
"compilerOptions": {
|
3
|
+
"composite": true,
|
4
|
+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
5
|
+
"target": "ES2020",
|
6
|
+
"useDefineForClassFields": true,
|
7
|
+
"module": "ESNext",
|
8
|
+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
9
|
+
"skipLibCheck": true,
|
10
|
+
|
11
|
+
/* Bundler mode */
|
12
|
+
"moduleResolution": "bundler",
|
13
|
+
"allowImportingTsExtensions": true,
|
14
|
+
"resolveJsonModule": true,
|
15
|
+
"isolatedModules": true,
|
16
|
+
"moduleDetection": "force",
|
17
|
+
"noEmit": true,
|
18
|
+
"jsx": "preserve",
|
19
|
+
"jsxImportSource": "vue", // vue 3.4+ 需要显示指定jsx导出为vue
|
20
|
+
|
21
|
+
/* Linting */
|
22
|
+
"strict": true,
|
23
|
+
"noUnusedLocals": true,
|
24
|
+
"noUnusedParameters": true,
|
25
|
+
"noFallthroughCasesInSwitch": true
|
26
|
+
},
|
27
|
+
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"]
|
28
|
+
}
|
@@ -1,11 +1,11 @@
|
|
1
|
-
{
|
2
|
-
"files": [],
|
3
|
-
"references": [
|
4
|
-
{
|
5
|
-
"path": "./tsconfig.app.json"
|
6
|
-
},
|
7
|
-
{
|
8
|
-
"path": "./tsconfig.node.json"
|
9
|
-
}
|
10
|
-
]
|
11
|
-
}
|
1
|
+
{
|
2
|
+
"files": [],
|
3
|
+
"references": [
|
4
|
+
{
|
5
|
+
"path": "./tsconfig.app.json"
|
6
|
+
},
|
7
|
+
{
|
8
|
+
"path": "./tsconfig.node.json"
|
9
|
+
}
|
10
|
+
]
|
11
|
+
}
|
@@ -1,13 +1,13 @@
|
|
1
|
-
{
|
2
|
-
"compilerOptions": {
|
3
|
-
"composite": true,
|
4
|
-
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
5
|
-
"skipLibCheck": true,
|
6
|
-
"module": "ESNext",
|
7
|
-
"moduleResolution": "bundler",
|
8
|
-
"allowSyntheticDefaultImports": true,
|
9
|
-
"strict": true,
|
10
|
-
"noEmit": true
|
11
|
-
},
|
12
|
-
"include": ["vite.config.ts"]
|
13
|
-
}
|
1
|
+
{
|
2
|
+
"compilerOptions": {
|
3
|
+
"composite": true,
|
4
|
+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
5
|
+
"skipLibCheck": true,
|
6
|
+
"module": "ESNext",
|
7
|
+
"moduleResolution": "bundler",
|
8
|
+
"allowSyntheticDefaultImports": true,
|
9
|
+
"strict": true,
|
10
|
+
"noEmit": true
|
11
|
+
},
|
12
|
+
"include": ["vite.config.ts"]
|
13
|
+
}
|
@@ -1,11 +1,11 @@
|
|
1
|
-
import { defineConfig } from 'vite'
|
2
|
-
import { dasFeWebVitePlugin } from '@das-fed/cli'
|
3
|
-
import config from './config.js'
|
4
|
-
|
5
|
-
// https://vitejs.dev/config/
|
6
|
-
export default defineConfig(({ command }) => {
|
7
|
-
return {
|
8
|
-
define: { __MICRO_APPNAME__: JSON.stringify(config.microAppName) },
|
9
|
-
plugins: [dasFeWebVitePlugin()],
|
10
|
-
}
|
11
|
-
})
|
1
|
+
import { defineConfig } from 'vite'
|
2
|
+
import { dasFeWebVitePlugin } from '@das-fed/cli'
|
3
|
+
import config from './config.js'
|
4
|
+
|
5
|
+
// https://vitejs.dev/config/
|
6
|
+
export default defineConfig(({ command }) => {
|
7
|
+
return {
|
8
|
+
define: { __MICRO_APPNAME__: JSON.stringify(config.microAppName) },
|
9
|
+
plugins: [dasFeWebVitePlugin()],
|
10
|
+
}
|
11
|
+
})
|
@@ -1 +1 @@
|
|
1
|
-
import{resolve,extname}from"path";import fs from"fs-extra";import MagicString from"magic-string";import stripComments from"strip-comments";import kebabCase from"lodash-es/kebabCase.js";import{parseImportCode}from"../../utils/parse-import-code.js";let cwd=process.cwd(),nodeModulesDir=resolve(cwd,"node_modules"),nodeModulesDasUIDir=resolve(cwd,"node_modules/@das-fed/ui"),dasFeUIEsmMapPath=resolve(nodeModulesDasUIDir,"esm-map.json"),dasFeUIEsmMapPathPathExits=fs.existsSync(dasFeUIEsmMapPath),esmMap=dasFeUIEsmMapPathPathExits?fs.readJSONSync(dasFeUIEsmMapPath):{},iconComponentName="DasIcon",getEsmPath=e=>{let s=esmMap[e];
|
1
|
+
import{resolve,extname}from"path";import fs from"fs-extra";import MagicString from"magic-string";import stripComments from"strip-comments";import kebabCase from"lodash-es/kebabCase.js";import{parseImportCode}from"../../utils/parse-import-code.js";let cwd=process.cwd(),nodeModulesDir=resolve(cwd,"node_modules"),nodeModulesDasUIDir=resolve(cwd,"node_modules/@das-fed/ui"),dasFeUIEsmMapPath=resolve(nodeModulesDasUIDir,"esm-map.json"),dasFeUIEsmMapPathPathExits=fs.existsSync(dasFeUIEsmMapPath),esmMap=dasFeUIEsmMapPathPathExits?fs.readJSONSync(dasFeUIEsmMapPath):{},iconComponentName="DasIcon",getEsmPath=e=>{let s=esmMap[e];return s=s.endsWith("/index")?s.slice(0,-6):s},DasFeUIEsm=e=>({name:"das-fed-ui-esm",enforce:"pre",async transform(e,s){if(!(-1<s.indexOf("?"))&&!(-1<s.indexOf("@das-fed/ui/packages/icon"))&&[".vue",".ts",".js",".jsx",".tsx"].includes(extname(s))){s=parseImportCode(e,"@das-fed/ui");if(s){var t,o=new MagicString(e);for(t of s){let a="";for(var r of t.members){var d=r.name,i=getEsmPath(d);if(i){a+=`import { ${r.code} } from '@das-fed/ui${i}';`;let e=resolve(nodeModulesDir,`@das-fed/ui${i}/style.css`),s=`import '@das-fed/ui${i}/style.css';`;d.startsWith(iconComponentName)&&(r=getEsmPath(iconComponentName),e=resolve(nodeModulesDir,`@das-fed/ui${r}/style.css`),s=`import '@das-fed/ui${r}/style.css';`);i=await fs.exists(e);i&&(a+=s)}}a&&o.overwrite(t.start,t.end,a)}return o.toString()}}}});export default(e={})=>[DasFeUIEsm(e)];
|
@@ -1 +1 @@
|
|
1
|
-
import{resolve,extname}from"path";import fs from"fs-extra";import MagicString from"magic-string";import{parseImportCode}from"../../utils/parse-import-code.js";let cwd=process.cwd(),dasFeWeb=e=>{let
|
1
|
+
import{resolve,extname}from"path";import fs from"fs-extra";import{createStyleImportPlugin}from"vite-plugin-style-import";import MagicString from"magic-string";import{parseImportCode}from"../../utils/parse-import-code.js";let cwd=process.cwd(),dasFeWebStylePath=resolve(cwd,"node_modules","@das-fed/web/style.css"),dasFeWebStylePathExits=fs.existsSync(dasFeWebStylePath),dasFeWeb=e=>{let t;return{name:"das-fe-web",config:(e,{})=>({resolve:{alias:{"@":resolve(process.cwd(),"src")}},build:{rollupOptions:{output:{}}}}),configResolved(e){t=e},buildStart:async()=>{t.cwd=resolve(process.cwd())},transformIndexHtml:{order:"post",handler:()=>{var e=t.base||"/";let s="development"===t.mode?e+"config.local.js":e+"config.js";return[{tag:"script",attrs:{src:s}}]}}}},WebStyleResolve=()=>({libraryName:"@das-fed/web",base:dasFeWebStylePathExits?"@das-fed/web/style.css":void 0}),styleImport=(e={})=>e.styleResolve?createStyleImportPlugin({resolves:[WebStyleResolve()]}):null,dasFeWebEsmMapPath=resolve(cwd,"node_modules","@das-fed/web/esm-map.json"),dasFeWebEsmMapPathExits=fs.existsSync(dasFeWebEsmMapPath),esmMap=dasFeWebEsmMapPathExits?fs.readJSONSync(dasFeWebEsmMapPath):{},dasFeWebEsm=async e=>({name:"das-fed-web-esm",enforce:"pre",transform(e,t){if(dasFeWebEsmMapPathExits&&!(-1<t.indexOf("?"))&&[".vue",".ts",".js",".jsx",".tsx"].includes(extname(t))){t=parseImportCode(e,"@das-fed/web");if(t){let s=new MagicString(e);return t.map(e=>{let t="";e.members.map(e=>{var s=e.name,s=esmMap[s];s&&(t+=`import { ${e.code} } from '@das-fed/web${s}';`)}),s.overwrite(e.start,e.end,t)}),s.toString()}}}});export default e=>[dasFeWeb(e),styleImport(e),dasFeWebEsm(e)];export{styleImport};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{resolve,extname}from"path";import dayjs from"dayjs";import fs from"fs-extra";import{parse as lexerParse}from"es-module-lexer";import MagicString from"magic-string";import{parseImportCode}from"../../utils/parse-import-code.js";let dasFeExternal=e=>{var r=process.cwd();resolve(r,"node_modules");let n=["@das-fed/web","@das-fed/ui","@das-fed/utils"];return{name:"das-fe-web-app-external",enforce:"pre",apply:"build",async transform(e,r){if(!(-1<r.indexOf("?"))&&[".vue",".ts",".js",".jsx",".tsx"].includes(extname(r))){if([".ts",".js"].includes(extname(r))&&r.indexOf("node_modules")<0){var s,[r,,]=lexerParse(e),a=new MagicString(e);for(s of r){var t=e.slice(s.s,s.e);!t.startsWith("@das-fed/")||t.endsWith(".js")||(t.endsWith("/index")?a.overwrite(s.s,s.e,t+".js"):a.overwrite(s.s,s.e,t+"/index.js"))}e=a.toString()}var i,r=parseImportCode(e);if(r)for(i of r.filter(e=>e.name.startsWith("@das-fed/")).filter(e=>!n.includes(e.name)))i.name.endsWith(".js")||(e=i.name.endsWith("/index")?e.replaceAll(`'${i.name}'`,`'${i.name}.js'`):e.replaceAll(`'${i.name}'`,`'${i.name}/index.js'`));return e}}}};export default e=>[dasFeExternal()];
|
@@ -1 +0,0 @@
|
|
1
|
-
import{resolve}from"path";import fs from"fs-extra";export default(s="/src/main.ts")=>{let a=process.cwd();return{name:"das-fe-dynamic-entry",apply:"serve",transformIndexHtml:{order:"pre",handler:async r=>{var e="/src/main.dev.ts";return await fs.exists(resolve(a,"."+e))?r.replace(s,e):r}}}};
|