@epic-web/workshop-utils 6.68.0 → 6.69.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/workshops.server.d.ts +0 -10
- package/dist/workshops.server.js +0 -20
- package/package.json +2 -1
|
@@ -3,12 +3,6 @@ export declare const PACKAGE_MANAGERS: readonly ["npm", "pnpm", "yarn", "bun"];
|
|
|
3
3
|
export type PackageManager = (typeof PACKAGE_MANAGERS)[number];
|
|
4
4
|
declare const ConfigSchema: z.ZodObject<{
|
|
5
5
|
reposDirectory: z.ZodOptional<z.ZodString>;
|
|
6
|
-
packageManager: z.ZodOptional<z.ZodEnum<{
|
|
7
|
-
npm: "npm";
|
|
8
|
-
pnpm: "pnpm";
|
|
9
|
-
yarn: "yarn";
|
|
10
|
-
bun: "bun";
|
|
11
|
-
}>>;
|
|
12
6
|
}, z.core.$strip>;
|
|
13
7
|
export type Workshop = {
|
|
14
8
|
name: string;
|
|
@@ -25,10 +19,6 @@ export declare function getReposDirectory(): Promise<string>;
|
|
|
25
19
|
export declare function isReposDirectoryConfigured(): Promise<boolean>;
|
|
26
20
|
export declare function getDefaultReposDir(): string;
|
|
27
21
|
export declare function setReposDirectory(directory: string): Promise<void>;
|
|
28
|
-
export declare function getPackageManager(): Promise<PackageManager>;
|
|
29
|
-
export declare function isPackageManagerConfigured(): Promise<boolean>;
|
|
30
|
-
export declare function setPackageManager(packageManager: PackageManager): Promise<void>;
|
|
31
|
-
export declare function clearPackageManager(): Promise<void>;
|
|
32
22
|
export type ReposDirectoryStatus = {
|
|
33
23
|
accessible: true;
|
|
34
24
|
} | {
|
package/dist/workshops.server.js
CHANGED
|
@@ -20,11 +20,9 @@ const EpicshopConfigSchema = z.object({
|
|
|
20
20
|
.optional(),
|
|
21
21
|
});
|
|
22
22
|
export const PACKAGE_MANAGERS = ['npm', 'pnpm', 'yarn', 'bun'];
|
|
23
|
-
const PackageManagerSchema = z.enum(PACKAGE_MANAGERS);
|
|
24
23
|
// Schema for workshop configuration (stored settings only)
|
|
25
24
|
const ConfigSchema = z.object({
|
|
26
25
|
reposDirectory: z.string().optional(),
|
|
27
|
-
packageManager: PackageManagerSchema.optional(),
|
|
28
26
|
});
|
|
29
27
|
function getDefaultReposDirectory() {
|
|
30
28
|
return path.join(os.homedir(), 'epic-workshops');
|
|
@@ -89,24 +87,6 @@ export async function setReposDirectory(directory) {
|
|
|
89
87
|
config.reposDirectory = path.resolve(directory);
|
|
90
88
|
await saveConfig(config);
|
|
91
89
|
}
|
|
92
|
-
export async function getPackageManager() {
|
|
93
|
-
const config = await loadConfig();
|
|
94
|
-
return config.packageManager ?? 'npm';
|
|
95
|
-
}
|
|
96
|
-
export async function isPackageManagerConfigured() {
|
|
97
|
-
const config = await loadConfig();
|
|
98
|
-
return Boolean(config.packageManager);
|
|
99
|
-
}
|
|
100
|
-
export async function setPackageManager(packageManager) {
|
|
101
|
-
const config = await loadConfig();
|
|
102
|
-
config.packageManager = packageManager;
|
|
103
|
-
await saveConfig(config);
|
|
104
|
-
}
|
|
105
|
-
export async function clearPackageManager() {
|
|
106
|
-
const config = await loadConfig();
|
|
107
|
-
delete config.packageManager;
|
|
108
|
-
await saveConfig(config);
|
|
109
|
-
}
|
|
110
90
|
/**
|
|
111
91
|
* Verify that the configured repos directory exists and is accessible.
|
|
112
92
|
* If the directory doesn't exist, attempts to create it.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epic-web/workshop-utils",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.69.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -221,6 +221,7 @@
|
|
|
221
221
|
"mdx-bundler": "^10.1.1",
|
|
222
222
|
"p-queue": "^9.1.0",
|
|
223
223
|
"parse-git-diff": "^0.0.19",
|
|
224
|
+
"pkgmgr": "^1.0.0",
|
|
224
225
|
"react": "^19.2.3",
|
|
225
226
|
"react-dom": "^19.2.3",
|
|
226
227
|
"react-router": "^7.12.0",
|