mage-obsidian 2.0.0 → 2.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/dist/cli/buildThemes.d.ts +3 -0
- package/dist/cli/buildThemes.d.ts.map +1 -0
- package/{src/cli/buildThemes.ts → dist/cli/buildThemes.js} +77 -121
- package/dist/cli/buildThemes.js.map +1 -0
- package/dist/config/default.d.ts +16 -0
- package/dist/config/default.d.ts.map +1 -0
- package/{src/config/default.ts → dist/config/default.js} +2 -11
- package/dist/config/default.js.map +1 -0
- package/dist/core/configResolver.d.ts +38 -0
- package/dist/core/configResolver.d.ts.map +1 -0
- package/{src/core/configResolver.ts → dist/core/configResolver.js} +21 -60
- package/dist/core/configResolver.js.map +1 -0
- package/dist/core/contractValidator.d.ts +16 -0
- package/dist/core/contractValidator.d.ts.map +1 -0
- package/{src/core/contractValidator.ts → dist/core/contractValidator.js} +3 -10
- package/dist/core/contractValidator.js.map +1 -0
- package/dist/core/cssResolver.d.ts +5 -0
- package/dist/core/cssResolver.d.ts.map +1 -0
- package/{src/core/cssResolver.ts → dist/core/cssResolver.js} +26 -53
- package/dist/core/cssResolver.js.map +1 -0
- package/dist/core/generateInterceptors.d.ts +10 -0
- package/dist/core/generateInterceptors.d.ts.map +1 -0
- package/{src/core/generateInterceptors.ts → dist/core/generateInterceptors.js} +55 -109
- package/dist/core/generateInterceptors.js.map +1 -0
- package/dist/core/generateJsconfig.d.ts +45 -0
- package/dist/core/generateJsconfig.d.ts.map +1 -0
- package/{src/core/generateJsconfig.ts → dist/core/generateJsconfig.js} +32 -55
- package/dist/core/generateJsconfig.js.map +1 -0
- package/dist/core/moduleResolver.d.ts +22 -0
- package/dist/core/moduleResolver.d.ts.map +1 -0
- package/{src/core/moduleResolver.ts → dist/core/moduleResolver.js} +28 -62
- package/dist/core/moduleResolver.js.map +1 -0
- package/dist/core/preCompileFiles.d.ts +6 -0
- package/dist/core/preCompileFiles.d.ts.map +1 -0
- package/{src/core/preCompileFiles.ts → dist/core/preCompileFiles.js} +22 -48
- package/dist/core/preCompileFiles.js.map +1 -0
- package/dist/core/preCompileMagentoFiles.d.ts +3 -0
- package/dist/core/preCompileMagentoFiles.d.ts.map +1 -0
- package/{src/core/preCompileMagentoFiles.ts → dist/core/preCompileMagentoFiles.js} +4 -10
- package/dist/core/preCompileMagentoFiles.js.map +1 -0
- package/dist/core/themeResolverSync.d.ts +6 -0
- package/dist/core/themeResolverSync.d.ts.map +1 -0
- package/{src/core/themeResolverSync.ts → dist/core/themeResolverSync.js} +25 -26
- package/dist/core/themeResolverSync.js.map +1 -0
- package/dist/runtime/i18nCore.d.ts +71 -0
- package/dist/runtime/i18nCore.d.ts.map +1 -0
- package/{src/runtime/i18nCore.ts → dist/runtime/i18nCore.js} +47 -49
- package/dist/runtime/i18nCore.js.map +1 -0
- package/dist/runtime/interceptorManager.d.ts +45 -0
- package/dist/runtime/interceptorManager.d.ts.map +1 -0
- package/{src/runtime/interceptorManager.ts → dist/runtime/interceptorManager.js} +14 -72
- package/dist/runtime/interceptorManager.js.map +1 -0
- package/dist/runtime/islands.d.ts +45 -0
- package/dist/runtime/islands.d.ts.map +1 -0
- package/{src/runtime/islands.ts → dist/runtime/islands.js} +5 -30
- package/dist/runtime/islands.js.map +1 -0
- package/dist/runtime/sectionStoreCore.d.ts +108 -0
- package/dist/runtime/sectionStoreCore.d.ts.map +1 -0
- package/{src/runtime/sectionStoreCore.ts → dist/runtime/sectionStoreCore.js} +23 -93
- package/dist/runtime/sectionStoreCore.js.map +1 -0
- package/dist/utils/findComponents.d.ts +17 -0
- package/dist/utils/findComponents.d.ts.map +1 -0
- package/dist/utils/findComponents.js +66 -0
- package/dist/utils/findComponents.js.map +1 -0
- package/dist/utils/runWithConcurrency.d.ts +10 -0
- package/dist/utils/runWithConcurrency.d.ts.map +1 -0
- package/{src/utils/runWithConcurrency.ts → dist/utils/runWithConcurrency.js} +3 -9
- package/dist/utils/runWithConcurrency.js.map +1 -0
- package/dist/vite/defaultNodeResolver.d.ts +9 -0
- package/dist/vite/defaultNodeResolver.d.ts.map +1 -0
- package/{src/vite/defaultNodeResolver.ts → dist/vite/defaultNodeResolver.js} +3 -1
- package/dist/vite/defaultNodeResolver.js.map +1 -0
- package/dist/vite/inheritAssetsModuleResolver.d.ts +8 -0
- package/dist/vite/inheritAssetsModuleResolver.d.ts.map +1 -0
- package/{src/vite/inheritAssetsModuleResolver.ts → dist/vite/inheritAssetsModuleResolver.js} +6 -20
- package/dist/vite/inheritAssetsModuleResolver.js.map +1 -0
- package/dist/vite/inheritModuleResolver.d.ts +8 -0
- package/dist/vite/inheritModuleResolver.d.ts.map +1 -0
- package/{src/vite/inheritModuleResolver.ts → dist/vite/inheritModuleResolver.js} +4 -9
- package/dist/vite/inheritModuleResolver.js.map +1 -0
- package/dist/vite/interceptorsPlugin.d.ts +10 -0
- package/dist/vite/interceptorsPlugin.d.ts.map +1 -0
- package/{src/vite/interceptorsPlugin.ts → dist/vite/interceptorsPlugin.js} +12 -29
- package/dist/vite/interceptorsPlugin.js.map +1 -0
- package/dist/vite/magentoHrmRewrite.d.ts +6 -0
- package/dist/vite/magentoHrmRewrite.d.ts.map +1 -0
- package/{src/vite/magentoHrmRewrite.ts → dist/vite/magentoHrmRewrite.js} +16 -15
- package/dist/vite/magentoHrmRewrite.js.map +1 -0
- package/dist/vite/sharedPlugins.d.ts +35 -0
- package/dist/vite/sharedPlugins.d.ts.map +1 -0
- package/{src/vite/sharedPlugins.ts → dist/vite/sharedPlugins.js} +7 -9
- package/dist/vite/sharedPlugins.js.map +1 -0
- package/dist/vite/themeSourceWatcher.d.ts +16 -0
- package/dist/vite/themeSourceWatcher.d.ts.map +1 -0
- package/{src/vite/themeSourceWatcher.ts → dist/vite/themeSourceWatcher.js} +19 -24
- package/dist/vite/themeSourceWatcher.js.map +1 -0
- package/dist/vite/unresolvedModuleGuard.d.ts +17 -0
- package/dist/vite/unresolvedModuleGuard.d.ts.map +1 -0
- package/{src/vite/unresolvedModuleGuard.ts → dist/vite/unresolvedModuleGuard.js} +27 -27
- package/dist/vite/unresolvedModuleGuard.js.map +1 -0
- package/package.json +60 -10
- package/.github/workflows/ci.yml +0 -38
- package/.github/workflows/publish.yml +0 -36
- package/.oxlintrc.json +0 -19
- package/.prettierignore +0 -7
- package/.prettierrc.json +0 -7
- package/eslint.config.js +0 -24
- package/pnpm-workspace.yaml +0 -4
- package/src/utils/findComponents.ts +0 -83
- package/tsconfig.json +0 -34
- package/vitest.config.js +0 -18
- /package/{src → dist}/config/eslint.js +0 -0
- /package/{src → dist}/templates/base_main_js_file.js +0 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Build the `compilerOptions.paths` map that makes the framework's
|
|
3
|
+
* `Vendor_Module::` import specifiers first-class for the editor: each maps
|
|
4
|
+
* directly to its real source file, so Ctrl+click jumps straight there and a
|
|
5
|
+
* typo surfaces as an unresolved import. Derived from the same inheritance cache
|
|
6
|
+
* the resolver uses, so the declared set matches exactly what the build resolves
|
|
7
|
+
* (`.ts`/`.js`/`.vue` — assets are not in the cache). A `"*"` wildcard adds npm
|
|
8
|
+
* package resolution from the harness node_modules.
|
|
9
|
+
*/
|
|
10
|
+
export default function generateJsconfigPaths(themeName: string, options?: {
|
|
11
|
+
remap?: boolean;
|
|
12
|
+
}): Promise<Record<string, string[]>>;
|
|
13
|
+
declare const GENERATED_MARKER = "// Generated by mage-obsidian";
|
|
14
|
+
/**
|
|
15
|
+
* Wrap a `paths` map in the full theme jsconfig the editor consumes. `allowJs`
|
|
16
|
+
* is required or the theme's `.js`/`.vue` sources never join the TS program (so
|
|
17
|
+
* nothing resolves); `baseUrl` is deliberately omitted — it is deprecated and a
|
|
18
|
+
* hard config error in TS 7.0, which makes the editor discard the whole config.
|
|
19
|
+
* The leading marker comment lets the build tell its own output apart from a
|
|
20
|
+
* hand-written jsconfig and refuse to clobber the latter.
|
|
21
|
+
*/
|
|
22
|
+
declare function buildThemeJsconfig(paths: Record<string, string[]>): string;
|
|
23
|
+
/**
|
|
24
|
+
* Wrap a `paths` map in the theme's typecheck tsconfig — the CI/build gate run by
|
|
25
|
+
* `vue-tsc --noEmit`. Distinct from the editor `jsconfig.json` (same dir) on
|
|
26
|
+
* purpose: it is NOT named `tsconfig.json`, so the editor's auto-discovery keeps
|
|
27
|
+
* using the jsconfig while this file is consumed only via an explicit `-p`. It is
|
|
28
|
+
* the one context where every `Vendor_Module::` resolves to its real source (the
|
|
29
|
+
* `paths` are the same map the build resolves through), so cross-module type
|
|
30
|
+
* seams are actually verified.
|
|
31
|
+
*
|
|
32
|
+
* `allowImportingTsExtensions` is required because engine imports use explicit
|
|
33
|
+
* `.ts` specifiers; it in turn requires `noEmit`. `allowJs`/`checkJs:false` keep
|
|
34
|
+
* not-yet-migrated `.js` in the graph (resolvable) without type-checking them, so
|
|
35
|
+
* a half-migrated tree still passes. `lib` carries DOM because the storefront
|
|
36
|
+
* code touches `document`/`window`/`fetch`/`localStorage`.
|
|
37
|
+
*
|
|
38
|
+
* `files` is the exact assembled set the build bundles (the inheritance-resolved
|
|
39
|
+
* absolute paths), not a recursive theme-relative glob: module sources live
|
|
40
|
+
* outside the theme dir, so such a glob would silently check nothing. Listing
|
|
41
|
+
* them explicitly is what makes the gate type-check every module/override file.
|
|
42
|
+
*/
|
|
43
|
+
declare function buildThemeTsconfig(paths: Record<string, string[]>, files: string[]): string;
|
|
44
|
+
export { buildThemeJsconfig, buildThemeTsconfig, GENERATED_MARKER };
|
|
45
|
+
//# sourceMappingURL=generateJsconfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateJsconfig.d.ts","sourceRoot":"","sources":["../../src/core/generateJsconfig.ts"],"names":[],"mappings":"AAuDA;;;;;;;;GAQG;AACH,wBAA8B,qBAAqB,CAC/C,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAO,GAClC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CA+BnC;AAED,QAAA,MAAM,gBAAgB,kCAAkC,CAAC;AAEzD;;;;;;;GAOG;AACH,iBAAS,kBAAkB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,MAAM,CAcnE;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,iBAAS,kBAAkB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAoBpF;AAED,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
|
-
import moduleResolver from "./moduleResolver.
|
|
3
|
-
|
|
2
|
+
import moduleResolver from "./moduleResolver.js";
|
|
4
3
|
// Map of `from=>to[,from2=>to2]` prefixes, read from the environment. It rewrites
|
|
5
4
|
// the absolute paths baked into the generated jsconfig so go-to-definition and
|
|
6
5
|
// npm resolution land on files where the editor actually runs. This matters when
|
|
@@ -8,50 +7,41 @@ import moduleResolver from "./moduleResolver.ts";
|
|
|
8
7
|
// different mount (e.g. theme sources served at /var/www/html in the container
|
|
9
8
|
// but edited at the host bind-mount). An empty map is the identity — correct
|
|
10
9
|
// when the build and editor share a filesystem.
|
|
11
|
-
function parsePathMap(raw
|
|
12
|
-
if (!raw)
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
// overlaid at /var/www/html/vite) wins over a broader one
|
|
24
|
-
// (/var/www/html) regardless of declaration order.
|
|
25
|
-
.sort((a, b) => b[0].length - a[0].length)
|
|
26
|
-
);
|
|
10
|
+
function parsePathMap(raw) {
|
|
11
|
+
if (!raw)
|
|
12
|
+
return [];
|
|
13
|
+
return (raw
|
|
14
|
+
.split(",")
|
|
15
|
+
.map((pair) => pair.split("=>").map((part) => part.trim()))
|
|
16
|
+
.filter((parts) => parts.length === 2 && !!parts[0] && !!parts[1])
|
|
17
|
+
.map(([from, to]) => [from, to])
|
|
18
|
+
// Longest `from` first so a more specific mount (e.g. the vite harness
|
|
19
|
+
// overlaid at /var/www/html/vite) wins over a broader one
|
|
20
|
+
// (/var/www/html) regardless of declaration order.
|
|
21
|
+
.sort((a, b) => b[0].length - a[0].length));
|
|
27
22
|
}
|
|
28
|
-
|
|
29
|
-
function remapPath(filePath: string, map: Array<[string, string]>): string {
|
|
23
|
+
function remapPath(filePath, map) {
|
|
30
24
|
for (const [from, to] of map) {
|
|
31
|
-
if (filePath.startsWith(from))
|
|
25
|
+
if (filePath.startsWith(from))
|
|
26
|
+
return to + filePath.slice(from.length);
|
|
32
27
|
}
|
|
33
28
|
return filePath;
|
|
34
29
|
}
|
|
35
|
-
|
|
36
30
|
// The Vite harness install (the `vite/` dir is the cwd during a build) is where
|
|
37
31
|
// the build resolves bare npm specifiers, so point the editor at the same place.
|
|
38
32
|
// Wildcard so `vue`, `@heroicons/vue/...`, `pinia` and friends all resolve.
|
|
39
|
-
function nodeModulesWildcard(map
|
|
33
|
+
function nodeModulesWildcard(map) {
|
|
40
34
|
return path.join(remapPath(path.resolve(process.cwd(), "node_modules"), map), "*");
|
|
41
35
|
}
|
|
42
|
-
|
|
43
36
|
// Engine subpath imports (`mage-obsidian/runtime/*`, `/service/*`, …) route
|
|
44
|
-
// through the package's `exports` (`./runtime/*` → `./
|
|
37
|
+
// through the package's `exports` (`./runtime/*` → `./dist/runtime/*`), which the
|
|
45
38
|
// bare `"*"` wildcard's literal substitution would miss — it would look under the
|
|
46
|
-
// package root, not `
|
|
47
|
-
// resolves them (TS prefers the longer match over `"*"`).
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"*",
|
|
52
|
-
);
|
|
39
|
+
// package root, not `dist/`. A more-specific `mage-obsidian/*` → `dist/*` pattern
|
|
40
|
+
// resolves them (TS prefers the longer match over `"*"`). The published package
|
|
41
|
+
// ships compiled JS plus `.d.ts`, so the editor reads types from `dist/`.
|
|
42
|
+
function engineSrcWildcard(map) {
|
|
43
|
+
return path.join(remapPath(path.resolve(process.cwd(), "node_modules", "mage-obsidian", "dist"), map), "*");
|
|
53
44
|
}
|
|
54
|
-
|
|
55
45
|
/**
|
|
56
46
|
* Build the `compilerOptions.paths` map that makes the framework's
|
|
57
47
|
* `Vendor_Module::` import specifiers first-class for the editor: each maps
|
|
@@ -61,44 +51,32 @@ function engineSrcWildcard(map: Array<[string, string]>): string {
|
|
|
61
51
|
* (`.ts`/`.js`/`.vue` — assets are not in the cache). A `"*"` wildcard adds npm
|
|
62
52
|
* package resolution from the harness node_modules.
|
|
63
53
|
*/
|
|
64
|
-
export default async function generateJsconfigPaths(
|
|
65
|
-
themeName
|
|
66
|
-
options: { remap?: boolean } = {},
|
|
67
|
-
): Promise<Record<string, string[]>> {
|
|
68
|
-
const files = (await moduleResolver.getAllJsVueFilesWithInheritance(themeName)) as Record<
|
|
69
|
-
string,
|
|
70
|
-
string
|
|
71
|
-
>;
|
|
54
|
+
export default async function generateJsconfigPaths(themeName, options = {}) {
|
|
55
|
+
const files = (await moduleResolver.getAllJsVueFilesWithInheritance(themeName));
|
|
72
56
|
// The editor jsconfig remaps container paths to the host mount so go-to-def
|
|
73
57
|
// lands on the files the editor opens. The typecheck gate runs where the build
|
|
74
58
|
// runs (same filesystem as the sources), so it opts out and keeps real paths.
|
|
75
|
-
const map =
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
const paths: Record<string, string[]> = {
|
|
59
|
+
const map = options.remap === false ? [] : parsePathMap(process.env.MAGE_OBSIDIAN_TYPES_PATH_MAP);
|
|
60
|
+
const paths = {
|
|
79
61
|
"mage-obsidian/*": [engineSrcWildcard(map)],
|
|
80
62
|
"*": [nodeModulesWildcard(map)],
|
|
81
63
|
};
|
|
82
|
-
|
|
83
64
|
for (const [key, absolutePath] of Object.entries(files)) {
|
|
84
65
|
const slash = key.indexOf("/");
|
|
85
|
-
if (slash === -1)
|
|
66
|
+
if (slash === -1)
|
|
67
|
+
continue;
|
|
86
68
|
const namespace = key.slice(0, slash);
|
|
87
69
|
const rest = key.slice(slash + 1);
|
|
88
70
|
const target = remapPath(absolutePath, map);
|
|
89
|
-
|
|
90
71
|
paths[`${namespace}::${rest}`] = [target];
|
|
91
72
|
if (rest.startsWith("components/")) {
|
|
92
73
|
// The resolver accepts the shorthand without the `components/` prefix.
|
|
93
74
|
paths[`${namespace}::${rest.slice("components/".length)}`] = [target];
|
|
94
75
|
}
|
|
95
76
|
}
|
|
96
|
-
|
|
97
77
|
return paths;
|
|
98
78
|
}
|
|
99
|
-
|
|
100
79
|
const GENERATED_MARKER = "// Generated by mage-obsidian";
|
|
101
|
-
|
|
102
80
|
/**
|
|
103
81
|
* Wrap a `paths` map in the full theme jsconfig the editor consumes. `allowJs`
|
|
104
82
|
* is required or the theme's `.js`/`.vue` sources never join the TS program (so
|
|
@@ -107,7 +85,7 @@ const GENERATED_MARKER = "// Generated by mage-obsidian";
|
|
|
107
85
|
* The leading marker comment lets the build tell its own output apart from a
|
|
108
86
|
* hand-written jsconfig and refuse to clobber the latter.
|
|
109
87
|
*/
|
|
110
|
-
function buildThemeJsconfig(paths
|
|
88
|
+
function buildThemeJsconfig(paths) {
|
|
111
89
|
const jsconfig = {
|
|
112
90
|
compilerOptions: {
|
|
113
91
|
allowJs: true,
|
|
@@ -122,7 +100,6 @@ function buildThemeJsconfig(paths: Record<string, string[]>): string {
|
|
|
122
100
|
const header = `${GENERATED_MARKER} — do not edit. Refreshed on every build and live in dev.\n`;
|
|
123
101
|
return `${header}${JSON.stringify(jsconfig, null, 4)}\n`;
|
|
124
102
|
}
|
|
125
|
-
|
|
126
103
|
/**
|
|
127
104
|
* Wrap a `paths` map in the theme's typecheck tsconfig — the CI/build gate run by
|
|
128
105
|
* `vue-tsc --noEmit`. Distinct from the editor `jsconfig.json` (same dir) on
|
|
@@ -143,7 +120,7 @@ function buildThemeJsconfig(paths: Record<string, string[]>): string {
|
|
|
143
120
|
* outside the theme dir, so such a glob would silently check nothing. Listing
|
|
144
121
|
* them explicitly is what makes the gate type-check every module/override file.
|
|
145
122
|
*/
|
|
146
|
-
function buildThemeTsconfig(paths
|
|
123
|
+
function buildThemeTsconfig(paths, files) {
|
|
147
124
|
const tsconfig = {
|
|
148
125
|
compilerOptions: {
|
|
149
126
|
noEmit: true,
|
|
@@ -164,5 +141,5 @@ function buildThemeTsconfig(paths: Record<string, string[]>, files: string[]): s
|
|
|
164
141
|
const header = `${GENERATED_MARKER} — typecheck gate (vue-tsc). Build-managed; do not edit.\n`;
|
|
165
142
|
return `${header}${JSON.stringify(tsconfig, null, 4)}\n`;
|
|
166
143
|
}
|
|
167
|
-
|
|
168
144
|
export { buildThemeJsconfig, buildThemeTsconfig, GENERATED_MARKER };
|
|
145
|
+
//# sourceMappingURL=generateJsconfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateJsconfig.js","sourceRoot":"","sources":["../../src/core/generateJsconfig.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,cAAc,MAAM,qBAAqB,CAAC;AAEjD,kFAAkF;AAClF,+EAA+E;AAC/E,iFAAiF;AACjF,yEAAyE;AACzE,+EAA+E;AAC/E,6EAA6E;AAC7E,gDAAgD;AAChD,SAAS,YAAY,CAAC,GAAY;IAC9B,IAAI,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC;IACpB,OAAO,CACH,GAAG;SACE,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAA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,EAAE,cAAc,CAAC;KAC/C,CAAC;IACF,MAAM,MAAM,GAAG,GAAG,gBAAgB,4DAA4D,CAAC;IAC/F,OAAO,GAAG,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC;AAC7D,CAAC;AAED,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
declare function getAllJsVueFilesWithInheritanceCached(themeName?: any): any;
|
|
2
|
+
declare function getAllJsVueFilesWithInheritance(themeName?: any): Promise<any>;
|
|
3
|
+
declare function invalidateTheme(themeName?: any): void;
|
|
4
|
+
declare function resolveFileByTheme(themeName: any, moduleName: any, filePath: any): string;
|
|
5
|
+
/**
|
|
6
|
+
* Retrieves the Tailwind configuration for a theme synchronously.
|
|
7
|
+
* Uses a cache system to optimize performance.
|
|
8
|
+
* @param {string} themeName - Name of the theme.
|
|
9
|
+
* @param {object} themeConfig
|
|
10
|
+
* @returns {object|null} Tailwind configuration object.
|
|
11
|
+
*/
|
|
12
|
+
declare function getModuleConfigByThemeConfig(themeName: any, themeConfig: any): Promise<any>;
|
|
13
|
+
declare const _default: {
|
|
14
|
+
getAllJsVueFilesWithInheritance: typeof getAllJsVueFilesWithInheritance;
|
|
15
|
+
getAllJsVueFilesWithInheritanceCached: typeof getAllJsVueFilesWithInheritanceCached;
|
|
16
|
+
getModuleConfigByThemeConfig: typeof getModuleConfigByThemeConfig;
|
|
17
|
+
resolveFileByTheme: typeof resolveFileByTheme;
|
|
18
|
+
invalidateTheme: typeof invalidateTheme;
|
|
19
|
+
};
|
|
20
|
+
export default _default;
|
|
21
|
+
export { getModuleConfigByThemeConfig, resolveFileByTheme, getAllJsVueFilesWithInheritance, getAllJsVueFilesWithInheritanceCached, invalidateTheme, };
|
|
22
|
+
//# sourceMappingURL=moduleResolver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"moduleResolver.d.ts","sourceRoot":"","sources":["../../src/core/moduleResolver.ts"],"names":[],"mappings":"AA+EA,iBAAS,qCAAqC,CAAC,SAAS,CAAC,KAAA,OAexD;AAED,iBAAe,+BAA+B,CAAC,SAAS,CAAC,KAAA,gBAWxD;AAQD,iBAAS,eAAe,CAAC,SAAS,CAAC,KAAA,QAUlC;AAaD,iBAAS,kBAAkB,CAAC,SAAS,KAAA,EAAE,UAAU,KAAA,EAAE,QAAQ,KAAA,UAW1D;AAqBD;;;;;;GAMG;AACH,iBAAe,4BAA4B,CAAC,SAAS,KAAA,EAAE,WAAW,KAAA,gBAiBjE;;;;;;;;AAED,wBAME;AAEF,OAAO,EACH,4BAA4B,EAC5B,kBAAkB,EAClB,+BAA+B,EAC/B,qCAAqC,EACrC,eAAe,GAClB,CAAC"}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
+
var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExtension) || function (path, preserveJsx) {
|
|
2
|
+
if (typeof path === "string" && /^\.\.?\//.test(path)) {
|
|
3
|
+
return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
|
|
4
|
+
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
|
|
5
|
+
});
|
|
6
|
+
}
|
|
7
|
+
return path;
|
|
8
|
+
};
|
|
1
9
|
import path from "path";
|
|
2
|
-
import configResolver from "./configResolver.
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
MODULE_WEB_PATH,
|
|
6
|
-
PRECOMPILED_FOLDER,
|
|
7
|
-
THEME_MODULE_WEB_PATH,
|
|
8
|
-
} from "../config/default.ts";
|
|
9
|
-
import getFilesFromFolders from "../utils/findComponents.ts";
|
|
10
|
+
import configResolver from "./configResolver.js";
|
|
11
|
+
import { ALL_JS_VUE_FILES_WITH_INHERITANCE_FILE_NAME, MODULE_WEB_PATH, PRECOMPILED_FOLDER, THEME_MODULE_WEB_PATH, } from "../config/default.js";
|
|
12
|
+
import getFilesFromFolders from "../utils/findComponents.js";
|
|
10
13
|
import fs from "fs";
|
|
11
14
|
import deepmerge from "deepmerge";
|
|
12
|
-
|
|
13
15
|
const defaultFoldersToMap = [
|
|
14
16
|
{
|
|
15
17
|
src: configResolver.getMagentoConfig().VUE_COMPONENTS_PATH,
|
|
@@ -20,47 +22,36 @@ const defaultFoldersToMap = [
|
|
|
20
22
|
ext: ["ts", "js"],
|
|
21
23
|
},
|
|
22
24
|
];
|
|
23
|
-
|
|
24
25
|
// Keyed by `${theme}\0${contractHash}` so a changed module/theme set (new hash)
|
|
25
26
|
// recomputes instead of returning a result keyed only by theme name.
|
|
26
27
|
const cachedModulesByTheme = new Map();
|
|
27
|
-
|
|
28
28
|
// NUL separator: theme names and the hex hash never contain it, so the parts
|
|
29
29
|
// can't collide. Shared with invalidateTheme so its prefix match stays in
|
|
30
30
|
// lock-step with the key format (a plain space here silently broke the match).
|
|
31
31
|
const CACHE_KEY_SEP = "\0";
|
|
32
32
|
const cacheKey = (themeName) => `${themeName}${CACHE_KEY_SEP}${configResolver.getContractHash()}`;
|
|
33
|
-
|
|
34
33
|
// Caches the persisted inheritance map keyed by theme, invalidated by the file's
|
|
35
34
|
// mtime so a rebuilt .precompiled JSON (watch mode, regeneration) is picked up
|
|
36
35
|
// instead of serving a stale in-memory copy.
|
|
37
36
|
const precompiledFileCache = new Map();
|
|
38
|
-
|
|
39
37
|
async function getAllJsVueFilesFromActiveModules() {
|
|
40
38
|
const result = {};
|
|
41
39
|
for (const entry of configResolver.getModulesConfigArray()) {
|
|
42
40
|
const [moduleName, moduleConfig] = entry;
|
|
43
|
-
const moduleResult = await getFilesFromFolders(
|
|
44
|
-
moduleName,
|
|
45
|
-
path.resolve(moduleConfig.src, MODULE_WEB_PATH),
|
|
46
|
-
defaultFoldersToMap,
|
|
47
|
-
);
|
|
41
|
+
const moduleResult = await getFilesFromFolders(moduleName, path.resolve(moduleConfig.src, MODULE_WEB_PATH), defaultFoldersToMap);
|
|
48
42
|
Object.assign(result, moduleResult);
|
|
49
43
|
}
|
|
50
44
|
return result;
|
|
51
45
|
}
|
|
52
|
-
|
|
53
46
|
async function getAllJsVueFilesFromTheme(themeName) {
|
|
54
47
|
let result = {};
|
|
55
48
|
const theme = configResolver.getMagentoConfig().themes[themeName];
|
|
56
49
|
if (!theme) {
|
|
57
50
|
return {};
|
|
58
51
|
}
|
|
59
|
-
|
|
60
52
|
if (theme.parent) {
|
|
61
53
|
result = await getAllJsVueFilesFromTheme(theme.parent);
|
|
62
54
|
}
|
|
63
|
-
|
|
64
55
|
for (const moduleName of configResolver.getAllMagentoModulesEnabled()) {
|
|
65
56
|
const modulePath = path.resolve(theme.src, moduleName, THEME_MODULE_WEB_PATH);
|
|
66
57
|
const moduleResult = await getFilesFromFolders(moduleName, modulePath, defaultFoldersToMap);
|
|
@@ -68,22 +59,13 @@ async function getAllJsVueFilesFromTheme(themeName) {
|
|
|
68
59
|
result = deepmerge(result, moduleResult);
|
|
69
60
|
}
|
|
70
61
|
}
|
|
71
|
-
const moduleResult = await getFilesFromFolders(
|
|
72
|
-
configResolver.getMagentoConfig().THEME_FILES_PATH,
|
|
73
|
-
path.resolve(theme.src, THEME_MODULE_WEB_PATH),
|
|
74
|
-
defaultFoldersToMap,
|
|
75
|
-
);
|
|
62
|
+
const moduleResult = await getFilesFromFolders(configResolver.getMagentoConfig().THEME_FILES_PATH, path.resolve(theme.src, THEME_MODULE_WEB_PATH), defaultFoldersToMap);
|
|
76
63
|
result = deepmerge(result, moduleResult);
|
|
77
64
|
return result;
|
|
78
65
|
}
|
|
79
|
-
|
|
80
|
-
function getAllJsVueFilesWithInheritanceCached(themeName?) {
|
|
66
|
+
function getAllJsVueFilesWithInheritanceCached(themeName) {
|
|
81
67
|
themeName = themeName ?? process.env.CURRENT_THEME;
|
|
82
|
-
const filePath = path.join(
|
|
83
|
-
PRECOMPILED_FOLDER,
|
|
84
|
-
themeName,
|
|
85
|
-
ALL_JS_VUE_FILES_WITH_INHERITANCE_FILE_NAME,
|
|
86
|
-
);
|
|
68
|
+
const filePath = path.join(PRECOMPILED_FOLDER, themeName, ALL_JS_VUE_FILES_WITH_INHERITANCE_FILE_NAME);
|
|
87
69
|
const { mtimeMs } = fs.statSync(filePath);
|
|
88
70
|
const cached = precompiledFileCache.get(themeName);
|
|
89
71
|
if (cached && cached.mtimeMs === mtimeMs) {
|
|
@@ -93,8 +75,7 @@ function getAllJsVueFilesWithInheritanceCached(themeName?) {
|
|
|
93
75
|
precompiledFileCache.set(themeName, { mtimeMs, data });
|
|
94
76
|
return data;
|
|
95
77
|
}
|
|
96
|
-
|
|
97
|
-
async function getAllJsVueFilesWithInheritance(themeName?) {
|
|
78
|
+
async function getAllJsVueFilesWithInheritance(themeName) {
|
|
98
79
|
themeName = themeName ?? process.env.CURRENT_THEME;
|
|
99
80
|
const key = cacheKey(themeName);
|
|
100
81
|
if (cachedModulesByTheme.has(key)) {
|
|
@@ -106,27 +87,25 @@ async function getAllJsVueFilesWithInheritance(themeName?) {
|
|
|
106
87
|
cachedModulesByTheme.set(key, merged);
|
|
107
88
|
return merged;
|
|
108
89
|
}
|
|
109
|
-
|
|
110
90
|
const moduleConfigByThemeCache = new Map();
|
|
111
|
-
|
|
112
91
|
// Drop every cached entry for a theme so the next resolution recomputes from
|
|
113
92
|
// disk. Adding or removing a component/js source changes neither the contract
|
|
114
93
|
// nor its hash, so the (theme, hash)-keyed caches would otherwise serve a stale
|
|
115
94
|
// map; the dev-server watcher calls this before regenerating on a source change.
|
|
116
|
-
function invalidateTheme(themeName
|
|
95
|
+
function invalidateTheme(themeName) {
|
|
117
96
|
themeName = themeName ?? process.env.CURRENT_THEME;
|
|
118
97
|
const prefix = `${themeName}${CACHE_KEY_SEP}`;
|
|
119
98
|
for (const key of cachedModulesByTheme.keys()) {
|
|
120
|
-
if (key.startsWith(prefix))
|
|
99
|
+
if (key.startsWith(prefix))
|
|
100
|
+
cachedModulesByTheme.delete(key);
|
|
121
101
|
}
|
|
122
102
|
for (const key of moduleConfigByThemeCache.keys()) {
|
|
123
|
-
if (key.startsWith(prefix))
|
|
103
|
+
if (key.startsWith(prefix))
|
|
104
|
+
moduleConfigByThemeCache.delete(key);
|
|
124
105
|
}
|
|
125
106
|
precompiledFileCache.delete(themeName);
|
|
126
107
|
}
|
|
127
|
-
|
|
128
108
|
const MODULE_CONFIG_FILE = configResolver.getMagentoConfig().MODULE_CONFIG_FILE;
|
|
129
|
-
|
|
130
109
|
/**
|
|
131
110
|
* Gets the theme configuration file path.
|
|
132
111
|
* @param {string} moduleSrc
|
|
@@ -135,24 +114,20 @@ const MODULE_CONFIG_FILE = configResolver.getMagentoConfig().MODULE_CONFIG_FILE;
|
|
|
135
114
|
function getModuleConfigPath(moduleSrc) {
|
|
136
115
|
return path.join(moduleSrc, "view/frontend/web/", MODULE_CONFIG_FILE);
|
|
137
116
|
}
|
|
138
|
-
|
|
139
117
|
function resolveFileByTheme(themeName, moduleName, filePath) {
|
|
140
118
|
const theme = configResolver.getMagentoConfig().themes[themeName];
|
|
141
119
|
const fullFilePath = path.join(theme.src, moduleName, "web", filePath);
|
|
142
120
|
if (fs.existsSync(fullFilePath)) {
|
|
143
121
|
return fullFilePath;
|
|
144
122
|
}
|
|
145
|
-
|
|
146
123
|
if (theme.parent) {
|
|
147
124
|
return resolveFileByTheme(theme.parent, moduleName, filePath);
|
|
148
125
|
}
|
|
149
126
|
return null;
|
|
150
127
|
}
|
|
151
|
-
|
|
152
128
|
async function resolveModuleConfig(moduleName, themeName) {
|
|
153
129
|
const module = configResolver.getMagentoConfig().modules[moduleName];
|
|
154
130
|
let moduleConfigSourcePath = resolveFileByTheme(themeName, moduleName, MODULE_CONFIG_FILE);
|
|
155
|
-
|
|
156
131
|
if (!moduleConfigSourcePath && !module) {
|
|
157
132
|
return null;
|
|
158
133
|
}
|
|
@@ -162,12 +137,10 @@ async function resolveModuleConfig(moduleName, themeName) {
|
|
|
162
137
|
if (!fs.existsSync(moduleConfigSourcePath)) {
|
|
163
138
|
return null;
|
|
164
139
|
}
|
|
165
|
-
|
|
166
140
|
// Importación dinámica común en ESModules
|
|
167
|
-
const moduleConfig = await import(moduleConfigSourcePath);
|
|
141
|
+
const moduleConfig = await import(__rewriteRelativeImportExtension(moduleConfigSourcePath));
|
|
168
142
|
return moduleConfig.default ?? moduleConfig;
|
|
169
143
|
}
|
|
170
|
-
|
|
171
144
|
/**
|
|
172
145
|
* Retrieves the Tailwind configuration for a theme synchronously.
|
|
173
146
|
* Uses a cache system to optimize performance.
|
|
@@ -180,20 +153,19 @@ async function getModuleConfigByThemeConfig(themeName, themeConfig) {
|
|
|
180
153
|
if (moduleConfigByThemeCache.has(key)) {
|
|
181
154
|
return moduleConfigByThemeCache.get(key);
|
|
182
155
|
}
|
|
183
|
-
if (!themeConfig)
|
|
156
|
+
if (!themeConfig)
|
|
157
|
+
return null;
|
|
184
158
|
const modules = configResolver.getAllMagentoModulesEnabled();
|
|
185
159
|
let modulesConfig = {};
|
|
186
|
-
|
|
187
160
|
for (const moduleName of modules) {
|
|
188
161
|
const moduleConfig = await resolveModuleConfig(moduleName, themeName);
|
|
189
|
-
if (!moduleConfig)
|
|
162
|
+
if (!moduleConfig)
|
|
163
|
+
continue;
|
|
190
164
|
modulesConfig = deepmerge(modulesConfig, moduleConfig);
|
|
191
165
|
}
|
|
192
|
-
|
|
193
166
|
moduleConfigByThemeCache.set(key, modulesConfig);
|
|
194
167
|
return modulesConfig;
|
|
195
168
|
}
|
|
196
|
-
|
|
197
169
|
export default {
|
|
198
170
|
getAllJsVueFilesWithInheritance,
|
|
199
171
|
getAllJsVueFilesWithInheritanceCached,
|
|
@@ -201,11 +173,5 @@ export default {
|
|
|
201
173
|
resolveFileByTheme,
|
|
202
174
|
invalidateTheme,
|
|
203
175
|
};
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
getModuleConfigByThemeConfig,
|
|
207
|
-
resolveFileByTheme,
|
|
208
|
-
getAllJsVueFilesWithInheritance,
|
|
209
|
-
getAllJsVueFilesWithInheritanceCached,
|
|
210
|
-
invalidateTheme,
|
|
211
|
-
};
|
|
176
|
+
export { getModuleConfigByThemeConfig, resolveFileByTheme, getAllJsVueFilesWithInheritance, getAllJsVueFilesWithInheritanceCached, invalidateTheme, };
|
|
177
|
+
//# sourceMappingURL=moduleResolver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"moduleResolver.js","sourceRoot":"","sources":["../../src/core/moduleResolver.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,cAAc,MAAM,qBAAqB,CAAC;AACjD,OAAO,EACH,2CAA2C,EAC3C,eAAe,EACf,kBAAkB,EAClB,qBAAqB,GACxB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,mBAAmB,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,mBAAmB,GAAG;IACxB;QACI,GAAG,EAAE,cAAc,CAAC,gBAAgB,EAAE,CAAC,mBAAmB;QAC1D,GAAG,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC;KAC3B;IACD;QACI,GAAG,EAAE,cAAc,CAAC,gBAAgB,EAAE,CAAC,OAAO;QAC9C,GAAG,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;KACpB;CACJ,CAAC;AAEF,gFAAgF;AAChF,qEAAqE;AACrE,MAAM,oBAAoB,GAAG,IAAI,GAAG,EAAE,CAAC;AAEvC,6EAA6E;AAC7E,0EAA0E;AAC1E,+EAA+E;AAC/E,MAAM,aAAa,GAAG,IAAI,CAAC;AAC3B,MAAM,QAAQ,GAAG,CAAC,SAAS,EAAE,EAAE,CAAC,GAAG,SAAS,GAAG,aAAa,GAAG,cAAc,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YAAY,CAAC;AAChD,CAAC;AAED;;;;;;GAMG;AACH,KAAK,UAAU,4BAA4B,CAAC,SAAS,EAAE,WAAW;IAC9D,MAAM,GAAG,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC;IAChC,IAAI,wBAAwB,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;QACpC,OAAO,wBAAwB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC7C,CAAC;IACD,IAAI,CAAC,WAAW;QAAE,OAAO,IAAI,CAAC;IAC9B,MAAM,OAAO,GAAG,cAAc,CAAC,2BAA2B,EAAE,CAAC;IAC7D,IAAI,aAAa,GAAG,EAAE,CAAC;IAEvB,KAAK,MAAM,UAAU,IAAI,OAAO,EAAE,CAAC;QAC/B,MAAM,YAAY,GAAG,MAAM,mBAAmB,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;QACtE,IAAI,CAAC,YAAY;YAAE,SAAS;QAC5B,aAAa,GAAG,SAAS,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC;IAC3D,CAAC;IAED,wBAAwB,CAAC,GAAG,CAAC,GAAG,EAAE,aAAa,CAAC,CAAC;IACjD,OAAO,aAAa,CAAC;AACzB,CAAC;AAED,eAAe;IACX,+BAA+B;IAC/B,qCAAqC;IACrC,4BAA4B;IAC5B,kBAAkB;IAClB,eAAe;CAClB,CAAC;AAEF,OAAO,EACH,4BAA4B,EAC5B,kBAAkB,EAClB,+BAA+B,EAC/B,qCAAqC,EACrC,eAAe,GAClB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare function precompileCss(themeName: any): Promise<void>;
|
|
2
|
+
declare function precompileJs(themeName: any): Promise<void>;
|
|
3
|
+
declare function precompileJsconfig(themeName: any): Promise<void>;
|
|
4
|
+
declare function precompileTsconfig(themeName: any): Promise<void>;
|
|
5
|
+
export { precompileCss, precompileJs, precompileJsconfig, precompileTsconfig };
|
|
6
|
+
//# sourceMappingURL=preCompileFiles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preCompileFiles.d.ts","sourceRoot":"","sources":["../../src/core/preCompileFiles.ts"],"names":[],"mappings":"AAuBA,iBAAe,aAAa,CAAC,SAAS,KAAA,iBAIrC;AAED,iBAAe,YAAY,CAAC,SAAS,KAAA,iBAYpC;AA2BD,iBAAe,kBAAkB,CAAC,SAAS,KAAA,iBAS1C;AAMD,iBAAe,kBAAkB,CAAC,SAAS,KAAA,iBAmB1C;AAED,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -1,46 +1,30 @@
|
|
|
1
1
|
import path from "path";
|
|
2
2
|
import fs from "fs/promises";
|
|
3
|
-
import moduleResolver from "./moduleResolver.
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
} from "
|
|
8
|
-
import getCssImports from "./cssResolver.ts";
|
|
9
|
-
import configResolver from "./configResolver.ts";
|
|
10
|
-
import generateJsconfigPaths, {
|
|
11
|
-
buildThemeJsconfig,
|
|
12
|
-
buildThemeTsconfig,
|
|
13
|
-
GENERATED_MARKER,
|
|
14
|
-
} from "./generateJsconfig.ts";
|
|
3
|
+
import moduleResolver from "./moduleResolver.js";
|
|
4
|
+
import { PRECOMPILED_FOLDER, ALL_JS_VUE_FILES_WITH_INHERITANCE_FILE_NAME, } from "../config/default.js";
|
|
5
|
+
import getCssImports from "./cssResolver.js";
|
|
6
|
+
import configResolver from "./configResolver.js";
|
|
7
|
+
import generateJsconfigPaths, { buildThemeJsconfig, buildThemeTsconfig, GENERATED_MARKER, } from "./generateJsconfig.js";
|
|
15
8
|
import { fileURLToPath } from "url";
|
|
16
9
|
const __filename = fileURLToPath(import.meta.url);
|
|
17
10
|
const __dirname = path.dirname(__filename);
|
|
18
|
-
|
|
19
11
|
async function writeToFile(outputPath, content) {
|
|
20
12
|
await fs.mkdir(path.dirname(outputPath), { recursive: true });
|
|
21
13
|
await fs.writeFile(outputPath, content, "utf-8");
|
|
22
14
|
}
|
|
23
|
-
|
|
24
15
|
async function precompileCss(themeName) {
|
|
25
16
|
const cssContent = await getCssImports(themeName);
|
|
26
17
|
const outputPath = path.resolve(PRECOMPILED_FOLDER, themeName, "precompiled.css");
|
|
27
18
|
await writeToFile(outputPath, cssContent);
|
|
28
19
|
}
|
|
29
|
-
|
|
30
20
|
async function precompileJs(themeName) {
|
|
31
21
|
const baseJsPath = path.resolve(__dirname, "../templates/base_main_js_file.js");
|
|
32
22
|
const jsOutputPath = path.resolve(PRECOMPILED_FOLDER, themeName, "precompiled.js");
|
|
33
23
|
await fs.copyFile(baseJsPath, jsOutputPath);
|
|
34
|
-
|
|
35
|
-
const vueFilesOutputPath = path.join(
|
|
36
|
-
PRECOMPILED_FOLDER,
|
|
37
|
-
themeName,
|
|
38
|
-
ALL_JS_VUE_FILES_WITH_INHERITANCE_FILE_NAME,
|
|
39
|
-
);
|
|
24
|
+
const vueFilesOutputPath = path.join(PRECOMPILED_FOLDER, themeName, ALL_JS_VUE_FILES_WITH_INHERITANCE_FILE_NAME);
|
|
40
25
|
const vueFiles = await moduleResolver.getAllJsVueFilesWithInheritance(themeName);
|
|
41
26
|
await writeToFile(vueFilesOutputPath, JSON.stringify(vueFiles));
|
|
42
27
|
}
|
|
43
|
-
|
|
44
28
|
// Write a build-managed config into the theme src, refusing to clobber a
|
|
45
29
|
// hand-written one: only (re)writes a file carrying our generated marker, or
|
|
46
30
|
// creates one when absent. Write-if-changed so an unchanged file keeps its mtime
|
|
@@ -49,57 +33,47 @@ async function writeManagedConfig(outputPath, content, manages) {
|
|
|
49
33
|
let existing;
|
|
50
34
|
try {
|
|
51
35
|
existing = await fs.readFile(outputPath, "utf-8");
|
|
52
|
-
}
|
|
36
|
+
}
|
|
37
|
+
catch {
|
|
53
38
|
existing = null;
|
|
54
39
|
}
|
|
55
40
|
if (existing !== null && !existing.startsWith(GENERATED_MARKER)) {
|
|
56
|
-
console.warn(
|
|
57
|
-
`
|
|
58
|
-
`Remove it to let the build manage ${manages}.`,
|
|
59
|
-
);
|
|
41
|
+
console.warn(`[mage-obsidian] ${outputPath} is not generated by mage-obsidian; leaving it untouched. ` +
|
|
42
|
+
`Remove it to let the build manage ${manages}.`);
|
|
60
43
|
return;
|
|
61
44
|
}
|
|
62
|
-
if (existing === content)
|
|
45
|
+
if (existing === content)
|
|
46
|
+
return;
|
|
63
47
|
await writeToFile(outputPath, content);
|
|
64
48
|
}
|
|
65
|
-
|
|
66
49
|
// The theme's jsconfig.json (gitignored) so the author's editor — which opens the
|
|
67
50
|
// theme sources directly — resolves the framework's `Vendor_Module::` specifiers
|
|
68
51
|
// and npm packages via `paths`. Skipped silently if the theme has no src.
|
|
69
52
|
async function precompileJsconfig(themeName) {
|
|
70
53
|
const themeDefinition = configResolver.getThemeDefinition(themeName);
|
|
71
|
-
if (!themeDefinition?.src)
|
|
54
|
+
if (!themeDefinition?.src)
|
|
55
|
+
return;
|
|
72
56
|
const paths = await generateJsconfigPaths(themeName);
|
|
73
|
-
await writeManagedConfig(
|
|
74
|
-
path.join(themeDefinition.src, "jsconfig.json"),
|
|
75
|
-
buildThemeJsconfig(paths),
|
|
76
|
-
"Vendor_Module:: import resolution",
|
|
77
|
-
);
|
|
57
|
+
await writeManagedConfig(path.join(themeDefinition.src, "jsconfig.json"), buildThemeJsconfig(paths), "Vendor_Module:: import resolution");
|
|
78
58
|
}
|
|
79
|
-
|
|
80
59
|
// The theme's tsconfig.typecheck.json (gitignored) — the assembled `vue-tsc`
|
|
81
60
|
// gate. Same `paths` the build resolves through, so every `Vendor_Module::`
|
|
82
61
|
// resolves and cross-module type seams are actually checked. Not named
|
|
83
62
|
// `tsconfig.json`, so it never shadows the editor jsconfig.
|
|
84
63
|
async function precompileTsconfig(themeName) {
|
|
85
64
|
const themeDefinition = configResolver.getThemeDefinition(themeName);
|
|
86
|
-
if (!themeDefinition?.src)
|
|
65
|
+
if (!themeDefinition?.src)
|
|
66
|
+
return;
|
|
87
67
|
const paths = await generateJsconfigPaths(themeName, { remap: false });
|
|
88
68
|
// The assembled file set to check: every resolved target from the literal
|
|
89
69
|
// `Vendor_Module::` keys, deduped (shorthands point at the same file). Wildcard
|
|
90
70
|
// keys (`*`, `mage-obsidian/*`) are resolution patterns, not source files.
|
|
91
71
|
const files = [
|
|
92
|
-
...new Set(
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
.flatMap(([, targets]) => targets),
|
|
96
|
-
),
|
|
72
|
+
...new Set(Object.entries(paths)
|
|
73
|
+
.filter(([key]) => !key.includes("*"))
|
|
74
|
+
.flatMap(([, targets]) => targets)),
|
|
97
75
|
];
|
|
98
|
-
await writeManagedConfig(
|
|
99
|
-
path.join(themeDefinition.src, "tsconfig.typecheck.json"),
|
|
100
|
-
buildThemeTsconfig(paths, files),
|
|
101
|
-
"the vue-tsc typecheck gate",
|
|
102
|
-
);
|
|
76
|
+
await writeManagedConfig(path.join(themeDefinition.src, "tsconfig.typecheck.json"), buildThemeTsconfig(paths, files), "the vue-tsc typecheck gate");
|
|
103
77
|
}
|
|
104
|
-
|
|
105
78
|
export { precompileCss, precompileJs, precompileJsconfig, precompileTsconfig };
|
|
79
|
+
//# sourceMappingURL=preCompileFiles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preCompileFiles.js","sourceRoot":"","sources":["../../src/core/preCompileFiles.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,cAAc,MAAM,qBAAqB,CAAC;AACjD,OAAO,EACH,kBAAkB,EAClB,2CAA2C,GAC9C,MAAM,sBAAsB,CAAC;AAC9B,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAC7C,OAAO,cAAc,MAAM,qBAAqB,CAAC;AACjD,OAAO,qBAAqB,EAAE,EAC1B,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,GACnB,MAAM,uBAAu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