@geekmidas/cli 10.0.0-alpha.62 → 10.0.0-alpha.63
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 +2 -0
- package/dist/{HostingerProvider-B92qH4dC.mjs → HostingerProvider-DBBwpDjn.mjs} +2 -2
- package/dist/{HostingerProvider-B92qH4dC.mjs.map → HostingerProvider-DBBwpDjn.mjs.map} +1 -1
- package/dist/{HostingerProvider-DyD1Hin8.cjs → HostingerProvider-mJ7YruxH.cjs} +2 -2
- package/dist/{HostingerProvider-DyD1Hin8.cjs.map → HostingerProvider-mJ7YruxH.cjs.map} +1 -1
- package/dist/{LegacyStateStore-UHJEBLdn.cjs → LegacyStateStore-CP7SZwTP.cjs} +2 -2
- package/dist/{LegacyStateStore-UHJEBLdn.cjs.map → LegacyStateStore-CP7SZwTP.cjs.map} +1 -1
- package/dist/{LegacyStateStore-A8d2GdT7.mjs → LegacyStateStore-Q3GmKOdw.mjs} +2 -2
- package/dist/{LegacyStateStore-A8d2GdT7.mjs.map → LegacyStateStore-Q3GmKOdw.mjs.map} +1 -1
- package/dist/{LocalStateStore-B51rnfgn.mjs → LocalStateStore-BGIXcrvX.mjs} +2 -2
- package/dist/{LocalStateStore-B51rnfgn.mjs.map → LocalStateStore-BGIXcrvX.mjs.map} +1 -1
- package/dist/{LocalStateStore-COW3Ldwa.cjs → LocalStateStore-sS8mvLeq.cjs} +2 -2
- package/dist/{LocalStateStore-COW3Ldwa.cjs.map → LocalStateStore-sS8mvLeq.cjs.map} +1 -1
- package/dist/{OpenApiTsGenerator-BSrgw7B0.cjs → OpenApiTsGenerator-CjHWFRDd.cjs} +2 -2
- package/dist/{OpenApiTsGenerator-BSrgw7B0.cjs.map → OpenApiTsGenerator-CjHWFRDd.cjs.map} +1 -1
- package/dist/{OpenApiTsGenerator-q5B0z8Xg.mjs → OpenApiTsGenerator-CnAwhGxi.mjs} +2 -2
- package/dist/{OpenApiTsGenerator-q5B0z8Xg.mjs.map → OpenApiTsGenerator-CnAwhGxi.mjs.map} +1 -1
- package/dist/{S3StateStore-WUJGdRNL.cjs → S3StateStore-6jqITH2F.cjs} +2 -2
- package/dist/{S3StateStore-WUJGdRNL.cjs.map → S3StateStore-6jqITH2F.cjs.map} +1 -1
- package/dist/{S3StateStore-CJewPhgz.mjs → S3StateStore-D7l_lWJ3.mjs} +2 -2
- package/dist/{S3StateStore-CJewPhgz.mjs.map → S3StateStore-D7l_lWJ3.mjs.map} +1 -1
- package/dist/{SSMStateStore-Zejt42V8.cjs → SSMStateStore-B__F7IJa.cjs} +2 -2
- package/dist/{SSMStateStore-Zejt42V8.cjs.map → SSMStateStore-B__F7IJa.cjs.map} +1 -1
- package/dist/{SSMStateStore-iK5UKp9d.mjs → SSMStateStore-CAQDVpoc.mjs} +2 -2
- package/dist/{SSMStateStore-iK5UKp9d.mjs.map → SSMStateStore-CAQDVpoc.mjs.map} +1 -1
- package/dist/{bundler-CfH9frOS.cjs → bundler-DLfOn0ls.cjs} +3 -3
- package/dist/{bundler-CfH9frOS.cjs.map → bundler-DLfOn0ls.cjs.map} +1 -1
- package/dist/{bundler-DN5r4x5b.mjs → bundler-DyWI41Iy.mjs} +2 -2
- package/dist/{bundler-DN5r4x5b.mjs.map → bundler-DyWI41Iy.mjs.map} +1 -1
- package/dist/{cli-DOAUp80L.cjs → cli-D-ZM-X2s.cjs} +4 -4
- package/dist/{cli-DOAUp80L.cjs.map → cli-D-ZM-X2s.cjs.map} +1 -1
- package/dist/{cli-DYwxmfsW.mjs → cli-PkVF28LM.mjs} +4 -4
- package/dist/{cli-DYwxmfsW.mjs.map → cli-PkVF28LM.mjs.map} +1 -1
- package/dist/{config-BYh9S0cZ.cjs → config-BEJYKd4s.cjs} +132 -18
- package/dist/config-BEJYKd4s.cjs.map +1 -0
- package/dist/config-C2BUosLm.d.mts +256 -0
- package/dist/config-C2BUosLm.d.mts.map +1 -0
- package/dist/config-CemHVcIr.d.cts +256 -0
- package/dist/config-CemHVcIr.d.cts.map +1 -0
- package/dist/{config-Bf4-bROQ.mjs → config-LKKCVCnC.mjs} +109 -19
- package/dist/config-LKKCVCnC.mjs.map +1 -0
- package/dist/config.cjs +6 -2
- package/dist/config.d.cts +3 -210
- package/dist/config.d.mts +3 -210
- package/dist/config.mjs +3 -3
- package/dist/deploy/public.cjs +151 -5
- package/dist/deploy/public.cjs.map +1 -0
- package/dist/deploy/public.d.cts +186 -1
- package/dist/deploy/public.d.cts.map +1 -1
- package/dist/deploy/public.d.mts +186 -1
- package/dist/deploy/public.d.mts.map +1 -1
- package/dist/deploy/public.mjs +134 -6
- package/dist/deploy/public.mjs.map +1 -0
- package/dist/deploy/sniffer-envparser-worker.cjs +54 -0
- package/dist/deploy/sniffer-envparser-worker.cjs.map +1 -0
- package/dist/deploy/sniffer-envparser-worker.d.cts +1 -0
- package/dist/deploy/sniffer-envparser-worker.d.mts +1 -0
- package/dist/deploy/sniffer-envparser-worker.mjs +55 -0
- package/dist/deploy/sniffer-envparser-worker.mjs.map +1 -0
- package/dist/{deploy-DSaCYvcO.cjs → deploy-ABBI0lf1.cjs} +7 -7
- package/dist/{deploy-DSaCYvcO.cjs.map → deploy-ABBI0lf1.cjs.map} +1 -1
- package/dist/{deploy-D8Qr-Xto.cjs → deploy-BiMrP9i7.cjs} +11 -9
- package/dist/deploy-BiMrP9i7.cjs.map +1 -0
- package/dist/{deploy-B7jvUORo.mjs → deploy-CG8bfFij.mjs} +7 -7
- package/dist/{deploy-B7jvUORo.mjs.map → deploy-CG8bfFij.mjs.map} +1 -1
- package/dist/{deploy-Cg9fae7a.mjs → deploy-CGW-QY9D.mjs} +11 -9
- package/dist/deploy-CGW-QY9D.mjs.map +1 -0
- package/dist/discover-B6yPpvRV.d.mts +99 -0
- package/dist/discover-B6yPpvRV.d.mts.map +1 -0
- package/dist/discover-B_IkPukx.d.cts +99 -0
- package/dist/discover-B_IkPukx.d.cts.map +1 -0
- package/dist/discover-BaT6bpnA.mjs +614 -0
- package/dist/discover-BaT6bpnA.mjs.map +1 -0
- package/dist/discover-C_6COHEv.cjs +729 -0
- package/dist/discover-C_6COHEv.cjs.map +1 -0
- package/dist/{dokploy-CD9PY-3D.mjs → dokploy-CwdmlyQL.mjs} +2 -2
- package/dist/{dokploy-CD9PY-3D.mjs.map → dokploy-CwdmlyQL.mjs.map} +1 -1
- package/dist/{dokploy-Ey2foJLv.cjs → dokploy-QJxMhxdf.cjs} +2 -2
- package/dist/{dokploy-Ey2foJLv.cjs.map → dokploy-QJxMhxdf.cjs.map} +1 -1
- package/dist/{encryption-CVwvGbsL.mjs → encryption-CbQG_ayW.mjs} +4 -4
- package/dist/{encryption-CVwvGbsL.mjs.map → encryption-CbQG_ayW.mjs.map} +1 -1
- package/dist/{encryption-ChBk3hTj.cjs → encryption-DXw3jj0c.cjs} +4 -4
- package/dist/{encryption-ChBk3hTj.cjs.map → encryption-DXw3jj0c.cjs.map} +1 -1
- package/dist/fakes-C9RiT6XG.mjs.map +1 -1
- package/dist/fakes-zW-jNAbQ.cjs.map +1 -1
- package/dist/{github-OUgPDlqg.cjs → github-BH_mETav.cjs} +3 -3
- package/dist/{github-OUgPDlqg.cjs.map → github-BH_mETav.cjs.map} +1 -1
- package/dist/{github-BCB3_LBX.mjs → github-ciwbIwVa.mjs} +3 -3
- package/dist/{github-BCB3_LBX.mjs.map → github-ciwbIwVa.mjs.map} +1 -1
- package/dist/index.cjs +55 -48
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +52 -45
- package/dist/index.mjs.map +1 -1
- package/dist/{migrate-dnaFMvOm.cjs → migrate-6oa9y_f2.cjs} +5 -5
- package/dist/{migrate-dnaFMvOm.cjs.map → migrate-6oa9y_f2.cjs.map} +1 -1
- package/dist/{migrate-BoHMqdCu.mjs → migrate-ImBKTBcW.mjs} +5 -5
- package/dist/{migrate-BoHMqdCu.mjs.map → migrate-ImBKTBcW.mjs.map} +1 -1
- package/dist/openapi.cjs +3 -3
- package/dist/openapi.mjs +3 -3
- package/dist/{ready-XlNx-Gbo.cjs → ready-BiG0rt4h.cjs} +3 -3
- package/dist/{ready-XlNx-Gbo.cjs.map → ready-BiG0rt4h.cjs.map} +1 -1
- package/dist/{ready-DQIy21W5.mjs → ready-Bpdnn2ON.mjs} +3 -3
- package/dist/{ready-DQIy21W5.mjs.map → ready-Bpdnn2ON.mjs.map} +1 -1
- package/dist/reconcile/public.cjs +1 -1
- package/dist/reconcile/public.d.cts +3 -76
- package/dist/reconcile/public.d.cts.map +1 -1
- package/dist/reconcile/public.d.mts +3 -76
- package/dist/reconcile/public.d.mts.map +1 -1
- package/dist/reconcile/public.mjs +1 -1
- package/dist/{resolve-CFCIkm7m.mjs → resolve-B1T0hUaR.mjs} +2 -2
- package/dist/{resolve-CFCIkm7m.mjs.map → resolve-B1T0hUaR.mjs.map} +1 -1
- package/dist/{resolve-wbv66HjD.cjs → resolve-xytBTtG4.cjs} +2 -2
- package/dist/{resolve-wbv66HjD.cjs.map → resolve-xytBTtG4.cjs.map} +1 -1
- package/dist/sandbox/config-worker.cjs +43 -0
- package/dist/sandbox/config-worker.cjs.map +1 -0
- package/dist/sandbox/config-worker.d.cts +1 -0
- package/dist/sandbox/config-worker.d.mts +1 -0
- package/dist/sandbox/config-worker.mjs +44 -0
- package/dist/sandbox/config-worker.mjs.map +1 -0
- package/dist/sandbox/discover-worker.cjs +44 -0
- package/dist/sandbox/discover-worker.cjs.map +1 -0
- package/dist/sandbox/discover-worker.d.cts +1 -0
- package/dist/sandbox/discover-worker.d.mts +1 -0
- package/dist/sandbox/discover-worker.mjs +45 -0
- package/dist/sandbox/discover-worker.mjs.map +1 -0
- package/dist/sandbox-M8UnLhXE.d.cts +126 -0
- package/dist/sandbox-M8UnLhXE.d.cts.map +1 -0
- package/dist/sandbox-M8UnLhXE.d.mts +126 -0
- package/dist/sandbox-M8UnLhXE.d.mts.map +1 -0
- package/dist/{workspace-BFe57es7.mjs → schemas-Ckm_aBnF.cjs} +71 -982
- package/dist/schemas-Ckm_aBnF.cjs.map +1 -0
- package/dist/{workspace-B6zQO6RY.cjs → schemas-D2LCF689.mjs} +2 -1168
- package/dist/schemas-D2LCF689.mjs.map +1 -0
- package/dist/{sniffer-BsfPa-GA.cjs → sniffer-D_SYc_pO.cjs} +369 -207
- package/dist/sniffer-D_SYc_pO.cjs.map +1 -0
- package/dist/{sniffer-DHE2Nafd.mjs → sniffer-aO_-s5vq.mjs} +336 -204
- package/dist/sniffer-aO_-s5vq.mjs.map +1 -0
- package/dist/target/public.cjs +1 -1
- package/dist/target/public.mjs +1 -1
- package/dist/{terminal-6oL0vANs.cjs → terminal-D0f1u0LG.cjs} +6 -6
- package/dist/{terminal-6oL0vANs.cjs.map → terminal-D0f1u0LG.cjs.map} +1 -1
- package/dist/{terminal-ByZNjuig.mjs → terminal-gMxAo9Dj.mjs} +6 -6
- package/dist/{terminal-ByZNjuig.mjs.map → terminal-gMxAo9Dj.mjs.map} +1 -1
- package/dist/vitest.cjs +2 -2
- package/dist/vitest.mjs +2 -2
- package/dist/workerRuntime-BXfhbe13.cjs +108 -0
- package/dist/workerRuntime-BXfhbe13.cjs.map +1 -0
- package/dist/workerRuntime-CsOyBRx2.mjs +79 -0
- package/dist/workerRuntime-CsOyBRx2.mjs.map +1 -0
- package/dist/workspace/index.cjs +1 -1
- package/dist/workspace/index.mjs +1 -1
- package/dist/workspace-Dh7rr7l4.mjs +1024 -0
- package/dist/workspace-Dh7rr7l4.mjs.map +1 -0
- package/dist/workspace-Kl4NG9IH.cjs +1196 -0
- package/dist/workspace-Kl4NG9IH.cjs.map +1 -0
- package/package.json +13 -13
- package/dist/config-BYh9S0cZ.cjs.map +0 -1
- package/dist/config-Bf4-bROQ.mjs.map +0 -1
- package/dist/config.d.cts.map +0 -1
- package/dist/config.d.mts.map +0 -1
- package/dist/deploy-Cg9fae7a.mjs.map +0 -1
- package/dist/deploy-D8Qr-Xto.cjs.map +0 -1
- package/dist/discover-Bc-4eA_p.cjs +0 -299
- package/dist/discover-Bc-4eA_p.cjs.map +0 -1
- package/dist/discover-FrYvzkeC.mjs +0 -262
- package/dist/discover-FrYvzkeC.mjs.map +0 -1
- package/dist/sniffer-BsfPa-GA.cjs.map +0 -1
- package/dist/sniffer-DHE2Nafd.mjs.map +0 -1
- package/dist/workspace-B6zQO6RY.cjs.map +0 -1
- package/dist/workspace-BFe57es7.mjs.map +0 -1
package/dist/config.d.cts
CHANGED
|
@@ -1,211 +1,4 @@
|
|
|
1
|
-
import { C as WorkspaceConfig, _ as LoadedConfig,
|
|
1
|
+
import { C as WorkspaceConfig, _ as LoadedConfig, p as DevConfig, r as GkmConfig } from "./types-DIA7Li-J.cjs";
|
|
2
2
|
import { i as defineWorkspace } from "./index-BtXDZQuF.cjs";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
/** Where an app is in its life. `stopped` is a server that exited on its own. */
|
|
6
|
-
type AppStatus = 'starting' | 'ready' | 'reloading' | 'stopped';
|
|
7
|
-
/** A JSON API an app serves about itself. */
|
|
8
|
-
type DataApiKind = 'telescope' | 'database' | 'openapi';
|
|
9
|
-
interface DiscoveredDataApi {
|
|
10
|
-
kind: DataApiKind;
|
|
11
|
-
/** Where the app serves it. */
|
|
12
|
-
path: string;
|
|
13
|
-
/** The app's own address for it — `http://localhost:<port><path>`. */
|
|
14
|
-
url: string;
|
|
15
|
-
/** The same API through this endpoint, relative to its origin. */
|
|
16
|
-
proxy: string;
|
|
17
|
-
}
|
|
18
|
-
interface DiscoveredApp {
|
|
19
|
-
name: string;
|
|
20
|
-
type: 'backend' | 'web' | 'mobile';
|
|
21
|
-
port: number;
|
|
22
|
-
/** `http://localhost:<port>`. */
|
|
23
|
-
url: string;
|
|
24
|
-
publicUrl: string | null;
|
|
25
|
-
status: AppStatus;
|
|
26
|
-
reloads: number;
|
|
27
|
-
/** The `gkm dev` running it, when it runs in one of its own. */
|
|
28
|
-
pid: number | null;
|
|
29
|
-
dataApis: DiscoveredDataApi[];
|
|
30
|
-
}
|
|
31
|
-
interface DiscoveredWorkspace {
|
|
32
|
-
/** Stable for a workspace's root: its name, and a hash of where it is. */
|
|
33
|
-
id: string;
|
|
34
|
-
name: string;
|
|
35
|
-
root: string;
|
|
36
|
-
stage: string;
|
|
37
|
-
manifest: ConstructManifest | null;
|
|
38
|
-
apps: DiscoveredApp[];
|
|
39
|
-
}
|
|
40
|
-
/** The body of `GET /__gkm`. */
|
|
41
|
-
interface DiscoveryResponse {
|
|
42
|
-
version: 1;
|
|
43
|
-
/** The `gkm dev` serving this endpoint, which may change while you watch. */
|
|
44
|
-
host: {
|
|
45
|
-
pid: number;
|
|
46
|
-
port: number;
|
|
47
|
-
};
|
|
48
|
-
/** Where the changes stream, as server-sent events. */
|
|
49
|
-
events: string;
|
|
50
|
-
workspaces: DiscoveredWorkspace[];
|
|
51
|
-
}
|
|
52
|
-
/** One message on `GET /__gkm/events`; its SSE `event:` is its `type`. */
|
|
53
|
-
type DiscoveryEvent = {
|
|
54
|
-
type: 'snapshot';
|
|
55
|
-
snapshot: DiscoveryResponse;
|
|
56
|
-
} | {
|
|
57
|
-
type: 'workspace.started' | 'workspace.stopped';
|
|
58
|
-
workspace: string;
|
|
59
|
-
} | {
|
|
60
|
-
type: 'app.started' | 'app.stopped' | 'app.reloaded' | 'app.status';
|
|
61
|
-
workspace: string;
|
|
62
|
-
app: DiscoveredApp;
|
|
63
|
-
};
|
|
64
|
-
//#endregion
|
|
65
|
-
//#region src/config.d.ts
|
|
66
|
-
/**
|
|
67
|
-
* Define GKM configuration with full TypeScript support.
|
|
68
|
-
* This is an identity function that provides type safety and autocomplete.
|
|
69
|
-
*
|
|
70
|
-
* @example
|
|
71
|
-
* ```ts
|
|
72
|
-
* // gkm.config.ts
|
|
73
|
-
* import { defineConfig } from '@geekmidas/cli/config';
|
|
74
|
-
*
|
|
75
|
-
* export default defineConfig({
|
|
76
|
-
* routes: './src/endpoints/**\/*.ts',
|
|
77
|
-
* envParser: './src/config/env',
|
|
78
|
-
* logger: './src/config/logger',
|
|
79
|
-
* telescope: true,
|
|
80
|
-
* });
|
|
81
|
-
* ```
|
|
82
|
-
*/
|
|
83
|
-
export declare function defineConfig(config: GkmConfig): GkmConfig;
|
|
84
|
-
export interface ParsedModuleConfig {
|
|
85
|
-
path: string;
|
|
86
|
-
importPattern: string;
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Parse a module config string into path and import pattern.
|
|
90
|
-
*
|
|
91
|
-
* @param configString - Config string in format "./path/to/module" or "./path/to/module#exportName"
|
|
92
|
-
* @param defaultAlias - The default alias name to use if no export name specified
|
|
93
|
-
* @returns Object with path and import pattern
|
|
94
|
-
*
|
|
95
|
-
* @example
|
|
96
|
-
* parseModuleConfig('./src/config/env', 'envParser')
|
|
97
|
-
* // { path: './src/config/env', importPattern: 'envParser' }
|
|
98
|
-
*
|
|
99
|
-
* parseModuleConfig('./src/config/env#envParser', 'envParser')
|
|
100
|
-
* // { path: './src/config/env', importPattern: '{ envParser }' }
|
|
101
|
-
*
|
|
102
|
-
* parseModuleConfig('./src/config/env#myEnv', 'envParser')
|
|
103
|
-
* // { path: './src/config/env', importPattern: '{ myEnv as envParser }' }
|
|
104
|
-
*/
|
|
105
|
-
export declare function parseModuleConfig(configString: string, defaultAlias: string): ParsedModuleConfig;
|
|
106
|
-
export interface ConfigDiscoveryResult {
|
|
107
|
-
configPath: string;
|
|
108
|
-
workspaceRoot: string;
|
|
109
|
-
}
|
|
110
|
-
/** No gkm config in a directory or any of its parents. */
|
|
111
|
-
export declare class ConfigNotFound extends Error {
|
|
112
|
-
readonly cwd: string;
|
|
113
|
-
constructor(cwd: string);
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Load configuration file (single-app format).
|
|
117
|
-
* For backwards compatibility with existing code.
|
|
118
|
-
*
|
|
119
|
-
* @deprecated Use loadWorkspaceConfig for new code
|
|
120
|
-
*/
|
|
121
|
-
export declare function loadConfig(cwd?: string): Promise<GkmConfig>;
|
|
122
|
-
/**
|
|
123
|
-
* Load configuration file and process it as a workspace.
|
|
124
|
-
* Works with both single-app and workspace configurations.
|
|
125
|
-
*
|
|
126
|
-
* Single-app configs are automatically wrapped as a workspace with one app.
|
|
127
|
-
*
|
|
128
|
-
* @example
|
|
129
|
-
* ```ts
|
|
130
|
-
* const { type, workspace } = await loadWorkspaceConfig();
|
|
131
|
-
*
|
|
132
|
-
* if (type === 'workspace') {
|
|
133
|
-
* console.log('Multi-app workspace:', workspace.apps);
|
|
134
|
-
* } else {
|
|
135
|
-
* console.log('Single app wrapped as workspace');
|
|
136
|
-
* }
|
|
137
|
-
* ```
|
|
138
|
-
*/
|
|
139
|
-
/**
|
|
140
|
-
* The workspace a directory belongs to, as its config states it — without
|
|
141
|
-
* discovering its constructs.
|
|
142
|
-
*
|
|
143
|
-
* For callers that need a fact the config holds (where a stage's secrets are
|
|
144
|
-
* stored) and nothing the graph adds. `loadWorkspaceConfig` imports every
|
|
145
|
-
* construct module to derive the apps, which is a cost a secrets read should
|
|
146
|
-
* not pay.
|
|
147
|
-
*/
|
|
148
|
-
export declare function loadWorkspaceSettings(cwd?: string): Promise<LoadedConfig['workspace']>;
|
|
149
|
-
export declare function loadWorkspaceConfig(cwd?: string): Promise<LoadedConfig>;
|
|
150
|
-
/**
|
|
151
|
-
* A workspace with no `constructs` glob.
|
|
152
|
-
*
|
|
153
|
-
* In v10 every address, container and app comes from what the workspace
|
|
154
|
-
* declares — there is no second path that reads a hand-written compose file or
|
|
155
|
-
* an `apps` block's ports. A config that declares nothing has nothing to run.
|
|
156
|
-
*/
|
|
157
|
-
export declare class WorkspaceDeclaresNoConstructs extends Error {
|
|
158
|
-
readonly root: string;
|
|
159
|
-
constructor(root: string);
|
|
160
|
-
}
|
|
161
|
-
export interface AppConfigResult {
|
|
162
|
-
appName: string;
|
|
163
|
-
app: NormalizedAppConfig;
|
|
164
|
-
gkmConfig: GkmConfig;
|
|
165
|
-
workspace: NormalizedWorkspace;
|
|
166
|
-
workspaceRoot: string;
|
|
167
|
-
appRoot: string;
|
|
168
|
-
}
|
|
169
|
-
/** A directory that no app in the workspace lives in. */
|
|
170
|
-
export declare class NotInAnApp extends Error {
|
|
171
|
-
readonly cwd: string;
|
|
172
|
-
readonly apps: Readonly<Record<string, string>>;
|
|
173
|
-
constructor(cwd: string, apps: Readonly<Record<string, string>>);
|
|
174
|
-
}
|
|
175
|
-
/**
|
|
176
|
-
* The backend app a directory is part of, with its gkm config — found by the
|
|
177
|
-
* `path` its construct declares.
|
|
178
|
-
*
|
|
179
|
-
* @example
|
|
180
|
-
* ```ts
|
|
181
|
-
* // From apps/api, where a construct declares `path: 'apps/api'`
|
|
182
|
-
* const { app, workspace, workspaceRoot } = await loadAppConfig();
|
|
183
|
-
* ```
|
|
184
|
-
*
|
|
185
|
-
* @throws {NotInAnApp} when no app's path contains the directory.
|
|
186
|
-
* @throws {NotABackendApp} when the app it is in has no gkm config to run.
|
|
187
|
-
*/
|
|
188
|
-
export declare function loadAppConfig(cwd?: string): Promise<AppConfigResult>;
|
|
189
|
-
/** The app a directory is in has no gkm config — a site, or an entry app. */
|
|
190
|
-
export declare class NotABackendApp extends Error {
|
|
191
|
-
readonly appName: string;
|
|
192
|
-
constructor(appName: string);
|
|
193
|
-
}
|
|
194
|
-
export interface WorkspaceAppInfo {
|
|
195
|
-
/** The app's key in the workspace. */
|
|
196
|
-
appName: string;
|
|
197
|
-
app: NormalizedAppConfig;
|
|
198
|
-
workspace: NormalizedWorkspace;
|
|
199
|
-
workspaceRoot: string;
|
|
200
|
-
}
|
|
201
|
-
/**
|
|
202
|
-
* The app a directory is part of, frontend or backend — found by the `path`
|
|
203
|
-
* its construct declares. Unlike `loadAppConfig`, the app need not have a
|
|
204
|
-
* gkm config, which is what `gkm exec` and `gkm test` from a site need.
|
|
205
|
-
*
|
|
206
|
-
* @throws {NotInAnApp} when no app's path contains the directory.
|
|
207
|
-
*/
|
|
208
|
-
export declare function loadWorkspaceAppInfo(cwd?: string): Promise<WorkspaceAppInfo>;
|
|
209
|
-
//#endregion
|
|
210
|
-
export { type AppStatus, type DataApiKind, type DevConfig, type DiscoveredApp, type DiscoveredDataApi, type DiscoveredWorkspace, type DiscoveryEvent, type DiscoveryResponse, type GkmConfig, type LoadedConfig, type WorkspaceConfig, defineWorkspace };
|
|
211
|
-
//# sourceMappingURL=config.d.cts.map
|
|
3
|
+
import { C as DiscoveredApp, D as DiscoveryResponse, E as DiscoveryEvent, S as DataApiKind, T as DiscoveredWorkspace, _ as loadWorkspaceAppInfo, a as ConfigNotFound, b as parseModuleConfig, c as NotABackendApp, d as WorkspaceAppInfo, f as WorkspaceDeclaresNoConstructs, g as loadConfig, h as loadAppConfig, i as ConfigLoadFailed, l as NotInAnApp, m as findWorkspaceRoot, n as CONFIG_LOAD_TIMEOUT_MS, o as ConfigObjectNotSerializable, p as defineConfig, r as ConfigDiscoveryResult, s as LoadConfigOptions, t as AppConfigResult, u as ParsedModuleConfig, v as loadWorkspaceConfig, w as DiscoveredDataApi, x as AppStatus, y as loadWorkspaceSettings } from "./config-CemHVcIr.cjs";
|
|
4
|
+
export { AppConfigResult, type AppStatus, CONFIG_LOAD_TIMEOUT_MS, ConfigDiscoveryResult, ConfigLoadFailed, ConfigNotFound, ConfigObjectNotSerializable, type DataApiKind, type DevConfig, type DiscoveredApp, type DiscoveredDataApi, type DiscoveredWorkspace, type DiscoveryEvent, type DiscoveryResponse, type GkmConfig, LoadConfigOptions, type LoadedConfig, NotABackendApp, NotInAnApp, ParsedModuleConfig, WorkspaceAppInfo, type WorkspaceConfig, WorkspaceDeclaresNoConstructs, defineConfig, defineWorkspace, findWorkspaceRoot, loadAppConfig, loadConfig, loadWorkspaceAppInfo, loadWorkspaceConfig, loadWorkspaceSettings, parseModuleConfig };
|
package/dist/config.d.mts
CHANGED
|
@@ -1,211 +1,4 @@
|
|
|
1
|
-
import { C as WorkspaceConfig, _ as LoadedConfig,
|
|
1
|
+
import { C as WorkspaceConfig, _ as LoadedConfig, p as DevConfig, r as GkmConfig } from "./types-CfLKGfC_.mjs";
|
|
2
2
|
import { i as defineWorkspace } from "./index-DrKzpHl-.mjs";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
/** Where an app is in its life. `stopped` is a server that exited on its own. */
|
|
6
|
-
type AppStatus = 'starting' | 'ready' | 'reloading' | 'stopped';
|
|
7
|
-
/** A JSON API an app serves about itself. */
|
|
8
|
-
type DataApiKind = 'telescope' | 'database' | 'openapi';
|
|
9
|
-
interface DiscoveredDataApi {
|
|
10
|
-
kind: DataApiKind;
|
|
11
|
-
/** Where the app serves it. */
|
|
12
|
-
path: string;
|
|
13
|
-
/** The app's own address for it — `http://localhost:<port><path>`. */
|
|
14
|
-
url: string;
|
|
15
|
-
/** The same API through this endpoint, relative to its origin. */
|
|
16
|
-
proxy: string;
|
|
17
|
-
}
|
|
18
|
-
interface DiscoveredApp {
|
|
19
|
-
name: string;
|
|
20
|
-
type: 'backend' | 'web' | 'mobile';
|
|
21
|
-
port: number;
|
|
22
|
-
/** `http://localhost:<port>`. */
|
|
23
|
-
url: string;
|
|
24
|
-
publicUrl: string | null;
|
|
25
|
-
status: AppStatus;
|
|
26
|
-
reloads: number;
|
|
27
|
-
/** The `gkm dev` running it, when it runs in one of its own. */
|
|
28
|
-
pid: number | null;
|
|
29
|
-
dataApis: DiscoveredDataApi[];
|
|
30
|
-
}
|
|
31
|
-
interface DiscoveredWorkspace {
|
|
32
|
-
/** Stable for a workspace's root: its name, and a hash of where it is. */
|
|
33
|
-
id: string;
|
|
34
|
-
name: string;
|
|
35
|
-
root: string;
|
|
36
|
-
stage: string;
|
|
37
|
-
manifest: ConstructManifest | null;
|
|
38
|
-
apps: DiscoveredApp[];
|
|
39
|
-
}
|
|
40
|
-
/** The body of `GET /__gkm`. */
|
|
41
|
-
interface DiscoveryResponse {
|
|
42
|
-
version: 1;
|
|
43
|
-
/** The `gkm dev` serving this endpoint, which may change while you watch. */
|
|
44
|
-
host: {
|
|
45
|
-
pid: number;
|
|
46
|
-
port: number;
|
|
47
|
-
};
|
|
48
|
-
/** Where the changes stream, as server-sent events. */
|
|
49
|
-
events: string;
|
|
50
|
-
workspaces: DiscoveredWorkspace[];
|
|
51
|
-
}
|
|
52
|
-
/** One message on `GET /__gkm/events`; its SSE `event:` is its `type`. */
|
|
53
|
-
type DiscoveryEvent = {
|
|
54
|
-
type: 'snapshot';
|
|
55
|
-
snapshot: DiscoveryResponse;
|
|
56
|
-
} | {
|
|
57
|
-
type: 'workspace.started' | 'workspace.stopped';
|
|
58
|
-
workspace: string;
|
|
59
|
-
} | {
|
|
60
|
-
type: 'app.started' | 'app.stopped' | 'app.reloaded' | 'app.status';
|
|
61
|
-
workspace: string;
|
|
62
|
-
app: DiscoveredApp;
|
|
63
|
-
};
|
|
64
|
-
//#endregion
|
|
65
|
-
//#region src/config.d.ts
|
|
66
|
-
/**
|
|
67
|
-
* Define GKM configuration with full TypeScript support.
|
|
68
|
-
* This is an identity function that provides type safety and autocomplete.
|
|
69
|
-
*
|
|
70
|
-
* @example
|
|
71
|
-
* ```ts
|
|
72
|
-
* // gkm.config.ts
|
|
73
|
-
* import { defineConfig } from '@geekmidas/cli/config';
|
|
74
|
-
*
|
|
75
|
-
* export default defineConfig({
|
|
76
|
-
* routes: './src/endpoints/**\/*.ts',
|
|
77
|
-
* envParser: './src/config/env',
|
|
78
|
-
* logger: './src/config/logger',
|
|
79
|
-
* telescope: true,
|
|
80
|
-
* });
|
|
81
|
-
* ```
|
|
82
|
-
*/
|
|
83
|
-
export declare function defineConfig(config: GkmConfig): GkmConfig;
|
|
84
|
-
export interface ParsedModuleConfig {
|
|
85
|
-
path: string;
|
|
86
|
-
importPattern: string;
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Parse a module config string into path and import pattern.
|
|
90
|
-
*
|
|
91
|
-
* @param configString - Config string in format "./path/to/module" or "./path/to/module#exportName"
|
|
92
|
-
* @param defaultAlias - The default alias name to use if no export name specified
|
|
93
|
-
* @returns Object with path and import pattern
|
|
94
|
-
*
|
|
95
|
-
* @example
|
|
96
|
-
* parseModuleConfig('./src/config/env', 'envParser')
|
|
97
|
-
* // { path: './src/config/env', importPattern: 'envParser' }
|
|
98
|
-
*
|
|
99
|
-
* parseModuleConfig('./src/config/env#envParser', 'envParser')
|
|
100
|
-
* // { path: './src/config/env', importPattern: '{ envParser }' }
|
|
101
|
-
*
|
|
102
|
-
* parseModuleConfig('./src/config/env#myEnv', 'envParser')
|
|
103
|
-
* // { path: './src/config/env', importPattern: '{ myEnv as envParser }' }
|
|
104
|
-
*/
|
|
105
|
-
export declare function parseModuleConfig(configString: string, defaultAlias: string): ParsedModuleConfig;
|
|
106
|
-
export interface ConfigDiscoveryResult {
|
|
107
|
-
configPath: string;
|
|
108
|
-
workspaceRoot: string;
|
|
109
|
-
}
|
|
110
|
-
/** No gkm config in a directory or any of its parents. */
|
|
111
|
-
export declare class ConfigNotFound extends Error {
|
|
112
|
-
readonly cwd: string;
|
|
113
|
-
constructor(cwd: string);
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Load configuration file (single-app format).
|
|
117
|
-
* For backwards compatibility with existing code.
|
|
118
|
-
*
|
|
119
|
-
* @deprecated Use loadWorkspaceConfig for new code
|
|
120
|
-
*/
|
|
121
|
-
export declare function loadConfig(cwd?: string): Promise<GkmConfig>;
|
|
122
|
-
/**
|
|
123
|
-
* Load configuration file and process it as a workspace.
|
|
124
|
-
* Works with both single-app and workspace configurations.
|
|
125
|
-
*
|
|
126
|
-
* Single-app configs are automatically wrapped as a workspace with one app.
|
|
127
|
-
*
|
|
128
|
-
* @example
|
|
129
|
-
* ```ts
|
|
130
|
-
* const { type, workspace } = await loadWorkspaceConfig();
|
|
131
|
-
*
|
|
132
|
-
* if (type === 'workspace') {
|
|
133
|
-
* console.log('Multi-app workspace:', workspace.apps);
|
|
134
|
-
* } else {
|
|
135
|
-
* console.log('Single app wrapped as workspace');
|
|
136
|
-
* }
|
|
137
|
-
* ```
|
|
138
|
-
*/
|
|
139
|
-
/**
|
|
140
|
-
* The workspace a directory belongs to, as its config states it — without
|
|
141
|
-
* discovering its constructs.
|
|
142
|
-
*
|
|
143
|
-
* For callers that need a fact the config holds (where a stage's secrets are
|
|
144
|
-
* stored) and nothing the graph adds. `loadWorkspaceConfig` imports every
|
|
145
|
-
* construct module to derive the apps, which is a cost a secrets read should
|
|
146
|
-
* not pay.
|
|
147
|
-
*/
|
|
148
|
-
export declare function loadWorkspaceSettings(cwd?: string): Promise<LoadedConfig['workspace']>;
|
|
149
|
-
export declare function loadWorkspaceConfig(cwd?: string): Promise<LoadedConfig>;
|
|
150
|
-
/**
|
|
151
|
-
* A workspace with no `constructs` glob.
|
|
152
|
-
*
|
|
153
|
-
* In v10 every address, container and app comes from what the workspace
|
|
154
|
-
* declares — there is no second path that reads a hand-written compose file or
|
|
155
|
-
* an `apps` block's ports. A config that declares nothing has nothing to run.
|
|
156
|
-
*/
|
|
157
|
-
export declare class WorkspaceDeclaresNoConstructs extends Error {
|
|
158
|
-
readonly root: string;
|
|
159
|
-
constructor(root: string);
|
|
160
|
-
}
|
|
161
|
-
export interface AppConfigResult {
|
|
162
|
-
appName: string;
|
|
163
|
-
app: NormalizedAppConfig;
|
|
164
|
-
gkmConfig: GkmConfig;
|
|
165
|
-
workspace: NormalizedWorkspace;
|
|
166
|
-
workspaceRoot: string;
|
|
167
|
-
appRoot: string;
|
|
168
|
-
}
|
|
169
|
-
/** A directory that no app in the workspace lives in. */
|
|
170
|
-
export declare class NotInAnApp extends Error {
|
|
171
|
-
readonly cwd: string;
|
|
172
|
-
readonly apps: Readonly<Record<string, string>>;
|
|
173
|
-
constructor(cwd: string, apps: Readonly<Record<string, string>>);
|
|
174
|
-
}
|
|
175
|
-
/**
|
|
176
|
-
* The backend app a directory is part of, with its gkm config — found by the
|
|
177
|
-
* `path` its construct declares.
|
|
178
|
-
*
|
|
179
|
-
* @example
|
|
180
|
-
* ```ts
|
|
181
|
-
* // From apps/api, where a construct declares `path: 'apps/api'`
|
|
182
|
-
* const { app, workspace, workspaceRoot } = await loadAppConfig();
|
|
183
|
-
* ```
|
|
184
|
-
*
|
|
185
|
-
* @throws {NotInAnApp} when no app's path contains the directory.
|
|
186
|
-
* @throws {NotABackendApp} when the app it is in has no gkm config to run.
|
|
187
|
-
*/
|
|
188
|
-
export declare function loadAppConfig(cwd?: string): Promise<AppConfigResult>;
|
|
189
|
-
/** The app a directory is in has no gkm config — a site, or an entry app. */
|
|
190
|
-
export declare class NotABackendApp extends Error {
|
|
191
|
-
readonly appName: string;
|
|
192
|
-
constructor(appName: string);
|
|
193
|
-
}
|
|
194
|
-
export interface WorkspaceAppInfo {
|
|
195
|
-
/** The app's key in the workspace. */
|
|
196
|
-
appName: string;
|
|
197
|
-
app: NormalizedAppConfig;
|
|
198
|
-
workspace: NormalizedWorkspace;
|
|
199
|
-
workspaceRoot: string;
|
|
200
|
-
}
|
|
201
|
-
/**
|
|
202
|
-
* The app a directory is part of, frontend or backend — found by the `path`
|
|
203
|
-
* its construct declares. Unlike `loadAppConfig`, the app need not have a
|
|
204
|
-
* gkm config, which is what `gkm exec` and `gkm test` from a site need.
|
|
205
|
-
*
|
|
206
|
-
* @throws {NotInAnApp} when no app's path contains the directory.
|
|
207
|
-
*/
|
|
208
|
-
export declare function loadWorkspaceAppInfo(cwd?: string): Promise<WorkspaceAppInfo>;
|
|
209
|
-
//#endregion
|
|
210
|
-
export { type AppStatus, type DataApiKind, type DevConfig, type DiscoveredApp, type DiscoveredDataApi, type DiscoveredWorkspace, type DiscoveryEvent, type DiscoveryResponse, type GkmConfig, type LoadedConfig, type WorkspaceConfig, defineWorkspace };
|
|
211
|
-
//# sourceMappingURL=config.d.mts.map
|
|
3
|
+
import { C as DiscoveredApp, D as DiscoveryResponse, E as DiscoveryEvent, S as DataApiKind, T as DiscoveredWorkspace, _ as loadWorkspaceAppInfo, a as ConfigNotFound, b as parseModuleConfig, c as NotABackendApp, d as WorkspaceAppInfo, f as WorkspaceDeclaresNoConstructs, g as loadConfig, h as loadAppConfig, i as ConfigLoadFailed, l as NotInAnApp, m as findWorkspaceRoot, n as CONFIG_LOAD_TIMEOUT_MS, o as ConfigObjectNotSerializable, p as defineConfig, r as ConfigDiscoveryResult, s as LoadConfigOptions, t as AppConfigResult, u as ParsedModuleConfig, v as loadWorkspaceConfig, w as DiscoveredDataApi, x as AppStatus, y as loadWorkspaceSettings } from "./config-C2BUosLm.mjs";
|
|
4
|
+
export { AppConfigResult, type AppStatus, CONFIG_LOAD_TIMEOUT_MS, ConfigDiscoveryResult, ConfigLoadFailed, ConfigNotFound, ConfigObjectNotSerializable, type DataApiKind, type DevConfig, type DiscoveredApp, type DiscoveredDataApi, type DiscoveredWorkspace, type DiscoveryEvent, type DiscoveryResponse, type GkmConfig, LoadConfigOptions, type LoadedConfig, NotABackendApp, NotInAnApp, ParsedModuleConfig, WorkspaceAppInfo, type WorkspaceConfig, WorkspaceDeclaresNoConstructs, defineConfig, defineWorkspace, findWorkspaceRoot, loadAppConfig, loadConfig, loadWorkspaceAppInfo, loadWorkspaceConfig, loadWorkspaceSettings, parseModuleConfig };
|
package/dist/config.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { i as defineWorkspace } from "./workspace-
|
|
3
|
-
export { ConfigNotFound, NotABackendApp, NotInAnApp, WorkspaceDeclaresNoConstructs, defineConfig, defineWorkspace, loadAppConfig, loadConfig, loadWorkspaceAppInfo, loadWorkspaceConfig, loadWorkspaceSettings, parseModuleConfig };
|
|
1
|
+
import { a as NotABackendApp, c as defineConfig, d as loadConfig, f as loadWorkspaceAppInfo, h as parseModuleConfig, i as ConfigObjectNotSerializable, l as findWorkspaceRoot, m as loadWorkspaceSettings, n as ConfigLoadFailed, o as NotInAnApp, p as loadWorkspaceConfig, r as ConfigNotFound, s as WorkspaceDeclaresNoConstructs, t as CONFIG_LOAD_TIMEOUT_MS, u as loadAppConfig } from "./config-LKKCVCnC.mjs";
|
|
2
|
+
import { i as defineWorkspace } from "./workspace-Dh7rr7l4.mjs";
|
|
3
|
+
export { CONFIG_LOAD_TIMEOUT_MS, ConfigLoadFailed, ConfigNotFound, ConfigObjectNotSerializable, NotABackendApp, NotInAnApp, WorkspaceDeclaresNoConstructs, defineConfig, defineWorkspace, findWorkspaceRoot, loadAppConfig, loadConfig, loadWorkspaceAppInfo, loadWorkspaceConfig, loadWorkspaceSettings, parseModuleConfig };
|
package/dist/deploy/public.cjs
CHANGED
|
@@ -1,17 +1,153 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_sniffer = require("../sniffer-
|
|
2
|
+
const require_sniffer = require("../sniffer-D_SYc_pO.cjs");
|
|
3
3
|
const require_home = require("../home-DOzBaWaL.cjs");
|
|
4
|
+
const require_discover = require("../discover-C_6COHEv.cjs");
|
|
5
|
+
const require_config = require("../config-BEJYKd4s.cjs");
|
|
4
6
|
const require_define = require("../define-Cv_QvDrg.cjs");
|
|
5
7
|
const require_store = require("../store-KvNQwYaB.cjs");
|
|
6
8
|
const require_runtime = require("../runtime-CMwtq0AL.cjs");
|
|
7
|
-
const require_resolve = require("../resolve-
|
|
8
|
-
const require_terminal = require("../terminal-
|
|
9
|
-
const require_deploy = require("../deploy-
|
|
10
|
-
const require_deploy$1 = require("../deploy-
|
|
9
|
+
const require_resolve = require("../resolve-xytBTtG4.cjs");
|
|
10
|
+
const require_terminal = require("../terminal-D0f1u0LG.cjs");
|
|
11
|
+
const require_deploy = require("../deploy-BiMrP9i7.cjs");
|
|
12
|
+
const require_deploy$1 = require("../deploy-ABBI0lf1.cjs");
|
|
13
|
+
let node_path = require("node:path");
|
|
14
|
+
let node_fs = require("node:fs");
|
|
15
|
+
//#region src/sandbox/install.ts
|
|
16
|
+
/**
|
|
17
|
+
* Installing a project's dependencies in a sandbox, with or without their
|
|
18
|
+
* lifecycle scripts.
|
|
19
|
+
*
|
|
20
|
+
* `postinstall` is the oldest way into a build machine: any package in the
|
|
21
|
+
* lockfile — a dependency of a dependency — runs whatever it likes the moment
|
|
22
|
+
* it is installed. For a build the host trusts that is how native modules get
|
|
23
|
+
* built. For one it does not, the scripts are skipped, and the few packages
|
|
24
|
+
* that genuinely need theirs (esbuild's binary, a database driver) are named
|
|
25
|
+
* and rebuilt — with nothing but the sandbox's environment either way.
|
|
26
|
+
*/
|
|
27
|
+
/** Long enough for a cold install of a large monorepo. */
|
|
28
|
+
const INSTALL_TIMEOUT_MS = 9e5;
|
|
29
|
+
/** A name in `allowScripts` that is not a package name. */
|
|
30
|
+
var InstallAllowlistNameInvalid = class extends Error {
|
|
31
|
+
packageName;
|
|
32
|
+
constructor(packageName) {
|
|
33
|
+
super(`'${packageName}' is not a package name, so its scripts cannot be allowed. Name the package as it appears in package.json — 'esbuild', '@prisma/client'.`);
|
|
34
|
+
this.packageName = packageName;
|
|
35
|
+
this.name = "InstallAllowlistNameInvalid";
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
/** The package manager has no way to run only some packages' scripts. */
|
|
39
|
+
var InstallScriptsAllowlistUnsupported = class extends Error {
|
|
40
|
+
packageManager;
|
|
41
|
+
allowScripts;
|
|
42
|
+
constructor(packageManager, allowScripts) {
|
|
43
|
+
super(`${packageManager} cannot rebuild named packages after an install without scripts, so ${allowScripts.join(", ")} cannot be allowed theirs. Use pnpm, npm or Yarn 2+, or install with every script skipped.`);
|
|
44
|
+
this.packageManager = packageManager;
|
|
45
|
+
this.allowScripts = allowScripts;
|
|
46
|
+
this.name = "InstallScriptsAllowlistUnsupported";
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* npm's package-name grammar, less a leading `-`: each name is an argument to
|
|
51
|
+
* `rebuild`, and must never be read as a flag.
|
|
52
|
+
*/
|
|
53
|
+
const PACKAGE_NAME = /^(?:@[a-z0-9~][a-z0-9._~-]*\/)?[a-z0-9~][a-z0-9._~-]*$/;
|
|
54
|
+
/**
|
|
55
|
+
* The commands an install runs, in order. Exported for the tests, which
|
|
56
|
+
* check each package manager's flags without installing with all four.
|
|
57
|
+
*/
|
|
58
|
+
function installCommands(packageManager, cwd, options = {}) {
|
|
59
|
+
const ignore = options.ignoreScripts ?? false;
|
|
60
|
+
const allow = ignore ? [...options.allowScripts ?? []] : [];
|
|
61
|
+
for (const name of allow) if (!PACKAGE_NAME.test(name)) throw new InstallAllowlistNameInvalid(name);
|
|
62
|
+
switch (packageManager) {
|
|
63
|
+
case "pnpm": return [["pnpm", [
|
|
64
|
+
"install",
|
|
65
|
+
"--frozen-lockfile",
|
|
66
|
+
...ignore ? ["--ignore-scripts"] : []
|
|
67
|
+
]], ...allow.length > 0 ? [["pnpm", [
|
|
68
|
+
"rebuild",
|
|
69
|
+
"--config.dangerouslyAllowAllBuilds=true",
|
|
70
|
+
...allow
|
|
71
|
+
]]] : []];
|
|
72
|
+
case "npm": return [["npm", [(0, node_fs.existsSync)((0, node_path.join)(cwd, "package-lock.json")) ? "ci" : "install", ...ignore ? ["--ignore-scripts"] : []]], ...allow.length > 0 ? [["npm", [
|
|
73
|
+
"rebuild",
|
|
74
|
+
"--dangerously-allow-all-scripts",
|
|
75
|
+
...allow
|
|
76
|
+
]]] : []];
|
|
77
|
+
case "yarn":
|
|
78
|
+
if ((0, node_fs.existsSync)((0, node_path.join)(cwd, ".yarnrc.yml"))) return [["yarn", [
|
|
79
|
+
"install",
|
|
80
|
+
"--immutable",
|
|
81
|
+
...ignore ? ["--mode=skip-build"] : []
|
|
82
|
+
]], ...allow.length > 0 ? [["yarn", ["rebuild", ...allow]]] : []];
|
|
83
|
+
if (allow.length > 0) throw new InstallScriptsAllowlistUnsupported("Yarn 1", allow);
|
|
84
|
+
return [["yarn", [
|
|
85
|
+
"install",
|
|
86
|
+
"--frozen-lockfile",
|
|
87
|
+
...ignore ? ["--ignore-scripts"] : []
|
|
88
|
+
]]];
|
|
89
|
+
case "bun":
|
|
90
|
+
if (allow.length > 0) throw new InstallScriptsAllowlistUnsupported("bun", allow);
|
|
91
|
+
return [["bun", [
|
|
92
|
+
"install",
|
|
93
|
+
"--frozen-lockfile",
|
|
94
|
+
...ignore ? ["--ignore-scripts"] : []
|
|
95
|
+
]]];
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Install the project's dependencies in `sandbox`.
|
|
100
|
+
*
|
|
101
|
+
* ```ts
|
|
102
|
+
* // A checkout nobody has reviewed: no scripts but esbuild's.
|
|
103
|
+
* await installDependencies(sandbox, {
|
|
104
|
+
* ignoreScripts: true,
|
|
105
|
+
* allowScripts: ['esbuild'],
|
|
106
|
+
* });
|
|
107
|
+
* ```
|
|
108
|
+
*
|
|
109
|
+
* Resolves with each command's result, in order — with its output when
|
|
110
|
+
* `output` is `capture`.
|
|
111
|
+
*
|
|
112
|
+
* @throws {CommandFailed} when the package manager exits unsuccessfully.
|
|
113
|
+
* @throws {InstallScriptsAllowlistUnsupported} for an allowlist the package
|
|
114
|
+
* manager cannot honour, before anything is installed.
|
|
115
|
+
*/
|
|
116
|
+
async function installDependencies(sandbox, options = {}) {
|
|
117
|
+
const cwd = options.cwd ?? sandbox.root;
|
|
118
|
+
const results = [];
|
|
119
|
+
const packageManager = options.packageManager ?? require_sniffer.detectPackageManager((0, node_path.resolve)(sandbox.root, cwd));
|
|
120
|
+
for (const [command, args] of installCommands(packageManager, (0, node_path.resolve)(sandbox.root, cwd), options)) {
|
|
121
|
+
const result = await sandbox.exec(command, args, {
|
|
122
|
+
cwd,
|
|
123
|
+
env: {
|
|
124
|
+
...sandbox.env,
|
|
125
|
+
...options.env
|
|
126
|
+
},
|
|
127
|
+
timeoutMs: options.timeoutMs ?? 9e5,
|
|
128
|
+
output: options.output ?? "inherit",
|
|
129
|
+
...options.signal ? { signal: options.signal } : {}
|
|
130
|
+
});
|
|
131
|
+
results.push(result);
|
|
132
|
+
if (result.exitCode !== 0) throw new require_sniffer.CommandFailed(command, args, result.exitCode, result.signal);
|
|
133
|
+
}
|
|
134
|
+
return results;
|
|
135
|
+
}
|
|
136
|
+
//#endregion
|
|
11
137
|
exports.BackendDeployFailed = require_deploy$1.BackendDeployFailed;
|
|
138
|
+
exports.CommandFailed = require_sniffer.CommandFailed;
|
|
139
|
+
exports.CommandTimedOut = require_sniffer.CommandTimedOut;
|
|
140
|
+
exports.ConfigLoadFailed = require_config.ConfigLoadFailed;
|
|
141
|
+
exports.ConfigObjectNotSerializable = require_config.ConfigObjectNotSerializable;
|
|
142
|
+
exports.ConstructDiscoveryFailed = require_discover.ConstructDiscoveryFailed;
|
|
143
|
+
exports.ConstructsNotSerializable = require_discover.ConstructsNotSerializable;
|
|
12
144
|
exports.DeployTargetNotYetSupported = require_define.DeployTargetNotYetSupported;
|
|
13
145
|
exports.GKM_HOME_ENV = require_home.GKM_HOME_ENV;
|
|
146
|
+
exports.INSTALL_TIMEOUT_MS = INSTALL_TIMEOUT_MS;
|
|
147
|
+
exports.InstallAllowlistNameInvalid = InstallAllowlistNameInvalid;
|
|
148
|
+
exports.InstallScriptsAllowlistUnsupported = InstallScriptsAllowlistUnsupported;
|
|
14
149
|
exports.InvalidTargetOptions = require_resolve.InvalidTargetOptions;
|
|
150
|
+
exports.LocalSandbox = require_sniffer.LocalSandbox;
|
|
15
151
|
exports.MissingCredential = require_terminal.MissingCredential;
|
|
16
152
|
exports.MissingEnvVars = require_deploy$1.MissingEnvVars;
|
|
17
153
|
exports.NoDeployableApps = require_terminal.NoDeployableApps;
|
|
@@ -21,6 +157,11 @@ exports.RegistryAmbiguous = require_deploy$1.RegistryAmbiguous;
|
|
|
21
157
|
exports.RegistryNotConfigured = require_deploy$1.RegistryNotConfigured;
|
|
22
158
|
exports.RegistryNotFound = require_deploy$1.RegistryNotFound;
|
|
23
159
|
exports.RollbackFailed = require_terminal.RollbackFailed;
|
|
160
|
+
exports.SANDBOX_ENV_ALLOWLIST = require_sniffer.SANDBOX_ENV_ALLOWLIST;
|
|
161
|
+
exports.SECRETS_DIR_ENV = require_discover.SECRETS_DIR_ENV;
|
|
162
|
+
exports.SandboxCwdEscape = require_discover.SandboxCwdEscape;
|
|
163
|
+
exports.SandboxWorkerFailed = require_discover.SandboxWorkerFailed;
|
|
164
|
+
exports.SecretNameInvalid = require_discover.SecretNameInvalid;
|
|
24
165
|
exports.StateLocked = require_sniffer.StateLocked;
|
|
25
166
|
exports.StateVersionConflict = require_sniffer.StateVersionConflict;
|
|
26
167
|
exports.TargetEntryInvalid = require_resolve.TargetEntryInvalid;
|
|
@@ -30,8 +171,13 @@ exports.TargetRuntimeMismatch = require_resolve.TargetRuntimeMismatch;
|
|
|
30
171
|
exports.TargetRuntimeUndeclared = require_runtime.TargetRuntimeUndeclared;
|
|
31
172
|
exports.UnknownDeployApps = require_terminal.UnknownDeployApps;
|
|
32
173
|
exports.UnknownDeployTarget = require_define.UnknownDeployTarget;
|
|
174
|
+
exports.allowlistedEnv = require_sniffer.allowlistedEnv;
|
|
33
175
|
exports.chainCredentials = require_terminal.chainCredentials;
|
|
176
|
+
exports.confineCwd = require_discover.confineCwd;
|
|
34
177
|
exports.deploy = require_deploy.deploy;
|
|
35
178
|
exports.deployIdentity = require_store.deployIdentity;
|
|
36
179
|
exports.gkmHome = require_home.gkmHome;
|
|
180
|
+
exports.installDependencies = installDependencies;
|
|
37
181
|
exports.storedCredentials = require_terminal.storedCredentials;
|
|
182
|
+
|
|
183
|
+
//# sourceMappingURL=public.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.cjs","names":["existsSync","join","detectPackageManager","resolve","CommandFailed"],"sources":["../../src/sandbox/install.ts"],"sourcesContent":["/**\n * Installing a project's dependencies in a sandbox, with or without their\n * lifecycle scripts.\n *\n * `postinstall` is the oldest way into a build machine: any package in the\n * lockfile — a dependency of a dependency — runs whatever it likes the moment\n * it is installed. For a build the host trusts that is how native modules get\n * built. For one it does not, the scripts are skipped, and the few packages\n * that genuinely need theirs (esbuild's binary, a database driver) are named\n * and rebuilt — with nothing but the sandbox's environment either way.\n */\n\nimport { existsSync } from 'node:fs';\nimport { join, resolve } from 'node:path';\nimport { detectPackageManager, type PackageManager } from '../docker/templates';\nimport { CommandFailed } from '../run';\nimport type { Sandbox, SandboxOutput, SandboxResult } from './sandbox';\n\n/** Long enough for a cold install of a large monorepo. */\nexport const INSTALL_TIMEOUT_MS = 15 * 60_000;\n\nexport interface InstallOptions {\n\t/** The directory to install in. Defaults to the sandbox's root. */\n\tcwd?: string;\n\t/** Defaults to the one the lockfile above `cwd` names. */\n\tpackageManager?: PackageManager;\n\t/**\n\t * Skip every lifecycle script — dependencies' and the project's own —\n\t * except those of {@link allowScripts}. Defaults to false: scripts run as\n\t * a plain install runs them, under the package manager's own policy —\n\t * npm 12 and pnpm 10 skip dependencies' scripts nobody approved.\n\t */\n\tignoreScripts?: boolean;\n\t/**\n\t * With `ignoreScripts`, the packages whose scripts still run: rebuilt by\n\t * name once the install is done.\n\t */\n\tallowScripts?: readonly string[];\n\t/** Variables the install needs beyond the sandbox's own. */\n\tenv?: Readonly<Record<string, string>>;\n\t/** Defaults to {@link INSTALL_TIMEOUT_MS}, for each command. */\n\ttimeoutMs?: number;\n\t/** Where the package manager's output goes. Defaults to `inherit`. */\n\toutput?: SandboxOutput;\n\tsignal?: AbortSignal;\n}\n\n/** A name in `allowScripts` that is not a package name. */\nexport class InstallAllowlistNameInvalid extends Error {\n\tconstructor(readonly packageName: string) {\n\t\tsuper(\n\t\t\t`'${packageName}' is not a package name, so its scripts cannot be ` +\n\t\t\t\t'allowed. Name the package as it appears in package.json — ' +\n\t\t\t\t\"'esbuild', '@prisma/client'.\",\n\t\t);\n\t\tthis.name = 'InstallAllowlistNameInvalid';\n\t}\n}\n\n/** The package manager has no way to run only some packages' scripts. */\nexport class InstallScriptsAllowlistUnsupported extends Error {\n\tconstructor(\n\t\treadonly packageManager: string,\n\t\treadonly allowScripts: readonly string[],\n\t) {\n\t\tsuper(\n\t\t\t`${packageManager} cannot rebuild named packages after an install ` +\n\t\t\t\t`without scripts, so ${allowScripts.join(', ')} cannot be allowed ` +\n\t\t\t\t'theirs. Use pnpm, npm or Yarn 2+, or install with every script ' +\n\t\t\t\t'skipped.',\n\t\t);\n\t\tthis.name = 'InstallScriptsAllowlistUnsupported';\n\t}\n}\n\n/**\n * npm's package-name grammar, less a leading `-`: each name is an argument to\n * `rebuild`, and must never be read as a flag.\n */\nconst PACKAGE_NAME = /^(?:@[a-z0-9~][a-z0-9._~-]*\\/)?[a-z0-9~][a-z0-9._~-]*$/;\n\n/**\n * The commands an install runs, in order. Exported for the tests, which\n * check each package manager's flags without installing with all four.\n */\nexport function installCommands(\n\tpackageManager: PackageManager,\n\tcwd: string,\n\toptions: Pick<InstallOptions, 'ignoreScripts' | 'allowScripts'> = {},\n): [string, string[]][] {\n\tconst ignore = options.ignoreScripts ?? false;\n\tconst allow = ignore ? [...(options.allowScripts ?? [])] : [];\n\tfor (const name of allow) {\n\t\tif (!PACKAGE_NAME.test(name)) throw new InstallAllowlistNameInvalid(name);\n\t}\n\n\tswitch (packageManager) {\n\t\tcase 'pnpm':\n\t\t\treturn [\n\t\t\t\t[\n\t\t\t\t\t'pnpm',\n\t\t\t\t\t[\n\t\t\t\t\t\t'install',\n\t\t\t\t\t\t'--frozen-lockfile',\n\t\t\t\t\t\t...(ignore ? ['--ignore-scripts'] : []),\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t// pnpm 10 builds no dependency it was not told to, even by name;\n\t\t\t\t// this command names exactly the ones allowed, so it may build\n\t\t\t\t// what it names.\n\t\t\t\t...(allow.length > 0\n\t\t\t\t\t? [\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'pnpm',\n\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t'rebuild',\n\t\t\t\t\t\t\t\t\t'--config.dangerouslyAllowAllBuilds=true',\n\t\t\t\t\t\t\t\t\t...allow,\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t] as [string, string[]],\n\t\t\t\t\t\t]\n\t\t\t\t\t: []),\n\t\t\t];\n\t\tcase 'npm': {\n\t\t\tconst locked = existsSync(join(cwd, 'package-lock.json'));\n\t\t\treturn [\n\t\t\t\t[\n\t\t\t\t\t'npm',\n\t\t\t\t\t[locked ? 'ci' : 'install', ...(ignore ? ['--ignore-scripts'] : [])],\n\t\t\t\t],\n\t\t\t\t// npm 12 runs no dependency's install script its `allowScripts`\n\t\t\t\t// policy does not approve, rebuilt by name or not, and refuses\n\t\t\t\t// `--allow-scripts` on a project's command line. This command\n\t\t\t\t// names exactly the packages allowed, so it may run what it names.\n\t\t\t\t...(allow.length > 0\n\t\t\t\t\t? [\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'npm',\n\t\t\t\t\t\t\t\t['rebuild', '--dangerously-allow-all-scripts', ...allow],\n\t\t\t\t\t\t\t] as [string, string[]],\n\t\t\t\t\t\t]\n\t\t\t\t\t: []),\n\t\t\t];\n\t\t}\n\t\tcase 'yarn': {\n\t\t\t// Yarn 2+ keeps a `.yarnrc.yml`; it skips builds by mode and can\n\t\t\t// rebuild by name. Yarn 1 can only skip them all.\n\t\t\tconst berry = existsSync(join(cwd, '.yarnrc.yml'));\n\t\t\tif (berry) {\n\t\t\t\treturn [\n\t\t\t\t\t[\n\t\t\t\t\t\t'yarn',\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'install',\n\t\t\t\t\t\t\t'--immutable',\n\t\t\t\t\t\t\t...(ignore ? ['--mode=skip-build'] : []),\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t\t...(allow.length > 0\n\t\t\t\t\t\t? [['yarn', ['rebuild', ...allow]] as [string, string[]]]\n\t\t\t\t\t\t: []),\n\t\t\t\t];\n\t\t\t}\n\t\t\tif (allow.length > 0) {\n\t\t\t\tthrow new InstallScriptsAllowlistUnsupported('Yarn 1', allow);\n\t\t\t}\n\t\t\treturn [\n\t\t\t\t[\n\t\t\t\t\t'yarn',\n\t\t\t\t\t[\n\t\t\t\t\t\t'install',\n\t\t\t\t\t\t'--frozen-lockfile',\n\t\t\t\t\t\t...(ignore ? ['--ignore-scripts'] : []),\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t];\n\t\t}\n\t\tcase 'bun':\n\t\t\tif (allow.length > 0) {\n\t\t\t\tthrow new InstallScriptsAllowlistUnsupported('bun', allow);\n\t\t\t}\n\t\t\treturn [\n\t\t\t\t[\n\t\t\t\t\t'bun',\n\t\t\t\t\t[\n\t\t\t\t\t\t'install',\n\t\t\t\t\t\t'--frozen-lockfile',\n\t\t\t\t\t\t...(ignore ? ['--ignore-scripts'] : []),\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t];\n\t}\n}\n\n/**\n * Install the project's dependencies in `sandbox`.\n *\n * ```ts\n * // A checkout nobody has reviewed: no scripts but esbuild's.\n * await installDependencies(sandbox, {\n * ignoreScripts: true,\n * allowScripts: ['esbuild'],\n * });\n * ```\n *\n * Resolves with each command's result, in order — with its output when\n * `output` is `capture`.\n *\n * @throws {CommandFailed} when the package manager exits unsuccessfully.\n * @throws {InstallScriptsAllowlistUnsupported} for an allowlist the package\n * manager cannot honour, before anything is installed.\n */\nexport async function installDependencies(\n\tsandbox: Sandbox,\n\toptions: InstallOptions = {},\n): Promise<SandboxResult[]> {\n\tconst cwd = options.cwd ?? sandbox.root;\n\tconst results: SandboxResult[] = [];\n\tconst packageManager =\n\t\toptions.packageManager ?? detectPackageManager(resolve(sandbox.root, cwd));\n\n\tfor (const [command, args] of installCommands(\n\t\tpackageManager,\n\t\tresolve(sandbox.root, cwd),\n\t\toptions,\n\t)) {\n\t\tconst result = await sandbox.exec(command, args, {\n\t\t\tcwd,\n\t\t\tenv: { ...sandbox.env, ...options.env },\n\t\t\ttimeoutMs: options.timeoutMs ?? INSTALL_TIMEOUT_MS,\n\t\t\toutput: options.output ?? 'inherit',\n\t\t\t...(options.signal ? { signal: options.signal } : {}),\n\t\t});\n\t\tresults.push(result);\n\t\tif (result.exitCode !== 0) {\n\t\t\tthrow new CommandFailed(\n\t\t\t\tcommand,\n\t\t\t\targs,\n\t\t\t\tresult.exitCode,\n\t\t\t\tresult.signal as NodeJS.Signals | null,\n\t\t\t);\n\t\t}\n\t}\n\treturn results;\n}\n"],"mappings":"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"}
|