@powerhousedao/config 6.2.1-dev.6 → 6.2.2-dev.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/src/index.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from "./packages.js";
2
- export * from "./powerhouse.js";
package/src/node.ts DELETED
@@ -1,10 +0,0 @@
1
- import { type PowerhouseConfig } from "@powerhousedao/shared/clis";
2
- import { writeFileSync } from "node:fs";
3
- export { getConfig } from "@powerhousedao/shared/clis";
4
-
5
- export function writeConfig(
6
- config: PowerhouseConfig,
7
- path = "./powerhouse.config.json",
8
- ) {
9
- writeFileSync(path, JSON.stringify(config, null, 4));
10
- }
package/src/packages.ts DELETED
@@ -1,10 +0,0 @@
1
- import type { PowerhousePackage } from "./powerhouse.js";
2
-
3
- export const PH_PACKAGES: PowerhousePackage[] = [
4
- {
5
- packageName: "@sky-ph/atlas",
6
- version: "latest",
7
- provider: "npm",
8
- url: "https://www.npmjs.com/package/@sky-ph/atlas",
9
- },
10
- ];
package/src/powerhouse.ts DELETED
@@ -1,64 +0,0 @@
1
- export const LogLevels = {
2
- verbose: 1,
3
- debug: 2,
4
- info: 3,
5
- warn: 4,
6
- error: 5,
7
- silent: 6,
8
- } as const;
9
-
10
- export type LogLevel = keyof typeof LogLevels;
11
-
12
- export function isLogLevel(value: unknown): value is LogLevel {
13
- return typeof value === "string" && value in LogLevels;
14
- }
15
- import type { PowerhouseConfig } from "@powerhousedao/shared";
16
- export type {
17
- PHPackageProvider,
18
- PowerhousePackage,
19
- } from "@powerhousedao/shared";
20
- export type { PowerhouseConfig };
21
-
22
- export {
23
- DEFAULT_CONFIG,
24
- DEFAULT_REGISTRY_URL,
25
- } from "@powerhousedao/shared/clis";
26
-
27
- export type {
28
- DocumentModelModule,
29
- Manifest,
30
- PowerhouseModule,
31
- Publisher,
32
- } from "@powerhousedao/shared";
33
-
34
- export type VetraProcessorConfigType = {
35
- interactive?: boolean;
36
- driveUrl: string;
37
- driveId: string;
38
- };
39
-
40
- export function resolveRegistryConfig(
41
- config: PowerhouseConfig,
42
- env: Record<string, string | undefined> = {},
43
- ): {
44
- registryUrl: string | undefined;
45
- packageNames: string[];
46
- } {
47
- let registryUrl = config.packageRegistryUrl;
48
- let packageNames =
49
- config.packages
50
- ?.filter((p) => p.provider === "registry")
51
- .map((p) => p.packageName) ?? [];
52
-
53
- // Env vars override config
54
- if (env.PH_REGISTRY_URL) {
55
- registryUrl = env.PH_REGISTRY_URL;
56
- }
57
- if (env.PH_REGISTRY_PACKAGES) {
58
- packageNames = env.PH_REGISTRY_PACKAGES.split(",").map((p) => p.trim());
59
- }
60
-
61
- return { registryUrl, packageNames };
62
- }
63
-
64
- export const VETRA_PROCESSOR_CONFIG_KEY = "VetraConfig";
package/tsconfig.json DELETED
@@ -1,14 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.options.json",
3
- "compilerOptions": {
4
- "outDir": "./.tsbuild",
5
- "types": ["node"]
6
- },
7
- "include": ["**/*"],
8
- "exclude": ["dist", "node_modules"],
9
- "references": [
10
- {
11
- "path": "../shared"
12
- }
13
- ]
14
- }
package/tsdown.config.ts DELETED
@@ -1,13 +0,0 @@
1
- import { defineConfig } from "tsdown";
2
-
3
- export default defineConfig({
4
- entry: ["src/index.ts", "src/node.ts"],
5
- outDir: "dist",
6
- platform: "neutral",
7
- deps: {
8
- neverBundle: [/^node:/],
9
- },
10
- clean: true,
11
- dts: true,
12
- sourcemap: true,
13
- });