create-medusa-app 2.22.4 → 2.22.5
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/AGENTS.md +1 -1
- package/CHANGELOG.md +9 -0
- package/dist/index.js +0 -0
- package/package.json +4 -4
- package/src/utils/__tests__/prepare-project.test.ts +65 -0
- package/src/utils/__tests__/update-package-versions.test.ts +41 -0
- package/src/utils/prepare-project.ts +7 -0
- package/src/utils/project-creator/medusa-plugin-creator.ts +1 -0
- package/src/utils/update-package-versions.ts +7 -0
- package/dist/commands/create.js +0 -10
- package/dist/utils/claude-code-plugin.js +0 -76
- package/dist/utils/clone-repo.js +0 -77
- package/dist/utils/create-abort-controller.js +0 -11
- package/dist/utils/create-db.js +0 -188
- package/dist/utils/execute.js +0 -51
- package/dist/utils/facts.js +0 -87
- package/dist/utils/format-connection-string.js +0 -17
- package/dist/utils/get-current-os.js +0 -10
- package/dist/utils/log-message.js +0 -21
- package/dist/utils/logger.js +0 -8
- package/dist/utils/nextjs-utils.js +0 -55
- package/dist/utils/node-version.js +0 -15
- package/dist/utils/package-manager.js +0 -354
- package/dist/utils/postgres-client.js +0 -9
- package/dist/utils/prepare-project.js +0 -191
- package/dist/utils/process-manager.js +0 -50
- package/dist/utils/project-creator/creator.js +0 -46
- package/dist/utils/project-creator/index.js +0 -4
- package/dist/utils/project-creator/medusa-plugin-creator.js +0 -95
- package/dist/utils/project-creator/medusa-project-creator.js +0 -215
- package/dist/utils/project-creator/project-creator-factory.js +0 -83
- package/dist/utils/project-paths.js +0 -7
- package/dist/utils/start-medusa.js +0 -13
- package/dist/utils/update-package-versions.js +0 -29
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import path from "path";
|
|
2
|
-
export function getBackendDirectory(projectDirectory) {
|
|
3
|
-
return path.join(projectDirectory, "apps", "backend");
|
|
4
|
-
}
|
|
5
|
-
export function getStorefrontDirectory(projectDirectory) {
|
|
6
|
-
return path.join(projectDirectory, "apps", "storefront");
|
|
7
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { exec } from "child_process";
|
|
2
|
-
export default ({ directory, abortController, packageManager, }) => {
|
|
3
|
-
const command = packageManager.getCommandStr(`dev`);
|
|
4
|
-
const childProcess = exec(command, {
|
|
5
|
-
cwd: directory,
|
|
6
|
-
signal: abortController?.signal,
|
|
7
|
-
env: {
|
|
8
|
-
...process.env,
|
|
9
|
-
},
|
|
10
|
-
});
|
|
11
|
-
childProcess.stdout?.pipe(process.stdout);
|
|
12
|
-
childProcess.stderr?.pipe(process.stderr);
|
|
13
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { readFileSync, writeFileSync } from "fs";
|
|
2
|
-
export function updatePackageVersions(packageJsonOrPath, version, { applyChanges = false } = {}) {
|
|
3
|
-
const packageJson = typeof packageJsonOrPath === "string"
|
|
4
|
-
? JSON.parse(readFileSync(packageJsonOrPath, "utf-8"))
|
|
5
|
-
: packageJsonOrPath;
|
|
6
|
-
if (packageJson.dependencies) {
|
|
7
|
-
for (const dependency of Object.keys(packageJson.dependencies)) {
|
|
8
|
-
if (shouldUpdateVersion(dependency)) {
|
|
9
|
-
packageJson.dependencies[dependency] = version;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
if (packageJson.devDependencies) {
|
|
14
|
-
for (const dependency of Object.keys(packageJson.devDependencies)) {
|
|
15
|
-
if (shouldUpdateVersion(dependency)) {
|
|
16
|
-
packageJson.devDependencies[dependency] = version;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
if (applyChanges && typeof packageJsonOrPath === "string") {
|
|
21
|
-
writeFileSync(packageJsonOrPath, JSON.stringify(packageJson, null, 2));
|
|
22
|
-
}
|
|
23
|
-
return packageJson;
|
|
24
|
-
}
|
|
25
|
-
function shouldUpdateVersion(dependency) {
|
|
26
|
-
// UI package follows different versioning, so we can't update it following
|
|
27
|
-
// the same logic as other Medusa packages
|
|
28
|
-
return dependency.startsWith("@medusajs/") && dependency !== "@medusajs/ui";
|
|
29
|
-
}
|