@metabase/cli 0.1.0-alpha.workspaces-commands.818a8f1 → 0.1.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/README.md +0 -237
- package/dist/{archive-BPG5c88Y.mjs → archive-CsWeHXle.mjs} +4 -5
- package/dist/{auth--Hpjwlaf.mjs → auth-BF7IjZIH.mjs} +3 -3
- package/dist/{body-DwU2s6Pg.mjs → body-Dv9hQ0Qk.mjs} +2 -2
- package/dist/{branches-BbcoJXfp.mjs → branches-BujtceGr.mjs} +4 -5
- package/dist/{cancel-task-BDas45YO.mjs → cancel-task-CT2xUMRg.mjs} +4 -5
- package/dist/card-_Ta7zdYe.mjs +19 -0
- package/dist/cli.mjs +13 -17
- package/dist/{create-DpnjQvPw.mjs → create-B8ektf-R.mjs} +6 -7
- package/dist/{create-_UOeEXAj.mjs → create-CI2Cunq5.mjs} +6 -7
- package/dist/{create-CwVcoq0O.mjs → create-DdbU3TLX.mjs} +6 -7
- package/dist/{create-branch-sDttBORB.mjs → create-branch-goZBTNnr.mjs} +4 -5
- package/dist/{current-task-BGt1mqaX.mjs → current-task-DBjRNCFq.mjs} +4 -5
- package/dist/{db-Dm2u2ISJ.mjs → db-DMghzgb6.mjs} +2 -2
- package/dist/{delete-DRBTgyus.mjs → delete-8vGU35r3.mjs} +5 -6
- package/dist/{delete-DUC_stoL.mjs → delete-B27KLF5X.mjs} +5 -6
- package/dist/{delete-runtime-inOVw3IX.mjs → delete-runtime-Byr60cR3.mjs} +2 -4
- package/dist/{delete-table-9Is631O_.mjs → delete-table-BNaJ_gA4.mjs} +5 -6
- package/dist/{dirty-CLjHbz6J.mjs → dirty-aNUuph4I.mjs} +4 -5
- package/dist/{export-D2Anfu3p.mjs → export-QDkuuzSE.mjs} +5 -6
- package/dist/{field-Dhs2AND3.mjs → field-DaYo_90x.mjs} +1 -1
- package/dist/{get-DhIoNeOp.mjs → get-BGBIzMKY.mjs} +4 -5
- package/dist/{get-CAVVmdMX.mjs → get-COXHplHP.mjs} +4 -5
- package/dist/{get-CAPLfawI.mjs → get-Cl8-IauC.mjs} +4 -5
- package/dist/{get-DDWpubE8.mjs → get-Cwpj7lDe.mjs} +5 -6
- package/dist/{get-BHJA78zg.mjs → get-DI_IJvgk.mjs} +4 -5
- package/dist/{get-2po1uv9i.mjs → get-Dh_acl8q.mjs} +4 -5
- package/dist/{get-qPOsuTPw.mjs → get-i6LWOByV.mjs} +4 -5
- package/dist/{has-remote-changes-DAL5jetW.mjs → has-remote-changes-hjKoQuRy.mjs} +4 -5
- package/dist/{import-CUMxUfSF.mjs → import-HJsSKRYx.mjs} +5 -6
- package/dist/{input-BNqSFl38.mjs → input-Dojr-RTw.mjs} +1 -1
- package/dist/{is-dirty-B10S6MG0.mjs → is-dirty-1Qy7hiHB.mjs} +2 -3
- package/dist/is-dirty-DpKn9HJp.mjs +8 -0
- package/dist/{key-CyhOpgWt.mjs → key-DBxPSFwi.mjs} +1 -1
- package/dist/{license-DtsGJi3l.mjs → license-MoWse3ZI.mjs} +3 -3
- package/dist/{list-Y7iGsOfE.mjs → list-Bk6RsbJl.mjs} +3 -4
- package/dist/{list-DeFGwhhJ.mjs → list-C4Ajrw8f.mjs} +3 -4
- package/dist/{list-C5MGydGU.mjs → list-C8tdLOH5.mjs} +3 -4
- package/dist/{list-evtQS7jl.mjs → list-CBSBHtK-.mjs} +3 -4
- package/dist/{list-qetY9OIN.mjs → list-CWt3fqrZ.mjs} +3 -4
- package/dist/{list-OBx5B3gd.mjs → list-C_PRdL5e.mjs} +5 -6
- package/dist/{login-Dqw9ZtCx.mjs → login-C9WTwNn6.mjs} +4 -5
- package/dist/{logout-DwYJ5OUi.mjs → logout-oLszGCOg.mjs} +3 -4
- package/dist/{package-t8dKf4m_.mjs → package-BGfw4ZWJ.mjs} +1 -2
- package/dist/parse-id-BhmmfyCP.mjs +14 -0
- package/dist/{poll-D2sXM5rc.mjs → poll-ILanYysl.mjs} +1 -1
- package/dist/{poll-task-Byiunmaj.mjs → poll-task-DbpsiQhl.mjs} +2 -2
- package/dist/{prompt-fXeNtj0M.mjs → prompt-DpT8yAVy.mjs} +1 -1
- package/dist/{query-BnGVGeM3.mjs → query-PihYi-UZ.mjs} +4 -5
- package/dist/{remove-Bx48o-0S.mjs → remove-B2hVYn1v.mjs} +3 -4
- package/dist/{run-D4NgvaRh.mjs → run-C2so6Qp6.mjs} +27 -11
- package/dist/{runtime-DUgFfYkN.mjs → runtime-C9CEZhcn.mjs} +335 -203
- package/dist/{search-4wKx5ug2.mjs → search-CopOytXY.mjs} +4 -5
- package/dist/{set-BZnCRL4c.mjs → set-BcF7M1GQ.mjs} +4 -5
- package/dist/{set-DCjrmTFm.mjs → set-CbibegpA.mjs} +6 -7
- package/dist/{setting-C4vQSqer.mjs → setting-U3NtBMFo.mjs} +3 -3
- package/dist/{stash-ZZkmW_V7.mjs → stash-DOBbYozC.mjs} +5 -6
- package/dist/{status-DezF-PIM.mjs → status-Buf1ZbNR.mjs} +5 -6
- package/dist/{status-JH6BZppo.mjs → status-CUcs8XBH.mjs} +2 -3
- package/dist/{status-9KAPIpX8.mjs → status-D1F5XHae.mjs} +2 -3
- package/dist/sync-BPyGXfUk.mjs +26 -0
- package/dist/{table-BvAr2ixC.mjs → table-Cfk7oSvw.mjs} +1 -1
- package/dist/{table-D-Mb5Nvw.mjs → table-D7nJt7JO.mjs} +2 -2
- package/dist/transform-UbyewMxY.mjs +21 -0
- package/dist/transform-job-CrYkr-Ma.mjs +19 -0
- package/dist/{update-DxKlQ0hP.mjs → update-CL8tRbxr.mjs} +7 -8
- package/dist/{update-CDtm71m2.mjs → update-DU2oU2j-.mjs} +7 -8
- package/dist/{wait-Cj_8wu4y.mjs → wait-Bugr9eXD.mjs} +5 -6
- package/package.json +1 -2
- package/dist/api-key-D9XxErQn.mjs +0 -13
- package/dist/card-D4zZSPUb.mjs +0 -19
- package/dist/create-Bd_U1zWU.mjs +0 -124
- package/dist/create-CCzsCZMm.mjs +0 -47
- package/dist/credentials-C0xKke5D.mjs +0 -84
- package/dist/database-4V1iiPEx.mjs +0 -17
- package/dist/deprovision-BAMzZc6f.mjs +0 -60
- package/dist/docker-QWVMG2gl.mjs +0 -605
- package/dist/eid-BNhutC1U.mjs +0 -13
- package/dist/flag-pair-CWvvzDJ_.mjs +0 -17
- package/dist/is-dirty-CUuq-aB6.mjs +0 -9
- package/dist/list-B8s7Qnzk.mjs +0 -31
- package/dist/logs-B_lrY7Js.mjs +0 -57
- package/dist/parse-id-C1prc9US.mjs +0 -12
- package/dist/provision-DC4_HWZD.mjs +0 -80
- package/dist/ps-1bZKIwWh.mjs +0 -9
- package/dist/ps-BiOrecEe.mjs +0 -78
- package/dist/remove-DecoZzNd.mjs +0 -97
- package/dist/render-DlBijc5i.mjs +0 -179
- package/dist/setup-Dqh9hN6l.mjs +0 -70
- package/dist/start-xXQypG5L.mjs +0 -324
- package/dist/stop-br-ZOnve.mjs +0 -80
- package/dist/sync-C7VOWD00.mjs +0 -26
- package/dist/transform-CqxZwhGs.mjs +0 -21
- package/dist/transform-job-HjbqjEoP.mjs +0 -19
- package/dist/translate-DJxDVAE4.mjs +0 -110
- package/dist/update-DYVeVjk2.mjs +0 -76
- package/dist/url-DP88YHNo.mjs +0 -53
- package/dist/wait-DwZN3ZwR.mjs +0 -19
- package/dist/wait-flags-CjW4ogUJ.mjs +0 -35
- package/dist/workspace-CbwR0vX_.mjs +0 -24
- package/dist/workspace-Dr9lWU3D.mjs +0 -72
- package/dist/workspace-credentials-q5RRFMT8.mjs +0 -139
- /package/dist/{body-flags-7oqLhu5j.mjs → body-flags-BUA9XV1u.mjs} +0 -0
- /package/dist/{card-C31pGtBZ.mjs → card-CsXk8T6A.mjs} +0 -0
- /package/dist/{database-BTX5qbSv.mjs → database-PA9Goi25.mjs} +0 -0
- /package/dist/{field-QwBMAWsq.mjs → field-C8IVs6rp.mjs} +0 -0
- /package/dist/{manifest-wzEFG0JB.mjs → manifest-CAdjQYH8.mjs} +0 -0
- /package/dist/{setting-DM7pm7yh.mjs → setting-26ckqHAP.mjs} +0 -0
- /package/dist/{transform-DfVkUttP.mjs → transform-B5uRpg1G.mjs} +0 -0
- /package/dist/{transform-job-DuB_OjhO.mjs → transform-job-C7QXWTVE.mjs} +0 -0
package/dist/start-xXQypG5L.mjs
DELETED
|
@@ -1,324 +0,0 @@
|
|
|
1
|
-
import "./package-t8dKf4m_.mjs";
|
|
2
|
-
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import { renderItem, warn } from "./render-DlBijc5i.mjs";
|
|
4
|
-
import { ConfigError, connectionFlags, defineMetabaseCommand, errorMessage, localUrl, outputFlags, parseInteger, parseOptionalInteger, profileFlag, resolveLicenseToken } from "./runtime-DUgFfYkN.mjs";
|
|
5
|
-
import { parseId } from "./parse-id-C1prc9US.mjs";
|
|
6
|
-
import { pollUntil } from "./poll-D2sXM5rc.mjs";
|
|
7
|
-
import { Workspace } from "./workspace-Dr9lWU3D.mjs";
|
|
8
|
-
import { CONTAINER_REPO_DIR, checkDockerReady, containerLifecycleStatus, containerNameFor, pullImage, removeContainer, runProcess, runWorkspaceContainer, scrubContainerConfig, waitForConfigConsumed } from "./docker-QWVMG2gl.mjs";
|
|
9
|
-
import { REPO_SYNC_MODES, RepoSyncMode, buildCredentialsJson, generateWorkspaceCredentials, injectCredentialsIntoConfig, injectRepoSettingsIntoConfig } from "./workspace-credentials-q5RRFMT8.mjs";
|
|
10
|
-
import { z } from "zod";
|
|
11
|
-
import { stat } from "node:fs/promises";
|
|
12
|
-
import { resolve } from "node:path";
|
|
13
|
-
import { createServer } from "node:net";
|
|
14
|
-
|
|
15
|
-
//#region src/core/http/probe.ts
|
|
16
|
-
async function probeHealth(url, timeoutMs) {
|
|
17
|
-
try {
|
|
18
|
-
const response = await fetch(url, { signal: AbortSignal.timeout(timeoutMs) });
|
|
19
|
-
return {
|
|
20
|
-
ready: response.ok,
|
|
21
|
-
status: response.status
|
|
22
|
-
};
|
|
23
|
-
} catch (error) {
|
|
24
|
-
if (error instanceof Error) return {
|
|
25
|
-
ready: false,
|
|
26
|
-
status: null
|
|
27
|
-
};
|
|
28
|
-
throw error;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
//#endregion
|
|
33
|
-
//#region src/runtime/port.ts
|
|
34
|
-
const PORT_SCAN_LIMIT = 100;
|
|
35
|
-
function isPortFree(port) {
|
|
36
|
-
return new Promise((resolve$1) => {
|
|
37
|
-
const server = createServer();
|
|
38
|
-
server.unref();
|
|
39
|
-
server.once("error", () => resolve$1(false));
|
|
40
|
-
server.once("listening", () => {
|
|
41
|
-
server.close(() => resolve$1(true));
|
|
42
|
-
});
|
|
43
|
-
server.listen(port, "127.0.0.1");
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
async function findFreePort(start) {
|
|
47
|
-
for (let port = start; port < start + PORT_SCAN_LIMIT; port++) if (await isPortFree(port)) return port;
|
|
48
|
-
throw new ConfigError(`no free port in range ${start}..${start + PORT_SCAN_LIMIT - 1}`);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
//#endregion
|
|
52
|
-
//#region src/commands/workspace/start.ts
|
|
53
|
-
const DEFAULT_IMAGE = "metabase/metabase-dev:feature-workspaces-v2";
|
|
54
|
-
const DEFAULT_HOST_PORT = 3e3;
|
|
55
|
-
const DEFAULT_HEALTH_TIMEOUT_MS = 18e4;
|
|
56
|
-
const DEFAULT_CONFIG_CONSUMED_TIMEOUT_MS = 6e4;
|
|
57
|
-
const HEALTH_INTERVAL_MS = 2e3;
|
|
58
|
-
const HEALTH_MAX_INTERVAL_MS = 1e4;
|
|
59
|
-
const HEALTH_PROBE_TIMEOUT_MS = 4e3;
|
|
60
|
-
const DEFAULT_REPO_MODE = "read-write";
|
|
61
|
-
const REPO_FILE_URL = `file://${CONTAINER_REPO_DIR}`;
|
|
62
|
-
const StartResult = z.object({
|
|
63
|
-
workspace_id: z.number().int().positive(),
|
|
64
|
-
workspace_name: z.string(),
|
|
65
|
-
container_name: z.string(),
|
|
66
|
-
state: z.enum(["running", "starting"]),
|
|
67
|
-
host_port: z.number().int().positive(),
|
|
68
|
-
url: z.string(),
|
|
69
|
-
image: z.string()
|
|
70
|
-
});
|
|
71
|
-
const startResultView = {
|
|
72
|
-
compactPick: StartResult.pick({
|
|
73
|
-
workspace_id: true,
|
|
74
|
-
workspace_name: true,
|
|
75
|
-
state: true,
|
|
76
|
-
url: true
|
|
77
|
-
}).strip(),
|
|
78
|
-
tableColumns: [
|
|
79
|
-
{
|
|
80
|
-
key: "workspace_id",
|
|
81
|
-
label: "ID"
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
key: "workspace_name",
|
|
85
|
-
label: "Name"
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
key: "state",
|
|
89
|
-
label: "State"
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
key: "url",
|
|
93
|
-
label: "URL"
|
|
94
|
-
}
|
|
95
|
-
]
|
|
96
|
-
};
|
|
97
|
-
var start_default = defineMetabaseCommand({
|
|
98
|
-
meta: {
|
|
99
|
-
name: "start",
|
|
100
|
-
description: "Start a local Docker container that serves as the workspace's dev instance"
|
|
101
|
-
},
|
|
102
|
-
args: {
|
|
103
|
-
...outputFlags,
|
|
104
|
-
...profileFlag,
|
|
105
|
-
...connectionFlags,
|
|
106
|
-
id: {
|
|
107
|
-
type: "positional",
|
|
108
|
-
description: "Workspace id",
|
|
109
|
-
required: true
|
|
110
|
-
},
|
|
111
|
-
port: {
|
|
112
|
-
type: "string",
|
|
113
|
-
description: `Host port to bind (default: ${DEFAULT_HOST_PORT}; auto-shifts up if taken)`
|
|
114
|
-
},
|
|
115
|
-
image: {
|
|
116
|
-
type: "string",
|
|
117
|
-
description: `Docker image to run (default: ${DEFAULT_IMAGE})`,
|
|
118
|
-
default: DEFAULT_IMAGE
|
|
119
|
-
},
|
|
120
|
-
wait: {
|
|
121
|
-
type: "boolean",
|
|
122
|
-
description: "Block until /api/health is ready before returning. Default: return as soon as the container has consumed config.yml.",
|
|
123
|
-
default: false
|
|
124
|
-
},
|
|
125
|
-
timeout: {
|
|
126
|
-
type: "string",
|
|
127
|
-
description: `Health check deadline in ms (used with --wait; default: ${DEFAULT_HEALTH_TIMEOUT_MS})`,
|
|
128
|
-
default: String(DEFAULT_HEALTH_TIMEOUT_MS)
|
|
129
|
-
},
|
|
130
|
-
pull: {
|
|
131
|
-
type: "boolean",
|
|
132
|
-
description: "Pull the image before starting",
|
|
133
|
-
default: true
|
|
134
|
-
},
|
|
135
|
-
metadata: {
|
|
136
|
-
type: "boolean",
|
|
137
|
-
description: "Fetch the workspace's warehouse metadata and stage it inside the container",
|
|
138
|
-
default: true
|
|
139
|
-
},
|
|
140
|
-
force: {
|
|
141
|
-
type: "boolean",
|
|
142
|
-
description: "If a container for this workspace already exists, remove it first",
|
|
143
|
-
default: false
|
|
144
|
-
},
|
|
145
|
-
repo: {
|
|
146
|
-
type: "string",
|
|
147
|
-
description: `Bind-mount a host directory (typically a remote-sync git repo) into the container at ${CONTAINER_REPO_DIR}. Sets remote-sync-url=${REPO_FILE_URL} in the workspace config.yml so the child boots already wired to the repo.`
|
|
148
|
-
},
|
|
149
|
-
"repo-branch": {
|
|
150
|
-
type: "string",
|
|
151
|
-
description: "Branch to set as remote-sync-branch (default: the current branch of the host repo, read from HEAD)"
|
|
152
|
-
},
|
|
153
|
-
"repo-mode": {
|
|
154
|
-
type: "string",
|
|
155
|
-
description: "remote-sync-type: 'read-write' (default) or 'read-only'",
|
|
156
|
-
default: DEFAULT_REPO_MODE
|
|
157
|
-
}
|
|
158
|
-
},
|
|
159
|
-
outputSchema: StartResult,
|
|
160
|
-
examples: [
|
|
161
|
-
"metabase workspace start 1",
|
|
162
|
-
"metabase workspace start 1 --wait",
|
|
163
|
-
"metabase workspace start 1 --port 3100",
|
|
164
|
-
"metabase workspace start 1 --image metabase/metabase-dev:feature-workspaces-v2 --no-pull",
|
|
165
|
-
"metabase workspace start 1 --force",
|
|
166
|
-
"metabase workspace start 1 --repo /path/to/sync-repo --wait",
|
|
167
|
-
"metabase workspace start 1 --repo /path/to/sync-repo --repo-branch dev --repo-mode read-only"
|
|
168
|
-
],
|
|
169
|
-
async run({ args, ctx, getClient, getResolvedConfig }) {
|
|
170
|
-
const workspaceId = parseId(args.id);
|
|
171
|
-
const containerName = containerNameFor(workspaceId);
|
|
172
|
-
const requestedPort = parseOptionalInteger(args.port, {
|
|
173
|
-
name: "--port",
|
|
174
|
-
min: 1
|
|
175
|
-
});
|
|
176
|
-
const healthTimeoutMs = parseInteger(args.timeout ?? String(DEFAULT_HEALTH_TIMEOUT_MS), {
|
|
177
|
-
name: "--timeout",
|
|
178
|
-
min: 1e3
|
|
179
|
-
});
|
|
180
|
-
const client = await getClient();
|
|
181
|
-
const resolved = await getResolvedConfig();
|
|
182
|
-
const licenseToken = await resolveLicenseToken({});
|
|
183
|
-
await checkDockerReady();
|
|
184
|
-
await ensureNoExistingContainer(containerName, args.force);
|
|
185
|
-
const pullPromise = args.pull ? pullImage(args.image) : Promise.resolve();
|
|
186
|
-
const workspace = await client.requestParsed(Workspace, `/api/ee/workspace-manager/${workspaceId}`);
|
|
187
|
-
assertAllDatabasesProvisioned(workspace);
|
|
188
|
-
const hostPort = await resolveHostPort(requestedPort);
|
|
189
|
-
const [parentConfigYaml, metadataJson, repoOptions] = await Promise.all([
|
|
190
|
-
fetchConfigYaml(client, workspaceId),
|
|
191
|
-
args.metadata ? fetchMetadataJson(client, workspaceId) : Promise.resolve(null),
|
|
192
|
-
resolveRepoOptions({
|
|
193
|
-
hostPath: args.repo,
|
|
194
|
-
branch: args["repo-branch"],
|
|
195
|
-
mode: args["repo-mode"]
|
|
196
|
-
})
|
|
197
|
-
]);
|
|
198
|
-
const credentials = generateWorkspaceCredentials(workspaceId);
|
|
199
|
-
const configWithCredentials = injectCredentialsIntoConfig(parentConfigYaml, credentials);
|
|
200
|
-
const configYaml = repoOptions !== null ? injectRepoSettingsIntoConfig(configWithCredentials, repoOptions.repo) : configWithCredentials;
|
|
201
|
-
const credentialsJson = buildCredentialsJson(credentials);
|
|
202
|
-
await pullPromise;
|
|
203
|
-
await runWorkspaceContainer({
|
|
204
|
-
workspaceId,
|
|
205
|
-
workspaceName: workspace.name,
|
|
206
|
-
profile: resolved.profile,
|
|
207
|
-
parentUrl: resolved.url,
|
|
208
|
-
image: args.image,
|
|
209
|
-
hostPort,
|
|
210
|
-
configYaml,
|
|
211
|
-
credentialsJson,
|
|
212
|
-
metadataJson,
|
|
213
|
-
licenseToken,
|
|
214
|
-
bindMounts: repoOptions === null ? [] : [repoOptions.bindMount]
|
|
215
|
-
});
|
|
216
|
-
await waitForConfigConsumed(workspaceId, DEFAULT_CONFIG_CONSUMED_TIMEOUT_MS);
|
|
217
|
-
try {
|
|
218
|
-
await scrubContainerConfig(workspaceId);
|
|
219
|
-
} catch (error) {
|
|
220
|
-
warn(`could not scrub in-container config.yml: ${errorMessage(error)}`);
|
|
221
|
-
}
|
|
222
|
-
if (args.wait) await waitForHealth(hostPort, healthTimeoutMs);
|
|
223
|
-
const result = {
|
|
224
|
-
workspace_id: workspaceId,
|
|
225
|
-
workspace_name: workspace.name,
|
|
226
|
-
container_name: containerName,
|
|
227
|
-
state: args.wait ? "running" : "starting",
|
|
228
|
-
host_port: hostPort,
|
|
229
|
-
url: localUrl(hostPort),
|
|
230
|
-
image: args.image
|
|
231
|
-
};
|
|
232
|
-
renderItem(result, startResultView, ctx);
|
|
233
|
-
}
|
|
234
|
-
});
|
|
235
|
-
function assertAllDatabasesProvisioned(workspace) {
|
|
236
|
-
const databases = workspace.databases ?? [];
|
|
237
|
-
if (databases.length === 0) throw new ConfigError(`workspace ${workspace.id} has no databases — provision at least one before starting`);
|
|
238
|
-
const unready = databases.filter((entry) => entry.status !== "provisioned");
|
|
239
|
-
if (unready.length > 0) {
|
|
240
|
-
const summary = unready.map((entry) => `database ${entry.database_id}=${entry.status}`).join(", ");
|
|
241
|
-
throw new ConfigError(`workspace ${workspace.id} is not ready: ${summary}. Wait for provisioning to finish.`);
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
async function ensureNoExistingContainer(containerName, force) {
|
|
245
|
-
if (!force) {
|
|
246
|
-
const status = await containerLifecycleStatus(containerName);
|
|
247
|
-
if (status !== "missing") throw new ConfigError(`container ${containerName} already exists (state=${status}). Use --force to recreate, or stop/remove it first.`);
|
|
248
|
-
return;
|
|
249
|
-
}
|
|
250
|
-
await removeContainer(containerName);
|
|
251
|
-
}
|
|
252
|
-
async function resolveHostPort(requested) {
|
|
253
|
-
if (requested !== null) {
|
|
254
|
-
if (!await isPortFree(requested)) throw new ConfigError(`port ${requested} is already in use`);
|
|
255
|
-
return requested;
|
|
256
|
-
}
|
|
257
|
-
if (await isPortFree(DEFAULT_HOST_PORT)) return DEFAULT_HOST_PORT;
|
|
258
|
-
return findFreePort(DEFAULT_HOST_PORT + 1);
|
|
259
|
-
}
|
|
260
|
-
async function fetchConfigYaml(client, workspaceId) {
|
|
261
|
-
const response = await client.requestRaw(`/api/ee/workspace-manager/${workspaceId}/config`, { expectContentType: "binary" });
|
|
262
|
-
return response.text();
|
|
263
|
-
}
|
|
264
|
-
async function fetchMetadataJson(client, workspaceId) {
|
|
265
|
-
const response = await client.requestRaw(`/api/ee/workspace-manager/${workspaceId}/metadata/export`, { expectContentType: "binary" });
|
|
266
|
-
return new Uint8Array(await response.arrayBuffer());
|
|
267
|
-
}
|
|
268
|
-
async function waitForHealth(hostPort, timeoutMs) {
|
|
269
|
-
const url = `${localUrl(hostPort)}/api/health`;
|
|
270
|
-
await pollUntil(() => probeHealth(url, HEALTH_PROBE_TIMEOUT_MS), (probe) => probe.ready, {
|
|
271
|
-
intervalMs: HEALTH_INTERVAL_MS,
|
|
272
|
-
maxIntervalMs: HEALTH_MAX_INTERVAL_MS,
|
|
273
|
-
backoff: "exponential",
|
|
274
|
-
timeoutMs
|
|
275
|
-
});
|
|
276
|
-
}
|
|
277
|
-
async function resolveRepoOptions(input) {
|
|
278
|
-
if (input.hostPath === void 0 || input.hostPath === "") {
|
|
279
|
-
const explicitBranch = input.branch !== void 0;
|
|
280
|
-
const explicitNonDefaultMode = input.mode !== void 0 && input.mode !== DEFAULT_REPO_MODE;
|
|
281
|
-
if (explicitBranch || explicitNonDefaultMode) throw new ConfigError("--repo-branch and --repo-mode require --repo to point at a host repo path");
|
|
282
|
-
return null;
|
|
283
|
-
}
|
|
284
|
-
const hostPath = resolve(input.hostPath);
|
|
285
|
-
const stats = await stat(hostPath).catch(() => null);
|
|
286
|
-
if (stats === null || !stats.isDirectory()) throw new ConfigError(`--repo path does not exist or is not a directory: ${hostPath}`);
|
|
287
|
-
const mode = parseRepoMode(input.mode);
|
|
288
|
-
const branch = input.branch ?? await detectBranch(hostPath);
|
|
289
|
-
return {
|
|
290
|
-
bindMount: {
|
|
291
|
-
hostPath,
|
|
292
|
-
containerPath: CONTAINER_REPO_DIR,
|
|
293
|
-
readOnly: mode === "read-only"
|
|
294
|
-
},
|
|
295
|
-
repo: {
|
|
296
|
-
url: REPO_FILE_URL,
|
|
297
|
-
branch,
|
|
298
|
-
mode
|
|
299
|
-
}
|
|
300
|
-
};
|
|
301
|
-
}
|
|
302
|
-
function parseRepoMode(raw) {
|
|
303
|
-
const result = RepoSyncMode.safeParse(raw ?? DEFAULT_REPO_MODE);
|
|
304
|
-
if (!result.success) throw new ConfigError(`invalid --repo-mode: "${raw}" (expected one of: ${REPO_SYNC_MODES.join(", ")})`);
|
|
305
|
-
return result.data;
|
|
306
|
-
}
|
|
307
|
-
async function detectBranch(hostPath) {
|
|
308
|
-
const result = await runProcess("git", [
|
|
309
|
-
"-C",
|
|
310
|
-
hostPath,
|
|
311
|
-
"symbolic-ref",
|
|
312
|
-
"--short",
|
|
313
|
-
"HEAD"
|
|
314
|
-
]).catch((error) => {
|
|
315
|
-
throw new ConfigError(`--repo-branch not provided and could not detect a branch at ${hostPath}: ${errorMessage(error)}`);
|
|
316
|
-
});
|
|
317
|
-
if (result.exitCode !== 0) throw new ConfigError(`--repo-branch not provided and \`git symbolic-ref\` at ${hostPath} failed: ${result.stderr.trim() || "no output"}`);
|
|
318
|
-
const branch = result.stdout.trim();
|
|
319
|
-
if (branch === "") throw new ConfigError(`--repo-branch not provided and HEAD at ${hostPath} resolved to an empty branch name`);
|
|
320
|
-
return branch;
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
//#endregion
|
|
324
|
-
export { start_default as default };
|
package/dist/stop-br-ZOnve.mjs
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import "./package-t8dKf4m_.mjs";
|
|
2
|
-
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import { renderItem } from "./render-DlBijc5i.mjs";
|
|
4
|
-
import { defineMetabaseCommand, outputFlags } from "./runtime-DUgFfYkN.mjs";
|
|
5
|
-
import { parseId } from "./parse-id-C1prc9US.mjs";
|
|
6
|
-
import "./poll-D2sXM5rc.mjs";
|
|
7
|
-
import { checkDockerReady, containerLifecycleStatus, containerNameFor, stopContainer } from "./docker-QWVMG2gl.mjs";
|
|
8
|
-
import { LocalWorkspaceState } from "./ps-BiOrecEe.mjs";
|
|
9
|
-
import { z } from "zod";
|
|
10
|
-
|
|
11
|
-
//#region src/commands/workspace/stop.ts
|
|
12
|
-
const StopResult = z.object({
|
|
13
|
-
workspace_id: z.number().int().positive(),
|
|
14
|
-
container_name: z.string(),
|
|
15
|
-
stopped: z.boolean(),
|
|
16
|
-
prior_state: LocalWorkspaceState.nullable()
|
|
17
|
-
});
|
|
18
|
-
const stopResultView = {
|
|
19
|
-
compactPick: StopResult.pick({
|
|
20
|
-
workspace_id: true,
|
|
21
|
-
stopped: true,
|
|
22
|
-
prior_state: true
|
|
23
|
-
}).strip(),
|
|
24
|
-
tableColumns: [
|
|
25
|
-
{
|
|
26
|
-
key: "workspace_id",
|
|
27
|
-
label: "ID"
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
key: "container_name",
|
|
31
|
-
label: "Container"
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
key: "stopped",
|
|
35
|
-
label: "Stopped"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
key: "prior_state",
|
|
39
|
-
label: "Prior State"
|
|
40
|
-
}
|
|
41
|
-
]
|
|
42
|
-
};
|
|
43
|
-
var stop_default = defineMetabaseCommand({
|
|
44
|
-
meta: {
|
|
45
|
-
name: "stop",
|
|
46
|
-
description: "Stop the local Docker container for a workspace (does not remove it)"
|
|
47
|
-
},
|
|
48
|
-
args: {
|
|
49
|
-
...outputFlags,
|
|
50
|
-
id: {
|
|
51
|
-
type: "positional",
|
|
52
|
-
description: "Workspace id",
|
|
53
|
-
required: true
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
outputSchema: StopResult,
|
|
57
|
-
examples: ["metabase workspace stop 1", "metabase workspace stop 1 --json"],
|
|
58
|
-
async run({ args, ctx }) {
|
|
59
|
-
const workspaceId = parseId(args.id);
|
|
60
|
-
const containerName = containerNameFor(workspaceId);
|
|
61
|
-
await checkDockerReady();
|
|
62
|
-
const status = await containerLifecycleStatus(containerName);
|
|
63
|
-
const priorState = status === "missing" ? null : status;
|
|
64
|
-
let stopped = false;
|
|
65
|
-
if (status === "running") {
|
|
66
|
-
await stopContainer(containerName);
|
|
67
|
-
stopped = true;
|
|
68
|
-
}
|
|
69
|
-
const result = {
|
|
70
|
-
workspace_id: workspaceId,
|
|
71
|
-
container_name: containerName,
|
|
72
|
-
stopped,
|
|
73
|
-
prior_state: priorState
|
|
74
|
-
};
|
|
75
|
-
renderItem(result, stopResultView, ctx);
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
//#endregion
|
|
80
|
-
export { stop_default as default };
|
package/dist/sync-C7VOWD00.mjs
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { defineCommand } from "citty";
|
|
2
|
-
|
|
3
|
-
//#region src/commands/sync/index.ts
|
|
4
|
-
var sync_default = defineCommand({
|
|
5
|
-
meta: {
|
|
6
|
-
name: "sync",
|
|
7
|
-
description: "Remote-sync operations (import, export, status, branches)"
|
|
8
|
-
},
|
|
9
|
-
subCommands: {
|
|
10
|
-
status: () => import("./status-DezF-PIM.mjs").then((mod) => mod.default),
|
|
11
|
-
"is-dirty": () => import("./is-dirty-CUuq-aB6.mjs").then((mod) => mod.default),
|
|
12
|
-
"has-remote-changes": () => import("./has-remote-changes-DAL5jetW.mjs").then((mod) => mod.default),
|
|
13
|
-
dirty: () => import("./dirty-CLjHbz6J.mjs").then((mod) => mod.default),
|
|
14
|
-
"current-task": () => import("./current-task-BGt1mqaX.mjs").then((mod) => mod.default),
|
|
15
|
-
"cancel-task": () => import("./cancel-task-BDas45YO.mjs").then((mod) => mod.default),
|
|
16
|
-
wait: () => import("./wait-Cj_8wu4y.mjs").then((mod) => mod.default),
|
|
17
|
-
import: () => import("./import-CUMxUfSF.mjs").then((mod) => mod.default),
|
|
18
|
-
export: () => import("./export-D2Anfu3p.mjs").then((mod) => mod.default),
|
|
19
|
-
stash: () => import("./stash-ZZkmW_V7.mjs").then((mod) => mod.default),
|
|
20
|
-
branches: () => import("./branches-BbcoJXfp.mjs").then((mod) => mod.default),
|
|
21
|
-
"create-branch": () => import("./create-branch-sDttBORB.mjs").then((mod) => mod.default)
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
//#endregion
|
|
26
|
-
export { sync_default as default };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { defineCommand } from "citty";
|
|
2
|
-
|
|
3
|
-
//#region src/commands/transform/index.ts
|
|
4
|
-
var transform_default = defineCommand({
|
|
5
|
-
meta: {
|
|
6
|
-
name: "transform",
|
|
7
|
-
description: "Manage Metabase transforms"
|
|
8
|
-
},
|
|
9
|
-
subCommands: {
|
|
10
|
-
list: () => import("./list-qetY9OIN.mjs").then((mod) => mod.default),
|
|
11
|
-
get: () => import("./get-qPOsuTPw.mjs").then((mod) => mod.default),
|
|
12
|
-
create: () => import("./create-_UOeEXAj.mjs").then((mod) => mod.default),
|
|
13
|
-
update: () => import("./update-CDtm71m2.mjs").then((mod) => mod.default),
|
|
14
|
-
delete: () => import("./delete-DRBTgyus.mjs").then((mod) => mod.default),
|
|
15
|
-
"delete-table": () => import("./delete-table-9Is631O_.mjs").then((mod) => mod.default),
|
|
16
|
-
run: () => import("./run-D4NgvaRh.mjs").then((mod) => mod.default)
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
//#endregion
|
|
21
|
-
export { transform_default as default };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { defineCommand } from "citty";
|
|
2
|
-
|
|
3
|
-
//#region src/commands/transform-job/index.ts
|
|
4
|
-
var transform_job_default = defineCommand({
|
|
5
|
-
meta: {
|
|
6
|
-
name: "transform-job",
|
|
7
|
-
description: "Manage Metabase transform jobs"
|
|
8
|
-
},
|
|
9
|
-
subCommands: {
|
|
10
|
-
list: () => import("./list-C5MGydGU.mjs").then((mod) => mod.default),
|
|
11
|
-
get: () => import("./get-DhIoNeOp.mjs").then((mod) => mod.default),
|
|
12
|
-
create: () => import("./create-DpnjQvPw.mjs").then((mod) => mod.default),
|
|
13
|
-
update: () => import("./update-DxKlQ0hP.mjs").then((mod) => mod.default),
|
|
14
|
-
delete: () => import("./delete-DUC_stoL.mjs").then((mod) => mod.default)
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
//#endregion
|
|
19
|
-
export { transform_job_default as default };
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import "./package-t8dKf4m_.mjs";
|
|
2
|
-
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import { renderItem } from "./render-DlBijc5i.mjs";
|
|
4
|
-
import { ConfigError, connectionFlags, defineMetabaseCommand, outputFlags, parseCsv, profileFlag } from "./runtime-DUgFfYkN.mjs";
|
|
5
|
-
import "./input-BNqSFl38.mjs";
|
|
6
|
-
import { readBody } from "./body-DwU2s6Pg.mjs";
|
|
7
|
-
import { bodyInputFlags } from "./body-flags-7oqLhu5j.mjs";
|
|
8
|
-
import { requireBothOrNeither } from "./flag-pair-CWvvzDJ_.mjs";
|
|
9
|
-
import { z } from "zod";
|
|
10
|
-
|
|
11
|
-
//#region src/domain/eid-translation.ts
|
|
12
|
-
const EID_MODELS = [
|
|
13
|
-
"action",
|
|
14
|
-
"card",
|
|
15
|
-
"collection",
|
|
16
|
-
"dashboard",
|
|
17
|
-
"dashboard-card",
|
|
18
|
-
"dashboard-tab",
|
|
19
|
-
"dataset",
|
|
20
|
-
"dimension",
|
|
21
|
-
"document",
|
|
22
|
-
"measure",
|
|
23
|
-
"metric",
|
|
24
|
-
"permissions-group",
|
|
25
|
-
"pulse",
|
|
26
|
-
"pulse-card",
|
|
27
|
-
"pulse-channel",
|
|
28
|
-
"segment",
|
|
29
|
-
"snippet",
|
|
30
|
-
"timeline",
|
|
31
|
-
"transform",
|
|
32
|
-
"user"
|
|
33
|
-
];
|
|
34
|
-
const EidModel = z.enum(EID_MODELS);
|
|
35
|
-
const EidTranslateInput = z.object({ entity_ids: z.partialRecord(EidModel, z.array(z.string().min(1)).min(1)) }).loose();
|
|
36
|
-
const EidTranslateEntry = z.object({
|
|
37
|
-
status: z.string(),
|
|
38
|
-
type: EidModel,
|
|
39
|
-
id: z.number().int().optional()
|
|
40
|
-
}).loose();
|
|
41
|
-
const EidTranslateResult = z.object({ entity_ids: z.record(z.string(), EidTranslateEntry) }).loose();
|
|
42
|
-
const EidTranslateResultCompact = EidTranslateResult.pick({ entity_ids: true }).strip();
|
|
43
|
-
const eidTranslateView = {
|
|
44
|
-
compactPick: EidTranslateResultCompact,
|
|
45
|
-
tableColumns: [{
|
|
46
|
-
key: "entity_ids",
|
|
47
|
-
label: "Translated"
|
|
48
|
-
}]
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
//#endregion
|
|
52
|
-
//#region src/commands/eid/translate.ts
|
|
53
|
-
var translate_default = defineMetabaseCommand({
|
|
54
|
-
meta: {
|
|
55
|
-
name: "translate",
|
|
56
|
-
description: "Translate entity ids (EIDs) to numeric ids"
|
|
57
|
-
},
|
|
58
|
-
args: {
|
|
59
|
-
...outputFlags,
|
|
60
|
-
...profileFlag,
|
|
61
|
-
...connectionFlags,
|
|
62
|
-
...bodyInputFlags,
|
|
63
|
-
model: {
|
|
64
|
-
type: "string",
|
|
65
|
-
description: `Entity model for shortcut form: ${EID_MODELS.join(" | ")}`
|
|
66
|
-
},
|
|
67
|
-
eids: {
|
|
68
|
-
type: "string",
|
|
69
|
-
description: "Comma-separated EIDs (used with --model as a shortcut)"
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
outputSchema: EidTranslateResult,
|
|
73
|
-
examples: [
|
|
74
|
-
"metabase eid translate --model card --eids abc123XYZ,def456ABC",
|
|
75
|
-
"metabase eid translate --file translate.json",
|
|
76
|
-
"metabase eid translate --body '{\"entity_ids\":{\"card\":[\"abc123XYZ\"]}}'"
|
|
77
|
-
],
|
|
78
|
-
async run({ args, ctx, getClient }) {
|
|
79
|
-
const pair = requireBothOrNeither({
|
|
80
|
-
name: "--model",
|
|
81
|
-
value: args.model
|
|
82
|
-
}, {
|
|
83
|
-
name: "--eids",
|
|
84
|
-
value: args.eids
|
|
85
|
-
});
|
|
86
|
-
const body = pair ? EidTranslateInput.parse({ entity_ids: { [parseModel(pair.first)]: parseEids(pair.second) } }) : await readBody({
|
|
87
|
-
flag: args.body,
|
|
88
|
-
file: args.file
|
|
89
|
-
}, EidTranslateInput);
|
|
90
|
-
const client = await getClient();
|
|
91
|
-
const result = await client.requestParsed(EidTranslateResult, "/api/eid-translation/translate", {
|
|
92
|
-
method: "POST",
|
|
93
|
-
body
|
|
94
|
-
});
|
|
95
|
-
renderItem(result, eidTranslateView, ctx);
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
function parseModel(raw) {
|
|
99
|
-
const result = EidModel.safeParse(raw);
|
|
100
|
-
if (!result.success) throw new ConfigError(`invalid --model: "${raw}" (expected one of: ${EID_MODELS.join(", ")})`);
|
|
101
|
-
return result.data;
|
|
102
|
-
}
|
|
103
|
-
function parseEids(raw) {
|
|
104
|
-
const parts = parseCsv(raw);
|
|
105
|
-
if (parts.length === 0) throw new ConfigError("--eids must contain at least one EID");
|
|
106
|
-
return parts;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
//#endregion
|
|
110
|
-
export { translate_default as default };
|
package/dist/update-DYVeVjk2.mjs
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import "./package-t8dKf4m_.mjs";
|
|
2
|
-
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import { renderItem } from "./render-DlBijc5i.mjs";
|
|
4
|
-
import { ConfigError, connectionFlags, defineMetabaseCommand, outputFlags, parseCsv, profileFlag } from "./runtime-DUgFfYkN.mjs";
|
|
5
|
-
import "./input-BNqSFl38.mjs";
|
|
6
|
-
import { readBody } from "./body-DwU2s6Pg.mjs";
|
|
7
|
-
import { bodyInputFlags } from "./body-flags-7oqLhu5j.mjs";
|
|
8
|
-
import { parseId } from "./parse-id-C1prc9US.mjs";
|
|
9
|
-
import "./poll-D2sXM5rc.mjs";
|
|
10
|
-
import { parseWaitFlags, waitFlags } from "./wait-flags-CjW4ogUJ.mjs";
|
|
11
|
-
import { Workspace, WorkspaceUpdateDatabaseInput, workspaceView } from "./workspace-Dr9lWU3D.mjs";
|
|
12
|
-
import { waitForDatabaseProvisioned } from "./wait-DwZN3ZwR.mjs";
|
|
13
|
-
|
|
14
|
-
//#region src/commands/workspace/database/update.ts
|
|
15
|
-
var update_default = defineMetabaseCommand({
|
|
16
|
-
meta: {
|
|
17
|
-
name: "update",
|
|
18
|
-
description: "Update a workspace's database (deprovisions then re-provisions with new input schemas)"
|
|
19
|
-
},
|
|
20
|
-
args: {
|
|
21
|
-
...outputFlags,
|
|
22
|
-
...profileFlag,
|
|
23
|
-
...connectionFlags,
|
|
24
|
-
...bodyInputFlags,
|
|
25
|
-
...waitFlags,
|
|
26
|
-
schemas: {
|
|
27
|
-
type: "string",
|
|
28
|
-
description: "Comma-separated input schemas (alternative to --body / --file)"
|
|
29
|
-
},
|
|
30
|
-
id: {
|
|
31
|
-
type: "positional",
|
|
32
|
-
description: "Workspace id",
|
|
33
|
-
required: true
|
|
34
|
-
},
|
|
35
|
-
"db-id": {
|
|
36
|
-
type: "positional",
|
|
37
|
-
description: "Database id",
|
|
38
|
-
required: true
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
outputSchema: Workspace,
|
|
42
|
-
examples: [
|
|
43
|
-
"metabase workspace database update 1 5 --schemas analytics,github",
|
|
44
|
-
"metabase workspace database update 1 5 --schemas analytics --wait",
|
|
45
|
-
"metabase workspace database update 1 5 --file update.json"
|
|
46
|
-
],
|
|
47
|
-
async run({ args, ctx, getClient }) {
|
|
48
|
-
const workspaceId = parseId(args.id);
|
|
49
|
-
const databaseId = parseId(args["db-id"], "db-id");
|
|
50
|
-
const schemasFlag = args.schemas;
|
|
51
|
-
const wait = parseWaitFlags(args);
|
|
52
|
-
let body;
|
|
53
|
-
if (schemasFlag !== void 0 && schemasFlag !== "") {
|
|
54
|
-
const schemas = parseSchemas(schemasFlag);
|
|
55
|
-
body = WorkspaceUpdateDatabaseInput.parse({ input_schemas: schemas });
|
|
56
|
-
} else body = await readBody({
|
|
57
|
-
flag: args.body,
|
|
58
|
-
file: args.file
|
|
59
|
-
}, WorkspaceUpdateDatabaseInput);
|
|
60
|
-
const client = await getClient();
|
|
61
|
-
const initial = await client.requestParsed(Workspace, `/api/ee/workspace-manager/${workspaceId}/database/${databaseId}`, {
|
|
62
|
-
method: "PUT",
|
|
63
|
-
body
|
|
64
|
-
});
|
|
65
|
-
const final = wait.enabled ? await waitForDatabaseProvisioned(client, workspaceId, databaseId, wait.schedule) : initial;
|
|
66
|
-
renderItem(final, workspaceView, ctx);
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
function parseSchemas(raw) {
|
|
70
|
-
const parts = parseCsv(raw);
|
|
71
|
-
if (parts.length === 0) throw new ConfigError("--schemas must contain at least one schema name");
|
|
72
|
-
return parts;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
//#endregion
|
|
76
|
-
export { update_default as default };
|