@servicetitan/startup 34.3.0-beta.0 → 34.3.0-beta.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.
@@ -1 +1 @@
1
- {"version":3,"file":"base-config.d.ts","sourceRoot":"","sources":["../../src/vite/base-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AACzC,OAAO,EACH,YAAY,EAMf,MAAM,SAAS,CAAC;AAkBjB,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,YAAY,GAAG,YAAY,CA2CpE"}
1
+ {"version":3,"file":"base-config.d.ts","sourceRoot":"","sources":["../../src/vite/base-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AACzC,OAAO,EACH,YAAY,EAMf,MAAM,SAAS,CAAC;AAkBjB,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,YAAY,GAAG,YAAY,CAoDpE"}
@@ -40,6 +40,17 @@ function createBaseConfig(context) {
40
40
  legalComments: 'none'
41
41
  },
42
42
  base: './',
43
+ css: {
44
+ modules: {
45
+ localsConvention: 'camelCaseOnly',
46
+ generateScopedName: isProduction ? '[local]__[hash:base64:5]' : '[local]'
47
+ },
48
+ preprocessorOptions: {
49
+ less: {
50
+ math: 'always'
51
+ }
52
+ }
53
+ },
43
54
  build: {
44
55
  outDir: (0, _core.getOutputPath)(context),
45
56
  // Preserves shared deps in dist/bundle/shared/ when host rebuilds into dist/bundle/
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/vite/base-config.ts"],"sourcesContent":["import type { InlineConfig } from 'vite';\nimport {\n BuildContext,\n defineExposedDependencies,\n defineExposedInstanceDependencies,\n defineWebComponentName,\n getBundleType,\n getOutputPath,\n} from '../core';\n\nfunction importMetaRemap(\n ...definitions: (Record<string, string> | undefined)[]\n): Record<string, string> {\n const result: Record<string, string> = {};\n\n definitions\n .filter(definition => definition !== undefined)\n .forEach(definition =>\n Object.keys(definition).forEach(item => {\n result[`import.meta.env.${item}`] = definition[item];\n })\n );\n\n return result;\n}\n\nexport function createBaseConfig(context: BuildContext): InlineConfig {\n const { isProduction } = context.build;\n const { isWebComponent } = context.package;\n\n return {\n cacheDir: `node_modules/.vite/${getBundleType(context) ?? 'host'}`,\n server: {\n // TODO: need default port for MFE?\n port: isWebComponent ? 8888 : 8080,\n warmup: {\n /*\n * TODO: dist duplication/use destination\n * Pre-warms compiled files to avoid multiple page reloads at dev session start\n */\n clientFiles: ['dist/**/*.js'],\n },\n },\n mode: isProduction ? 'production' : 'development',\n configFile: false,\n oxc: { legalComments: 'none' },\n base: './',\n build: {\n outDir: getOutputPath(context),\n // Preserves shared deps in dist/bundle/shared/ when host rebuilds into dist/bundle/\n emptyOutDir: false,\n sourcemap: true,\n commonjsOptions: {\n include: [\n // TODO: move to config override\n /startup-utils/,\n /\\/node_modules\\//,\n ],\n },\n },\n define: importMetaRemap(\n defineExposedDependencies(context),\n defineExposedInstanceDependencies(context),\n defineWebComponentName(context)\n ),\n optimizeDeps: {\n include: ['@servicetitan/startup-utils'],\n },\n };\n}\n"],"names":["createBaseConfig","importMetaRemap","definitions","result","filter","definition","undefined","forEach","Object","keys","item","context","getBundleType","isProduction","build","isWebComponent","package","cacheDir","server","port","warmup","clientFiles","mode","configFile","oxc","legalComments","base","outDir","getOutputPath","emptyOutDir","sourcemap","commonjsOptions","include","define","defineExposedDependencies","defineExposedInstanceDependencies","defineWebComponentName","optimizeDeps"],"mappings":";;;;+BA0BgBA;;;eAAAA;;;sBAlBT;AAEP,SAASC,gBACL,GAAGC,WAAmD;IAEtD,MAAMC,SAAiC,CAAC;IAExCD,YACKE,MAAM,CAACC,CAAAA,aAAcA,eAAeC,WACpCC,OAAO,CAACF,CAAAA,aACLG,OAAOC,IAAI,CAACJ,YAAYE,OAAO,CAACG,CAAAA;YAC5BP,MAAM,CAAC,CAAC,gBAAgB,EAAEO,MAAM,CAAC,GAAGL,UAAU,CAACK,KAAK;QACxD;IAGR,OAAOP;AACX;AAEO,SAASH,iBAAiBW,OAAqB;QAKdC;IAJpC,MAAM,EAAEC,YAAY,EAAE,GAAGF,QAAQG,KAAK;IACtC,MAAM,EAAEC,cAAc,EAAE,GAAGJ,QAAQK,OAAO;IAE1C,OAAO;QACHC,UAAU,CAAC,mBAAmB,GAAEL,iBAAAA,IAAAA,mBAAa,EAACD,sBAAdC,4BAAAA,iBAA0B,QAAQ;QAClEM,QAAQ;YACJ,mCAAmC;YACnCC,MAAMJ,iBAAiB,OAAO;YAC9BK,QAAQ;gBACJ;;;iBAGC,GACDC,aAAa;oBAAC;iBAAe;YACjC;QACJ;QACAC,MAAMT,eAAe,eAAe;QACpCU,YAAY;QACZC,KAAK;YAAEC,eAAe;QAAO;QAC7BC,MAAM;QACNZ,OAAO;YACHa,QAAQC,IAAAA,mBAAa,EAACjB;YACtB,oFAAoF;YACpFkB,aAAa;YACbC,WAAW;YACXC,iBAAiB;gBACbC,SAAS;oBACL,gCAAgC;oBAChC;oBACA;iBACH;YACL;QACJ;QACAC,QAAQhC,gBACJiC,IAAAA,+BAAyB,EAACvB,UAC1BwB,IAAAA,uCAAiC,EAACxB,UAClCyB,IAAAA,4BAAsB,EAACzB;QAE3B0B,cAAc;YACVL,SAAS;gBAAC;aAA8B;QAC5C;IACJ;AACJ"}
1
+ {"version":3,"sources":["../../src/vite/base-config.ts"],"sourcesContent":["import type { InlineConfig } from 'vite';\nimport {\n BuildContext,\n defineExposedDependencies,\n defineExposedInstanceDependencies,\n defineWebComponentName,\n getBundleType,\n getOutputPath,\n} from '../core';\n\nfunction importMetaRemap(\n ...definitions: (Record<string, string> | undefined)[]\n): Record<string, string> {\n const result: Record<string, string> = {};\n\n definitions\n .filter(definition => definition !== undefined)\n .forEach(definition =>\n Object.keys(definition).forEach(item => {\n result[`import.meta.env.${item}`] = definition[item];\n })\n );\n\n return result;\n}\n\nexport function createBaseConfig(context: BuildContext): InlineConfig {\n const { isProduction } = context.build;\n const { isWebComponent } = context.package;\n\n return {\n cacheDir: `node_modules/.vite/${getBundleType(context) ?? 'host'}`,\n server: {\n // TODO: need default port for MFE?\n port: isWebComponent ? 8888 : 8080,\n warmup: {\n /*\n * TODO: dist duplication/use destination\n * Pre-warms compiled files to avoid multiple page reloads at dev session start\n */\n clientFiles: ['dist/**/*.js'],\n },\n },\n mode: isProduction ? 'production' : 'development',\n configFile: false,\n oxc: { legalComments: 'none' },\n base: './',\n css: {\n modules: {\n localsConvention: 'camelCaseOnly',\n generateScopedName: isProduction ? '[local]__[hash:base64:5]' : '[local]',\n },\n preprocessorOptions: {\n less: { math: 'always' },\n },\n },\n build: {\n outDir: getOutputPath(context),\n // Preserves shared deps in dist/bundle/shared/ when host rebuilds into dist/bundle/\n emptyOutDir: false,\n sourcemap: true,\n commonjsOptions: {\n include: [\n // TODO: move to config override\n /startup-utils/,\n /\\/node_modules\\//,\n ],\n },\n },\n define: importMetaRemap(\n defineExposedDependencies(context),\n defineExposedInstanceDependencies(context),\n defineWebComponentName(context)\n ),\n optimizeDeps: {\n include: ['@servicetitan/startup-utils'],\n },\n };\n}\n"],"names":["createBaseConfig","importMetaRemap","definitions","result","filter","definition","undefined","forEach","Object","keys","item","context","getBundleType","isProduction","build","isWebComponent","package","cacheDir","server","port","warmup","clientFiles","mode","configFile","oxc","legalComments","base","css","modules","localsConvention","generateScopedName","preprocessorOptions","less","math","outDir","getOutputPath","emptyOutDir","sourcemap","commonjsOptions","include","define","defineExposedDependencies","defineExposedInstanceDependencies","defineWebComponentName","optimizeDeps"],"mappings":";;;;+BA0BgBA;;;eAAAA;;;sBAlBT;AAEP,SAASC,gBACL,GAAGC,WAAmD;IAEtD,MAAMC,SAAiC,CAAC;IAExCD,YACKE,MAAM,CAACC,CAAAA,aAAcA,eAAeC,WACpCC,OAAO,CAACF,CAAAA,aACLG,OAAOC,IAAI,CAACJ,YAAYE,OAAO,CAACG,CAAAA;YAC5BP,MAAM,CAAC,CAAC,gBAAgB,EAAEO,MAAM,CAAC,GAAGL,UAAU,CAACK,KAAK;QACxD;IAGR,OAAOP;AACX;AAEO,SAASH,iBAAiBW,OAAqB;QAKdC;IAJpC,MAAM,EAAEC,YAAY,EAAE,GAAGF,QAAQG,KAAK;IACtC,MAAM,EAAEC,cAAc,EAAE,GAAGJ,QAAQK,OAAO;IAE1C,OAAO;QACHC,UAAU,CAAC,mBAAmB,GAAEL,iBAAAA,IAAAA,mBAAa,EAACD,sBAAdC,4BAAAA,iBAA0B,QAAQ;QAClEM,QAAQ;YACJ,mCAAmC;YACnCC,MAAMJ,iBAAiB,OAAO;YAC9BK,QAAQ;gBACJ;;;iBAGC,GACDC,aAAa;oBAAC;iBAAe;YACjC;QACJ;QACAC,MAAMT,eAAe,eAAe;QACpCU,YAAY;QACZC,KAAK;YAAEC,eAAe;QAAO;QAC7BC,MAAM;QACNC,KAAK;YACDC,SAAS;gBACLC,kBAAkB;gBAClBC,oBAAoBjB,eAAe,6BAA6B;YACpE;YACAkB,qBAAqB;gBACjBC,MAAM;oBAAEC,MAAM;gBAAS;YAC3B;QACJ;QACAnB,OAAO;YACHoB,QAAQC,IAAAA,mBAAa,EAACxB;YACtB,oFAAoF;YACpFyB,aAAa;YACbC,WAAW;YACXC,iBAAiB;gBACbC,SAAS;oBACL,gCAAgC;oBAChC;oBACA;iBACH;YACL;QACJ;QACAC,QAAQvC,gBACJwC,IAAAA,+BAAyB,EAAC9B,UAC1B+B,IAAAA,uCAAiC,EAAC/B,UAClCgC,IAAAA,4BAAsB,EAAChC;QAE3BiC,cAAc;YACVL,SAAS;gBAAC;aAA8B;QAC5C;IACJ;AACJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@servicetitan/startup",
3
- "version": "34.3.0-beta.0",
3
+ "version": "34.3.0-beta.1",
4
4
  "description": "CLI to create multi-package Lerna projects with TypeScript and React",
5
5
  "homepage": "https://docs.st.dev/docs/frontend/uikit/startup",
6
6
  "repository": {
@@ -56,10 +56,10 @@
56
56
  "@jest/core": "~30.2.0",
57
57
  "@jest/types": "~30.2.0",
58
58
  "@jsdevtools/coverage-istanbul-loader": "^3.0.5",
59
- "@servicetitan/eslint-config": "34.3.0-beta.0",
60
- "@servicetitan/install": "34.3.0-beta.0",
61
- "@servicetitan/startup-utils": "34.3.0-beta.0",
62
- "@servicetitan/stylelint-config": "34.3.0-beta.0",
59
+ "@servicetitan/eslint-config": "34.2.1",
60
+ "@servicetitan/install": "34.2.1",
61
+ "@servicetitan/startup-utils": "34.2.1",
62
+ "@servicetitan/stylelint-config": "34.2.1",
63
63
  "@svgr/webpack": "^8.1.0",
64
64
  "@swc/cli": "^0.5.0",
65
65
  "@swc/core": "1.15.18",
@@ -45,6 +45,15 @@ export function createBaseConfig(context: BuildContext): InlineConfig {
45
45
  configFile: false,
46
46
  oxc: { legalComments: 'none' },
47
47
  base: './',
48
+ css: {
49
+ modules: {
50
+ localsConvention: 'camelCaseOnly',
51
+ generateScopedName: isProduction ? '[local]__[hash:base64:5]' : '[local]',
52
+ },
53
+ preprocessorOptions: {
54
+ less: { math: 'always' },
55
+ },
56
+ },
48
57
  build: {
49
58
  outDir: getOutputPath(context),
50
59
  // Preserves shared deps in dist/bundle/shared/ when host rebuilds into dist/bundle/