@vendure/cloud 0.3.0 → 0.3.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.
- package/README.md +20 -1
- package/dist/dev/dashboard-vite-config.d.ts +8 -0
- package/dist/dev/dashboard-vite-config.d.ts.map +1 -0
- package/dist/dev/dashboard-vite-config.js +52 -0
- package/dist/dev/dashboard-vite-config.js.map +1 -0
- package/dist/dev/dev-command.d.ts.map +1 -1
- package/dist/dev/dev-command.js +20 -2
- package/dist/dev/dev-command.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/vite.d.ts +9 -0
- package/dist/vite.d.ts.map +1 -0
- package/dist/vite.js +94 -0
- package/dist/vite.js.map +1 -0
- package/package.json +12 -3
package/README.md
CHANGED
|
@@ -24,6 +24,25 @@ the next action is the two servers below, the migration chain, and the two entry
|
|
|
24
24
|
otherwise have looked for in the customer's repository — which a Cloud Config application does not
|
|
25
25
|
have (ADR-0043). `test/dev-e2e/run.sh` drives all of that from a registry install.
|
|
26
26
|
|
|
27
|
+
`vendure dev` generates the Dashboard's Vite configuration under `.cache` from the same Cloud
|
|
28
|
+
Config. A standard Cloud project therefore owns no `vite.config.*`. The generated configuration
|
|
29
|
+
resolves the handle, derives the Dashboard route, exposes customer-authored Vendure plugins to
|
|
30
|
+
Dashboard extension discovery and delegates compilation to `@vendure/dashboard/vite`.
|
|
31
|
+
|
|
32
|
+
Projects that need custom Vite behaviour can pass `--vite-config` and use the Cloud-aware wrapper:
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
import { vendureCloudDashboardPlugin } from "@vendure/cloud/vite";
|
|
36
|
+
|
|
37
|
+
vendureCloudDashboardPlugin({
|
|
38
|
+
vendureConfigPath: new URL("./src/vendure-config.ts", import.meta.url),
|
|
39
|
+
api: { host: "http://localhost", port: 3000 },
|
|
40
|
+
gqlOutputPath: "./src/gql",
|
|
41
|
+
});
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Production-only platform plugin declarations are not composed inside the Vite process.
|
|
45
|
+
|
|
27
46
|
`vendure dev` provisions the local PostgreSQL database and the local Valkey cache, and runs the
|
|
28
47
|
included runner against them. The runner itself provisions nothing: `composeLocalConfig` takes each
|
|
29
48
|
connection as `LocalRuntimeOptions.database` and `LocalRuntimeOptions.cache`, or reads
|
|
@@ -57,7 +76,7 @@ without any has no schema this runtime is willing to invent.
|
|
|
57
76
|
`test/migration-chain.integration.test.ts` builds an empty database from a generated initial
|
|
58
77
|
migration and then carries a second one through to a deployed-shaped database.
|
|
59
78
|
|
|
60
|
-
Install `pg`, `ioredis
|
|
79
|
+
Install `pg`, `ioredis`, `@vendure/dashboard` and `vite` as development dependencies. They are
|
|
61
80
|
intentionally absent from deployed images, and none is reached until a local configuration is
|
|
62
81
|
composed, so an application that never composes one pays nothing for them.
|
|
63
82
|
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface DashboardViteConfigInput {
|
|
2
|
+
projectDir: string;
|
|
3
|
+
cloudConfigPath: string;
|
|
4
|
+
apiPort: number;
|
|
5
|
+
}
|
|
6
|
+
export declare function writeManagedDashboardViteConfig(input: DashboardViteConfigInput): string;
|
|
7
|
+
export declare function managedDashboardViteConfigSource(input: DashboardViteConfigInput, generatedConfigPath: string): string;
|
|
8
|
+
//# sourceMappingURL=dashboard-vite-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard-vite-config.d.ts","sourceRoot":"","sources":["../../src/dev/dashboard-vite-config.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,wBAAwB;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;CACjB;AAKD,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,wBAAwB,GAAG,MAAM,CASvF;AAED,wBAAgB,gCAAgC,CAC9C,KAAK,EAAE,wBAAwB,EAC/B,mBAAmB,EAAE,MAAM,GAC1B,MAAM,CAiCR"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { dirname, join, relative, sep } from "node:path";
|
|
3
|
+
import { DEFAULT_VITE_DEV_SERVER_PORT } from "../local-dashboard-plugin.js";
|
|
4
|
+
const MANAGED_DASHBOARD_DIRECTORY = ".cache/vendure-cloud-dashboard";
|
|
5
|
+
// The standard Cloud project owns one configuration file. Vite still needs a configuration module,
|
|
6
|
+
// so `vendure dev` writes this implementation detail beside the adapter the Dashboard compiler
|
|
7
|
+
// generates and points Core's supervisor at it.
|
|
8
|
+
export function writeManagedDashboardViteConfig(input) {
|
|
9
|
+
const configPath = join(input.projectDir, MANAGED_DASHBOARD_DIRECTORY, "vite.config.mjs");
|
|
10
|
+
const source = managedDashboardViteConfigSource(input, configPath);
|
|
11
|
+
mkdirSync(dirname(configPath), { recursive: true });
|
|
12
|
+
if (!existsSync(configPath) || readFileSync(configPath, "utf8") !== source) {
|
|
13
|
+
writeFileSync(configPath, source);
|
|
14
|
+
}
|
|
15
|
+
return configPath;
|
|
16
|
+
}
|
|
17
|
+
export function managedDashboardViteConfigSource(input, generatedConfigPath) {
|
|
18
|
+
const cloudConfigSpecifier = sourceSpecifier(relative(dirname(generatedConfigPath), input.cloudConfigPath));
|
|
19
|
+
return [
|
|
20
|
+
'// Generated by "vendure dev". Changes are replaced on the next run.',
|
|
21
|
+
'import { readCloudConfig, readCloudConfigHandle, resolveDashboardSettings } from "@vendure/cloud";',
|
|
22
|
+
'import { vendureCloudDashboardPlugin } from "@vendure/cloud/vite";',
|
|
23
|
+
'import { defineConfig } from "vite";',
|
|
24
|
+
`import * as cloudConfigModule from ${JSON.stringify(cloudConfigSpecifier)};`,
|
|
25
|
+
"",
|
|
26
|
+
`const cloudConfigPath = ${JSON.stringify(input.cloudConfigPath)};`,
|
|
27
|
+
"const handle = readCloudConfigHandle(cloudConfigModule, cloudConfigPath);",
|
|
28
|
+
"const dashboard = resolveDashboardSettings(readCloudConfig(handle).config);",
|
|
29
|
+
"",
|
|
30
|
+
"export default defineConfig({",
|
|
31
|
+
" base: `/${dashboard.route}`,",
|
|
32
|
+
` build: { outDir: ${JSON.stringify(join(input.projectDir, "dist", "dashboard"))} },`,
|
|
33
|
+
` server: { host: "127.0.0.1", port: ${DEFAULT_VITE_DEV_SERVER_PORT}, strictPort: true },`,
|
|
34
|
+
" plugins: [",
|
|
35
|
+
" vendureCloudDashboardPlugin({",
|
|
36
|
+
" vendureConfigPath: cloudConfigPath,",
|
|
37
|
+
` api: { host: "http://127.0.0.1", port: ${input.apiPort} },`,
|
|
38
|
+
` gqlOutputPath: ${JSON.stringify(join(input.projectDir, "src", "gql"))},`,
|
|
39
|
+
" }),",
|
|
40
|
+
" ],",
|
|
41
|
+
" resolve: {",
|
|
42
|
+
` alias: { "@/gql": ${JSON.stringify(join(input.projectDir, "src", "gql", "graphql.ts"))} },`,
|
|
43
|
+
" },",
|
|
44
|
+
"});",
|
|
45
|
+
"",
|
|
46
|
+
].join("\n");
|
|
47
|
+
}
|
|
48
|
+
function sourceSpecifier(path) {
|
|
49
|
+
const normalized = path.split(sep).join("/");
|
|
50
|
+
return normalized.startsWith(".") ? normalized : `./${normalized}`;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=dashboard-vite-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard-vite-config.js","sourceRoot":"","sources":["../../src/dev/dashboard-vite-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,EAAE,4BAA4B,EAAE,MAAM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;QACnC,2CAA2C;QAC3C,gDAAgD,KAAK,CAAC,OAAO,KAAK;QAClE,wBAAwB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,GAAG;QAC/E,SAAS;QACT,MAAM;QACN,cAAc;QACd,yBAAyB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,CAAC,CAAC,KAAK;QAChG,MAAM;QACN,KAAK;QACL,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC;AAED,SAAS,eAAe,CAAC,IAAY;IACnC,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC7C,OAAO,UAAU,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,UAAU,EAAE,CAAC;AACrE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev-command.d.ts","sourceRoot":"","sources":["../../src/dev/dev-command.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"dev-command.d.ts","sourceRoot":"","sources":["../../src/dev/dev-command.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AA2B/D,MAAM,MAAM,aAAa,GAAG,kBAAkB,CAAC;AAE/C,wBAAsB,WAAW,CAC/B,IAAI,EAAE,OAAO,EAAE,EACf,IAAI,EAAE,aAAa,GAElB,OAAO,CAAC,IAAI,GAAG,MAAM,CAAC,CAsDxB;AA+CD,qBAAa,uBAAwB,SAAQ,KAAK;;CAOjD"}
|
package/dist/dev/dev-command.js
CHANGED
|
@@ -7,6 +7,7 @@ import { LOCAL_CACHE_URL_VAR } from "../local-cache.js";
|
|
|
7
7
|
import { LOCAL_DATABASE_URL_VAR } from "../local-database.js";
|
|
8
8
|
import { assertLocalRuntimeAllowed } from "../local-runtime-guard.js";
|
|
9
9
|
import { readCommandOptions } from "./cli-host.js";
|
|
10
|
+
import { writeManagedDashboardViteConfig } from "./dashboard-vite-config.js";
|
|
10
11
|
import { DEV_CONFIG_PATH_VAR } from "./dev-config.js";
|
|
11
12
|
import { provisionLocalServices } from "./local-services.js";
|
|
12
13
|
import { resolveCloudProjectLayout } from "./project-layout.js";
|
|
@@ -20,6 +21,7 @@ import { resolveCloudProjectLayout } from "./project-layout.js";
|
|
|
20
21
|
// The targets that run the application. Core's other target, `dashboard`, is a Vite process reading
|
|
21
22
|
// the customer's source and reaches neither the database nor the cache.
|
|
22
23
|
const DEV_TARGETS_NEEDING_SERVICES = new Set(["all", "server", "worker"]);
|
|
24
|
+
const DEV_TARGETS_WITH_DASHBOARD = new Set(["all", "dashboard"]);
|
|
23
25
|
export async function runCloudDev(args, next) {
|
|
24
26
|
// ADR-0043's fail-closed rule, applied before anything is started. A process carrying managed
|
|
25
27
|
// configuration must not reach local substitutes, and refusing here means it never gets as far as
|
|
@@ -30,14 +32,22 @@ export async function runCloudDev(args, next) {
|
|
|
30
32
|
// boolean; the other two are written, which is the point of holding it.
|
|
31
33
|
const options = readCommandOptions(args);
|
|
32
34
|
const target = typeof args[0] === "string" ? args[0] : "all";
|
|
35
|
+
const layout = resolveCloudProjectLayout(process.cwd());
|
|
36
|
+
process.env[DEV_CONFIG_PATH_VAR] = layout.configPath;
|
|
37
|
+
if (DEV_TARGETS_WITH_DASHBOARD.has(target) && options.viteConfig === undefined) {
|
|
38
|
+
const viteConfigPath = writeManagedDashboardViteConfig({
|
|
39
|
+
projectDir: layout.projectDir,
|
|
40
|
+
cloudConfigPath: layout.configPath,
|
|
41
|
+
apiPort: applicationPort(process.env.PORT),
|
|
42
|
+
});
|
|
43
|
+
options.viteConfig = relative(layout.projectDir, viteConfigPath);
|
|
44
|
+
}
|
|
33
45
|
// The Dashboard is a Vite process reading the customer's source. It needs no database and no
|
|
34
46
|
// cache, so `vendure dev dashboard` starts neither and works on a machine with no container
|
|
35
47
|
// runtime at all.
|
|
36
48
|
if (!DEV_TARGETS_NEEDING_SERVICES.has(target)) {
|
|
37
49
|
return next(...args);
|
|
38
50
|
}
|
|
39
|
-
const layout = resolveCloudProjectLayout(process.cwd());
|
|
40
|
-
process.env[DEV_CONFIG_PATH_VAR] = layout.configPath;
|
|
41
51
|
// Entry paths relative to the project directory, because that is what Core resolves them against
|
|
42
52
|
// — both when it checks that they exist and when it starts them. They point into this package
|
|
43
53
|
// rather than at anything the customer wrote, which is what makes an application with no entry
|
|
@@ -62,6 +72,14 @@ export async function runCloudDev(args, next) {
|
|
|
62
72
|
await services.stop();
|
|
63
73
|
}
|
|
64
74
|
}
|
|
75
|
+
function applicationPort(value) {
|
|
76
|
+
if (value === undefined)
|
|
77
|
+
return 3000;
|
|
78
|
+
const port = Number(value);
|
|
79
|
+
if (Number.isInteger(port) && port > 0 && port <= 65_535)
|
|
80
|
+
return port;
|
|
81
|
+
throw new Error(`Vendure Cloud: PORT must be an integer from 1 to 65535; received ${value}.`);
|
|
82
|
+
}
|
|
65
83
|
// Written onto this process's environment under the names `@vendure/cloud` already publishes for a
|
|
66
84
|
// supplied connection, so the supervised processes resolve them the same way a process started any
|
|
67
85
|
// other way resolves the ones a developer supplied.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev-command.js","sourceRoot":"","sources":["../../src/dev/dev-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,E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,KAAK,EAAE,CACV,CAAC;IACJ,CAAC;IACD,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,eAAe,EAAE,OAAO,CAAC,CAEpE,CAAC;IACF,MAAM,GAAG,GAAG,OAAO,WAAW,CAAC,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;IACjG,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CACb,mHAAmH,CACpH,CAAC;IACJ,CAAC;IACD,OAAO,OAAO,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,GAAG,CAAC,CAAC;AAChD,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from "@vendure/cloud-config";
|
|
2
|
+
export { readCloudConfigHandle } from "./cloud-config-module.js";
|
|
2
3
|
export { bootstrapLocalServer, bootstrapLocalWorker, composeLocalConfig, LocalMigrationFailedError, NoDeclaredMigrationsError, runLocalMigrations, type LocalRuntimeOptions, } from "./local-runtime.js";
|
|
3
4
|
export { LOCAL_CACHE_URL_VAR, LocalCacheUnavailableError, type LocalCacheConnection, } from "./local-cache.js";
|
|
4
5
|
export { LOCAL_DATABASE_URL_VAR, LocalDatabaseUnavailableError, type LocalDatabaseConnection, } from "./local-database.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,cAAc,uBAAuB,CAAC;AACtC,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,yBAAyB,EACzB,yBAAyB,EACzB,kBAAkB,EAClB,KAAK,mBAAmB,GACzB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,mBAAmB,EACnB,0BAA0B,EAC1B,KAAK,oBAAoB,GAC1B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,sBAAsB,EACtB,6BAA6B,EAC7B,KAAK,uBAAuB,GAC7B,MAAM,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,yBAAyB,EACzB,yBAAyB,EACzB,kBAAkB,EAClB,KAAK,mBAAmB,GACzB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,mBAAmB,EACnB,0BAA0B,EAC1B,KAAK,oBAAoB,GAC1B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,sBAAsB,EACtB,6BAA6B,EAC7B,KAAK,uBAAuB,GAC7B,MAAM,qBAAqB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
// reaches a customer without a second edit here that nothing would catch if it were
|
|
7
7
|
// forgotten.
|
|
8
8
|
export * from "@vendure/cloud-config";
|
|
9
|
+
export { readCloudConfigHandle } from "./cloud-config-module.js";
|
|
9
10
|
export { bootstrapLocalServer, bootstrapLocalWorker, composeLocalConfig, LocalMigrationFailedError, NoDeclaredMigrationsError, runLocalMigrations, } from "./local-runtime.js";
|
|
10
11
|
export { LOCAL_CACHE_URL_VAR, LocalCacheUnavailableError, } from "./local-cache.js";
|
|
11
12
|
export { LOCAL_DATABASE_URL_VAR, LocalDatabaseUnavailableError, } from "./local-database.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,4FAA4F;AAC5F,oFAAoF;AACpF,EAAE;AACF,yFAAyF;AACzF,oFAAoF;AACpF,aAAa;AACb,cAAc,uBAAuB,CAAC;AACtC,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,yBAAyB,EACzB,yBAAyB,EACzB,kBAAkB,GAEnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,mBAAmB,EACnB,0BAA0B,GAE3B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,sBAAsB,EACtB,6BAA6B,GAE9B,MAAM,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,4FAA4F;AAC5F,oFAAoF;AACpF,EAAE;AACF,yFAAyF;AACzF,oFAAoF;AACpF,aAAa;AACb,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,yBAAyB,EACzB,yBAAyB,EACzB,kBAAkB,GAEnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,mBAAmB,EACnB,0BAA0B,GAE3B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,sBAAsB,EACtB,6BAA6B,GAE9B,MAAM,qBAAqB,CAAC"}
|
package/dist/vite.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { vendureDashboardPlugin } from "@vendure/dashboard/vite";
|
|
2
|
+
type DashboardPluginOptions = Parameters<typeof vendureDashboardPlugin>[0];
|
|
3
|
+
type DashboardPathAdapter = NonNullable<DashboardPluginOptions["pathAdapter"]>;
|
|
4
|
+
export type VendureCloudDashboardPluginOptions = Omit<DashboardPluginOptions, "vendureConfigExport" | "pathAdapter"> & {
|
|
5
|
+
pathAdapter?: Pick<DashboardPathAdapter, "sourceRoot" | "transformTsConfigPathMappings">;
|
|
6
|
+
};
|
|
7
|
+
export declare function vendureCloudDashboardPlugin(options: VendureCloudDashboardPluginOptions): ReturnType<typeof vendureDashboardPlugin>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=vite.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vite.d.ts","sourceRoot":"","sources":["../src/vite.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,KAAK,sBAAsB,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3E,KAAK,oBAAoB,GAAG,WAAW,CAAC,sBAAsB,CAAC,aAAa,CAAC,CAAC,CAAC;AAE/E,MAAM,MAAM,kCAAkC,GAAG,IAAI,CACnD,sBAAsB,EACtB,qBAAqB,GAAG,aAAa,CACtC,GAAG;IAGF,WAAW,CAAC,EAAE,IAAI,CAAC,oBAAoB,EAAE,YAAY,GAAG,+BAA+B,CAAC,CAAC;CAC1F,CAAC;AAEF,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,kCAAkC,GAC1C,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAuB3C"}
|
package/dist/vite.js
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
3
|
+
import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
import { vendureDashboardPlugin } from "@vendure/dashboard/vite";
|
|
6
|
+
export function vendureCloudDashboardPlugin(options) {
|
|
7
|
+
const cloudConfigPath = normalizedPath(options.vendureConfigPath);
|
|
8
|
+
const projectRoot = findPackageRoot(dirname(cloudConfigPath));
|
|
9
|
+
const requestedSourceRoot = options.pathAdapter?.sourceRoot
|
|
10
|
+
? resolve(options.pathAdapter.sourceRoot)
|
|
11
|
+
: projectRoot;
|
|
12
|
+
const sourceRoot = dashboardSourceRoot(requestedSourceRoot, projectRoot);
|
|
13
|
+
const adapterPath = writeDashboardConfigAdapter(projectRoot, cloudConfigPath);
|
|
14
|
+
const adapterOutputPath = relative(sourceRoot, adapterPath).replace(/\.ts$/, ".js");
|
|
15
|
+
return vendureDashboardPlugin({
|
|
16
|
+
...options,
|
|
17
|
+
vendureConfigPath: adapterPath,
|
|
18
|
+
pluginPackageScanner: {
|
|
19
|
+
nodeModulesRoot: join(projectRoot, "node_modules"),
|
|
20
|
+
...options.pluginPackageScanner,
|
|
21
|
+
},
|
|
22
|
+
pathAdapter: {
|
|
23
|
+
sourceRoot,
|
|
24
|
+
transformTsConfigPathMappings: options.pathAdapter?.transformTsConfigPathMappings,
|
|
25
|
+
getCompiledConfigPath: ({ outputPath }) => join(outputPath, adapterOutputPath),
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function writeDashboardConfigAdapter(projectRoot, cloudConfigPath) {
|
|
30
|
+
const key = createHash("sha256").update(cloudConfigPath).digest("hex").slice(0, 12);
|
|
31
|
+
const adapterDirectory = join(projectRoot, ".cache", "vendure-cloud-dashboard", key);
|
|
32
|
+
const adapterPath = join(adapterDirectory, "vendure-config.ts");
|
|
33
|
+
const configSpecifier = javascriptSpecifier(relative(adapterDirectory, cloudConfigPath));
|
|
34
|
+
const source = [
|
|
35
|
+
'import { readCloudConfig, readCloudConfigHandle } from "@vendure/cloud";',
|
|
36
|
+
'import type { VendureConfig } from "@vendure/core";',
|
|
37
|
+
`import * as cloudConfigModule from ${JSON.stringify(configSpecifier)};`,
|
|
38
|
+
"",
|
|
39
|
+
`const handle = readCloudConfigHandle(cloudConfigModule, ${JSON.stringify(cloudConfigPath)});`,
|
|
40
|
+
"",
|
|
41
|
+
"// The Dashboard compiler only reads config.plugins to filter statically discovered extensions.",
|
|
42
|
+
"// Platform-owned runtime fields stay unset because this Vite process never boots Vendure.",
|
|
43
|
+
"const dashboardConfig = readCloudConfig(handle).config as VendureConfig;",
|
|
44
|
+
"// The explicit annotation is how the Dashboard loader finds this export in the source AST.",
|
|
45
|
+
"export const config: VendureConfig = dashboardConfig;",
|
|
46
|
+
"",
|
|
47
|
+
].join("\n");
|
|
48
|
+
mkdirSync(adapterDirectory, { recursive: true });
|
|
49
|
+
if (!existsSync(adapterPath) || readFileSync(adapterPath, "utf8") !== source) {
|
|
50
|
+
writeFileSync(adapterPath, source);
|
|
51
|
+
}
|
|
52
|
+
return adapterPath;
|
|
53
|
+
}
|
|
54
|
+
function javascriptSpecifier(path) {
|
|
55
|
+
const normalized = path
|
|
56
|
+
.split(sep)
|
|
57
|
+
.join("/")
|
|
58
|
+
.replace(/\.(?:[cm]?[jt]sx?)$/, ".js");
|
|
59
|
+
return normalized.startsWith(".") ? normalized : `./${normalized}`;
|
|
60
|
+
}
|
|
61
|
+
function normalizedPath(path) {
|
|
62
|
+
return resolve(path instanceof URL ? fileURLToPath(path) : path);
|
|
63
|
+
}
|
|
64
|
+
function findPackageRoot(start) {
|
|
65
|
+
let current = resolve(start);
|
|
66
|
+
while (true) {
|
|
67
|
+
if (existsSync(join(current, "package.json")))
|
|
68
|
+
return current;
|
|
69
|
+
const parent = dirname(current);
|
|
70
|
+
if (parent === current) {
|
|
71
|
+
throw new Error(`Vendure Cloud: could not find a package.json above the Dashboard config path ${resolve(start)}.`);
|
|
72
|
+
}
|
|
73
|
+
current = parent;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
function dashboardSourceRoot(requestedSourceRoot, projectRoot) {
|
|
77
|
+
if (containsPath(requestedSourceRoot, projectRoot))
|
|
78
|
+
return requestedSourceRoot;
|
|
79
|
+
// The generated adapter lives under the package root. A source root such as `<project>/src`
|
|
80
|
+
// must widen to the package root so the Dashboard compiler sees both it and the customer config.
|
|
81
|
+
if (containsPath(projectRoot, requestedSourceRoot))
|
|
82
|
+
return projectRoot;
|
|
83
|
+
throw new Error(`Vendure Cloud: the Dashboard sourceRoot ${requestedSourceRoot} must contain, or be inside, the project package ${projectRoot}.`);
|
|
84
|
+
}
|
|
85
|
+
function containsPath(parent, child) {
|
|
86
|
+
const path = relative(resolve(parent), resolve(child));
|
|
87
|
+
if (path === "")
|
|
88
|
+
return true;
|
|
89
|
+
if (isAbsolute(path))
|
|
90
|
+
return false;
|
|
91
|
+
const firstSegment = path.split(sep)[0];
|
|
92
|
+
return firstSegment !== "..";
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=vite.js.map
|
package/dist/vite.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vite.js","sourceRoot":"","sources":["../src/vite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAcjE,MAAM,UAAU,2BAA2B,CACzC,OAA2C;IAE3C,MAAM,eAAe,GAAG,cAAc,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAClE,MAAM,WAAW,GAAG,eAAe,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC;IAC9D,MAAM,mBAAmB,GAAG,OAAO,CAAC,WAAW,EAAE,UAAU;QACzD,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC;QACzC,CAAC,CAAC,WAAW,CAAC;IAChB,MAAM,UAAU,GAAG,mBAAmB,CAAC,mBAAmB,EAAE,WAAW,CAAC,CAAC;IACzE,MAAM,WAAW,GAAG,2BAA2B,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC;IAC9E,MAAM,iBAAi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AAS,mBAAmB,CAAC,mBAA2B,EAAE,WAAmB;IAC3E,IAAI,YAAY,CAAC,mBAAmB,EAAE,WAAW,CAAC;QAAE,OAAO,mBAAmB,CAAC;IAE/E,4FAA4F;IAC5F,iGAAiG;IACjG,IAAI,YAAY,CAAC,WAAW,EAAE,mBAAmB,CAAC;QAAE,OAAO,WAAW,CAAC;IAEvE,MAAM,IAAI,KAAK,CACb,2CAA2C,mBAAmB,oDAAoD,WAAW,GAAG,CACjI,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,MAAc,EAAE,KAAa;IACjD,MAAM,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;IACvD,IAAI,IAAI,KAAK,EAAE;QAAE,OAAO,IAAI,CAAC;IAC7B,IAAI,UAAU,CAAC,IAAI,CAAC;QAAE,OAAO,KAAK,CAAC;IACnC,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACxC,OAAO,YAAY,KAAK,IAAI,CAAC;AAC/B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vendure/cloud",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "The package a Vendure Cloud application installs. Re-exports the Cloud Config interface and the platform-supplied plugins.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -65,6 +65,11 @@
|
|
|
65
65
|
"types": "./dist/local-runtime.d.ts",
|
|
66
66
|
"import": "./dist/local-runtime.js",
|
|
67
67
|
"require": "./dist/local-runtime.js"
|
|
68
|
+
},
|
|
69
|
+
"./vite": {
|
|
70
|
+
"types": "./dist/vite.d.ts",
|
|
71
|
+
"import": "./dist/vite.js",
|
|
72
|
+
"require": "./dist/vite.js"
|
|
68
73
|
}
|
|
69
74
|
},
|
|
70
75
|
"files": [
|
|
@@ -89,7 +94,7 @@
|
|
|
89
94
|
"dependencies": {
|
|
90
95
|
"@clack/prompts": "^0.11.0",
|
|
91
96
|
"@vendure/asset-server-plugin": "^3.7.0",
|
|
92
|
-
"@vendure/cloud-config": "0.3.
|
|
97
|
+
"@vendure/cloud-config": "0.3.1",
|
|
93
98
|
"picocolors": "^1.1.0",
|
|
94
99
|
"pino": "^10.3.1",
|
|
95
100
|
"zod": "^4.0.0"
|
|
@@ -100,7 +105,8 @@
|
|
|
100
105
|
"@vendure/dashboard": "^3.7.0",
|
|
101
106
|
"ioredis": "^5.3.2",
|
|
102
107
|
"pg": "^8.16.0",
|
|
103
|
-
"ts-node": "^10.9.2"
|
|
108
|
+
"ts-node": "^10.9.2",
|
|
109
|
+
"vite": "^7.3.1"
|
|
104
110
|
},
|
|
105
111
|
"peerDependenciesMeta": {
|
|
106
112
|
"@vendure/cli": {
|
|
@@ -117,6 +123,9 @@
|
|
|
117
123
|
},
|
|
118
124
|
"ts-node": {
|
|
119
125
|
"optional": true
|
|
126
|
+
},
|
|
127
|
+
"vite": {
|
|
128
|
+
"optional": true
|
|
120
129
|
}
|
|
121
130
|
},
|
|
122
131
|
"devDependencies": {
|