@getmonoceros/workbench 1.26.3 → 1.26.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bin.js CHANGED
@@ -74,7 +74,7 @@ ${issues}`);
74
74
  }
75
75
  return result.data;
76
76
  }
77
- var SOLUTION_NAME_RE, APT_PACKAGE_NAME_RE, RUNTIME_VERSION_RE, FEATURE_REF_RE, INSTALL_URL_RE, REPO_URL_RE, REPO_PATH_RE, POSTGRES_URL_RE, REGEX, PROVIDER_VALUES, KNOWN_PROVIDER_HOSTS, CONFIG_SCHEMA_VERSION, FeatureOptionValueSchema, FeatureEntrySchema, EMAIL_RE, GitUserSchema, RepoEntrySchema, PortEntrySchema, RoutingSchema, SERVICE_NAME_RE, ServiceEnvValueSchema, ServiceHealthcheckSchema, SERVICE_RESTART_VALUES, ServiceObjectSchema, ExternalServicesSchema, LanguageOptionValueSchema, LanguageEntrySchema, SolutionConfigSchema;
77
+ var SOLUTION_NAME_RE, APT_PACKAGE_NAME_RE, RUNTIME_VERSION_RE, FEATURE_REF_RE, INSTALL_URL_RE, REPO_URL_RE, REPO_PATH_RE, REGEX, PROVIDER_VALUES, KNOWN_PROVIDER_HOSTS, CONFIG_SCHEMA_VERSION, FeatureOptionValueSchema, FeatureEntrySchema, EMAIL_RE, GitUserSchema, RepoEntrySchema, PortEntrySchema, RoutingSchema, SERVICE_NAME_RE, ServiceEnvValueSchema, ServiceHealthcheckSchema, SERVICE_RESTART_VALUES, ServiceObjectSchema, LanguageOptionValueSchema, LanguageEntrySchema, SolutionConfigSchema;
78
78
  var init_schema = __esm({
79
79
  "src/config/schema.ts"() {
80
80
  "use strict";
@@ -85,15 +85,13 @@ var init_schema = __esm({
85
85
  INSTALL_URL_RE = /^https:\/\/[A-Za-z0-9.\-_~/:?#[\]@!&'()*+,;=%]+$/;
86
86
  REPO_URL_RE = /^https:\/\/[A-Za-z0-9@:/+_~.#=&?-]+$/;
87
87
  REPO_PATH_RE = /^[A-Za-z0-9._-]+(\/[A-Za-z0-9._-]+)*$/;
88
- POSTGRES_URL_RE = /^postgres(ql)?:\/\//;
89
88
  REGEX = {
90
89
  solutionName: SOLUTION_NAME_RE,
91
90
  aptPackage: APT_PACKAGE_NAME_RE,
92
91
  featureRef: FEATURE_REF_RE,
93
92
  installUrl: INSTALL_URL_RE,
94
93
  repoUrl: REPO_URL_RE,
95
- repoPath: REPO_PATH_RE,
96
- postgresUrl: POSTGRES_URL_RE
94
+ repoPath: REPO_PATH_RE
97
95
  };
98
96
  PROVIDER_VALUES = [
99
97
  "github",
@@ -217,12 +215,6 @@ var init_schema = __esm({
217
215
  // are left untouched by `interpolateServices`.
218
216
  connectionEnv: z.record(z.string(), z.string()).optional()
219
217
  });
220
- ExternalServicesSchema = z.object({
221
- postgres: z.string().regex(
222
- POSTGRES_URL_RE,
223
- "Postgres URL must start with 'postgres://' or 'postgresql://'"
224
- ).optional()
225
- });
226
218
  LanguageOptionValueSchema = z.union([
227
219
  z.string(),
228
220
  z.number(),
@@ -269,7 +261,6 @@ var init_schema = __esm({
269
261
  services: z.array(ServiceObjectSchema).default([]),
270
262
  repos: z.array(RepoEntrySchema).default([]),
271
263
  routing: RoutingSchema.optional(),
272
- externalServices: ExternalServicesSchema.default({}),
273
264
  git: z.object({
274
265
  user: GitUserSchema.optional()
275
266
  }).optional()
@@ -2798,7 +2789,6 @@ function normalizeOptions(opts) {
2798
2789
  const languages = [...new Set(opts.languages)].sort();
2799
2790
  const serviceByName = /* @__PURE__ */ new Map();
2800
2791
  for (const svc of opts.services) {
2801
- if (opts.postgresUrl && svc.name === "postgres") continue;
2802
2792
  serviceByName.set(svc.name, svc);
2803
2793
  }
2804
2794
  const services = [...serviceByName.values()].sort(
@@ -2819,7 +2809,6 @@ function normalizeOptions(opts) {
2819
2809
  languages,
2820
2810
  ...opts.languageOptions && Object.keys(opts.languageOptions).length > 0 ? { languageOptions: opts.languageOptions } : {},
2821
2811
  services,
2822
- postgresUrl: opts.postgresUrl,
2823
2812
  ...aptPackages.length > 0 ? { aptPackages } : {},
2824
2813
  ...features && Object.keys(features).length > 0 ? { features } : {},
2825
2814
  ...installUrls && installUrls.length > 0 ? { installUrls } : {},
@@ -5079,9 +5068,6 @@ function solutionConfigToCreateOptions(config, featureDefaults = {}) {
5079
5068
  if (Object.keys(languageOptions).length > 0) {
5080
5069
  result.languageOptions = languageOptions;
5081
5070
  }
5082
- if (config.externalServices.postgres !== void 0) {
5083
- result.postgresUrl = config.externalServices.postgres;
5084
- }
5085
5071
  if (config.aptPackages.length > 0) {
5086
5072
  result.aptPackages = [...config.aptPackages];
5087
5073
  }
@@ -7340,7 +7326,7 @@ var CLI_VERSION;
7340
7326
  var init_version = __esm({
7341
7327
  "src/version.ts"() {
7342
7328
  "use strict";
7343
- CLI_VERSION = true ? "1.26.3" : "dev";
7329
+ CLI_VERSION = true ? "1.26.5" : "dev";
7344
7330
  }
7345
7331
  });
7346
7332
 
@@ -9200,7 +9186,7 @@ async function runRemove(opts) {
9200
9186
  logger.info(
9201
9187
  `[remove] host-side rm hit ${code} on ${prettyPath(containerPath)}; using a throw-away alpine container to clean root-owned files\u2026`
9202
9188
  );
9203
- const { exitCode: exit } = await dockerExec([
9189
+ const { exitCode: exit, stderr } = await dockerExec([
9204
9190
  "run",
9205
9191
  "--rm",
9206
9192
  "-v",
@@ -9212,12 +9198,14 @@ async function runRemove(opts) {
9212
9198
  "1",
9213
9199
  "-delete"
9214
9200
  ]);
9215
- if (exit !== 0) {
9201
+ try {
9202
+ await fs15.rm(containerPath, { recursive: true, force: true });
9203
+ } catch (err2) {
9204
+ const code2 = err2.code;
9216
9205
  throw new Error(
9217
- `docker-based cleanup of ${containerPath} exited ${exit}. Inspect with \`sudo ls -la ${containerPath}\` and clean manually.`
9206
+ `docker-based cleanup of ${containerPath} did not fully clear it (alpine find exit ${exit}${stderr.trim() ? `: ${stderr.trim()}` : ""}; host rm: ${code2}). Inspect with \`sudo ls -la ${containerPath}\` and clean manually.`
9218
9207
  );
9219
9208
  }
9220
- await fs15.rm(containerPath, { recursive: true, force: true });
9221
9209
  }
9222
9210
  }
9223
9211
  logger.success(