@geekmidas/cli 10.0.0-alpha.107 → 10.0.0-alpha.109
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/{GoDaddyProvider-Ckl5dg_9.cjs → GoDaddyProvider-BC2hb2N9.cjs} +2 -2
- package/dist/{GoDaddyProvider-Ckl5dg_9.cjs.map → GoDaddyProvider-BC2hb2N9.cjs.map} +1 -1
- package/dist/{GoDaddyProvider-cg6Y_eV9.mjs → GoDaddyProvider-DNOK1nFq.mjs} +2 -2
- package/dist/{GoDaddyProvider-cg6Y_eV9.mjs.map → GoDaddyProvider-DNOK1nFq.mjs.map} +1 -1
- package/dist/{LegacyStateStore-CnheiZ6T.cjs → LegacyStateStore-C3IP1pm0.cjs} +3 -3
- package/dist/{LegacyStateStore-CnheiZ6T.cjs.map → LegacyStateStore-C3IP1pm0.cjs.map} +1 -1
- package/dist/{LegacyStateStore-B2WIE19g.mjs → LegacyStateStore-DBbv0Iwj.mjs} +3 -3
- package/dist/{LegacyStateStore-B2WIE19g.mjs.map → LegacyStateStore-DBbv0Iwj.mjs.map} +1 -1
- package/dist/{LocalStateStore-BwM8fxqb.cjs → LocalStateStore-BCBQQpYx.cjs} +2 -2
- package/dist/{LocalStateStore-BwM8fxqb.cjs.map → LocalStateStore-BCBQQpYx.cjs.map} +1 -1
- package/dist/{LocalStateStore-C4NEpXl4.mjs → LocalStateStore-CqjePMa8.mjs} +2 -2
- package/dist/{LocalStateStore-C4NEpXl4.mjs.map → LocalStateStore-CqjePMa8.mjs.map} +1 -1
- package/dist/{S3StateStore-BiG11MFa.cjs → S3StateStore-ChGx5j9T.cjs} +2 -2
- package/dist/{S3StateStore-BiG11MFa.cjs.map → S3StateStore-ChGx5j9T.cjs.map} +1 -1
- package/dist/{S3StateStore-wMYYUer2.mjs → S3StateStore-CzVQuPXF.mjs} +2 -2
- package/dist/{S3StateStore-wMYYUer2.mjs.map → S3StateStore-CzVQuPXF.mjs.map} +1 -1
- package/dist/{SSMStateStore-BjrAt_Da.cjs → SSMStateStore-BL87Mth7.cjs} +2 -2
- package/dist/{SSMStateStore-BjrAt_Da.cjs.map → SSMStateStore-BL87Mth7.cjs.map} +1 -1
- package/dist/{SSMStateStore-Ch7Oanjc.mjs → SSMStateStore-D1GkBkUo.mjs} +2 -2
- package/dist/{SSMStateStore-Ch7Oanjc.mjs.map → SSMStateStore-D1GkBkUo.mjs.map} +1 -1
- package/dist/{add-awoylGp5.mjs → add-C-0W8ery.mjs} +3 -3
- package/dist/{add-awoylGp5.mjs.map → add-C-0W8ery.mjs.map} +1 -1
- package/dist/{add-DGk9B-eM.cjs → add-DAUrUYWr.cjs} +3 -3
- package/dist/{add-DGk9B-eM.cjs.map → add-DAUrUYWr.cjs.map} +1 -1
- package/dist/{bundler-D9CrZ8Bo.mjs → bundler-CE1Ph5w1.mjs} +5 -5
- package/dist/{bundler-D9CrZ8Bo.mjs.map → bundler-CE1Ph5w1.mjs.map} +1 -1
- package/dist/{bundler-BB1cJ7Wk.cjs → bundler-CrKh5yUa.cjs} +5 -5
- package/dist/{bundler-BB1cJ7Wk.cjs.map → bundler-CrKh5yUa.cjs.map} +1 -1
- package/dist/{cli-C5IGLhy7.cjs → cli-BSlDXj6V.cjs} +2 -2
- package/dist/{cli-C5IGLhy7.cjs.map → cli-BSlDXj6V.cjs.map} +1 -1
- package/dist/{cli-CoEDYj8W.mjs → cli-DDqetU5U.mjs} +2 -2
- package/dist/{cli-CoEDYj8W.mjs.map → cli-DDqetU5U.mjs.map} +1 -1
- package/dist/{compose-gqT23ikn.mjs → compose-C8VR6L7_.mjs} +7 -10
- package/dist/compose-C8VR6L7_.mjs.map +1 -0
- package/dist/{compose-Lx9MIQ53.cjs → compose-Dqe_svmN.cjs} +6 -9
- package/dist/compose-Dqe_svmN.cjs.map +1 -0
- package/dist/deploy/public.cjs +6 -6
- package/dist/deploy/public.mjs +6 -6
- package/dist/{deploy-CS4uJ6hI.cjs → deploy-C7bSw5_V.cjs} +5 -5
- package/dist/{deploy-CS4uJ6hI.cjs.map → deploy-C7bSw5_V.cjs.map} +1 -1
- package/dist/{deploy-GLyTB9G_.mjs → deploy-c9Klc6Km.mjs} +5 -5
- package/dist/{deploy-GLyTB9G_.mjs.map → deploy-c9Klc6Km.mjs.map} +1 -1
- package/dist/{dns-NcwajiE-.cjs → dns-BTLYXhFN.cjs} +2 -2
- package/dist/{dns-NcwajiE-.cjs.map → dns-BTLYXhFN.cjs.map} +1 -1
- package/dist/{dns-CFgcutpi.mjs → dns-BuiKRYPo.mjs} +2 -2
- package/dist/{dns-CFgcutpi.mjs.map → dns-BuiKRYPo.mjs.map} +1 -1
- package/dist/{dokploy-CFilXRFD.cjs → dokploy-DdzUYLQF.cjs} +2 -2
- package/dist/{dokploy-CFilXRFD.cjs.map → dokploy-DdzUYLQF.cjs.map} +1 -1
- package/dist/{dokploy-DCOTyvW4.mjs → dokploy-DgcZgtDu.mjs} +2 -2
- package/dist/{dokploy-DCOTyvW4.mjs.map → dokploy-DgcZgtDu.mjs.map} +1 -1
- package/dist/{encryption-CApKYBgu.cjs → encryption-BLXmmIL4.cjs} +2 -2
- package/dist/{encryption-CApKYBgu.cjs.map → encryption-BLXmmIL4.cjs.map} +1 -1
- package/dist/{encryption-C_4hcRYV.mjs → encryption-DqeIqdFb.mjs} +2 -2
- package/dist/{encryption-C_4hcRYV.mjs.map → encryption-DqeIqdFb.mjs.map} +1 -1
- package/dist/{engine--meAuuRD.mjs → engine-BFbTLmO-.mjs} +3 -3
- package/dist/{engine--meAuuRD.mjs.map → engine-BFbTLmO-.mjs.map} +1 -1
- package/dist/{engine-Ds_PoVet.cjs → engine-CcwSJHyq.cjs} +3 -3
- package/dist/{engine-Ds_PoVet.cjs.map → engine-CcwSJHyq.cjs.map} +1 -1
- package/dist/{github-Dn9-X2Dl.mjs → github-BGPuFjD0.mjs} +4 -4
- package/dist/{github-Dn9-X2Dl.mjs.map → github-BGPuFjD0.mjs.map} +1 -1
- package/dist/{github-BJuKcvvW.cjs → github-DeELJEZo.cjs} +4 -4
- package/dist/{github-BJuKcvvW.cjs.map → github-DeELJEZo.cjs.map} +1 -1
- package/dist/index.cjs +46 -46
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +46 -46
- package/dist/index.mjs.map +1 -1
- package/dist/{migrate-D76j6mtH.mjs → migrate-B7ePhUk3.mjs} +2 -2
- package/dist/{migrate-D76j6mtH.mjs.map → migrate-B7ePhUk3.mjs.map} +1 -1
- package/dist/{migrate-CeXyAch4.cjs → migrate-C5ttpcqf.cjs} +2 -2
- package/dist/{migrate-CeXyAch4.cjs.map → migrate-C5ttpcqf.cjs.map} +1 -1
- package/dist/{migrate-BfgQsxjM.cjs → migrate-DKLMFCox.cjs} +2 -2
- package/dist/{migrate-BfgQsxjM.cjs.map → migrate-DKLMFCox.cjs.map} +1 -1
- package/dist/{migrate-BzQv3iSj.mjs → migrate-Dv5L_S1z.mjs} +2 -2
- package/dist/{migrate-BzQv3iSj.mjs.map → migrate-Dv5L_S1z.mjs.map} +1 -1
- package/dist/{resolve-C2REGeLT.cjs → resolve-C8Otg8xZ.cjs} +3 -3
- package/dist/{resolve-C2REGeLT.cjs.map → resolve-C8Otg8xZ.cjs.map} +1 -1
- package/dist/{resolve-q3UJe1hP.mjs → resolve-CiCa2IEH.mjs} +3 -3
- package/dist/{resolve-q3UJe1hP.mjs.map → resolve-CiCa2IEH.mjs.map} +1 -1
- package/dist/{rollback-DDYopXJE.mjs → rollback-D1R0Vz0b.mjs} +4 -4
- package/dist/{rollback-DDYopXJE.mjs.map → rollback-D1R0Vz0b.mjs.map} +1 -1
- package/dist/{rollback-BvOo0hrK.cjs → rollback-DpY3YX-A.cjs} +4 -4
- package/dist/{rollback-BvOo0hrK.cjs.map → rollback-DpY3YX-A.cjs.map} +1 -1
- package/dist/{seeds-BvishTnF.cjs → seeds-C0RAykNG.cjs} +45 -10
- package/dist/seeds-C0RAykNG.cjs.map +1 -0
- package/dist/{seeds-DXJorkCJ.mjs → seeds-CcNV8zn9.mjs} +41 -12
- package/dist/seeds-CcNV8zn9.mjs.map +1 -0
- package/dist/{sniffer-DgyXiiSw.mjs → sniffer-1WA7Slw2.mjs} +6 -6
- package/dist/{sniffer-DgyXiiSw.mjs.map → sniffer-1WA7Slw2.mjs.map} +1 -1
- package/dist/{sniffer-MBR2lmPO.cjs → sniffer-DYmNg4Go.cjs} +6 -6
- package/dist/{sniffer-MBR2lmPO.cjs.map → sniffer-DYmNg4Go.cjs.map} +1 -1
- package/dist/target/public.cjs +1 -1
- package/dist/target/public.mjs +1 -1
- package/package.json +15 -15
- package/dist/compose-Lx9MIQ53.cjs.map +0 -1
- package/dist/compose-gqT23ikn.mjs.map +0 -1
- package/dist/seeds-BvishTnF.cjs.map +0 -1
- package/dist/seeds-DXJorkCJ.mjs.map +0 -1
|
@@ -8,7 +8,7 @@ import { n as deployIdentity } from "./identity-CBXr4wNi.mjs";
|
|
|
8
8
|
import { a as startTelemetryCode, n as runtimeFor, s as writeTelemetryModule, u as telemetryArgs } from "./EndpointGenerator-CvLX8bpx.mjs";
|
|
9
9
|
import { d as ConstructGenerator, f as output, i as discover } from "./discover-Ca8U75dl.mjs";
|
|
10
10
|
import { ConfigNotFound, NotInAnApp, loadWorkspaceAppInfo, loadWorkspaceConfig } from "./config.mjs";
|
|
11
|
-
import { c as runtimeOf } from "./resolve-
|
|
11
|
+
import { c as runtimeOf } from "./resolve-CiCa2IEH.mjs";
|
|
12
12
|
import { basename, dirname, isAbsolute, join, parse, relative, resolve, sep } from "node:path";
|
|
13
13
|
import { constants, existsSync, readFileSync } from "node:fs";
|
|
14
14
|
import { appendFile, chmod, copyFile, mkdir, readFile, readdir, rm, stat, writeFile } from "node:fs/promises";
|
|
@@ -16,7 +16,7 @@ import { homedir, hostname, networkInterfaces, userInfo } from "node:os";
|
|
|
16
16
|
import { execFile, spawn } from "node:child_process";
|
|
17
17
|
import { createServer } from "node:net";
|
|
18
18
|
import { createCipheriv, createDecipheriv, createHash, randomBytes, randomInt } from "node:crypto";
|
|
19
|
-
import { CLIENT_IP_HEADER, DEFAULT_POSTGRES_VERSION, TELEMETRY_KEYS, cacheTable, cookieDomain, dependenciesOf, dependentsOf, drawSecret, externalApiUrl, kebabCase, mobileOrigins, provideKey, providedKeyFor, provisionOrder, publicEnvFor, schemeBase } from "@geekmidas/manifest";
|
|
19
|
+
import { CLIENT_IP_HEADER, DEFAULT_POSTGRES_VERSION, PUBLIC_PREFIX, TELEMETRY_KEYS, cacheTable, cookieDomain, dependenciesOf, dependentsOf, drawSecret, externalApiUrl, kebabCase, mobileOrigins, provideKey, providedKeyFor, provisionOrder, publicEnvFor, schemeBase } from "@geekmidas/manifest";
|
|
20
20
|
import { formatKeyring, generateKeyring } from "@geekmidas/constructs/encryption";
|
|
21
21
|
import { ownerRole, readerRole, roleStatements } from "@geekmidas/db/pg/roles";
|
|
22
22
|
import * as snsUrl from "@geekmidas/events/sns/url";
|
|
@@ -2641,6 +2641,40 @@ function isUnder(file, dir) {
|
|
|
2641
2641
|
return rel !== "" && !rel.startsWith("..") && !isAbsolute(rel) ? !rel.startsWith(`..${sep}`) : false;
|
|
2642
2642
|
}
|
|
2643
2643
|
//#endregion
|
|
2644
|
+
//#region src/compose/siteBuild.ts
|
|
2645
|
+
/**
|
|
2646
|
+
* What a site's image is built with: every value its build reads, resolved for
|
|
2647
|
+
* the stage — and so every `ARG` its Dockerfile declares.
|
|
2648
|
+
*
|
|
2649
|
+
* - **Its edges' public values and its own address**, under the variant's
|
|
2650
|
+
* public prefix (`publicEnvFor`): what the bundler inlines.
|
|
2651
|
+
* - **Its own address under its own name** (`WEB_URL`). Server code runs at
|
|
2652
|
+
* build too — `next build` prerenders, and a page's `metadataBase` is read
|
|
2653
|
+
* then — and `gkm exec -- next build` has it locally, so the image build
|
|
2654
|
+
* must, or a site that builds locally fails in CI.
|
|
2655
|
+
* - **Every stage secret already named for the bundle**: a key carrying the
|
|
2656
|
+
* variant's public prefix (`NEXT_PUBLIC_APP_STORE_URL` on a `next` site) was
|
|
2657
|
+
* declared public by whoever named it, so it is passed. Anything else is
|
|
2658
|
+
* not: a secret without the prefix never reaches a site's build.
|
|
2659
|
+
*
|
|
2660
|
+
* A value the stage resolves to nothing is left out rather than passed empty.
|
|
2661
|
+
* A derived value wins over a stage secret of the same name: the site's
|
|
2662
|
+
* addresses are the construct's, not a copy someone set.
|
|
2663
|
+
*/
|
|
2664
|
+
function siteBuildArgs(site, manifest, resolve, secrets) {
|
|
2665
|
+
const args = {};
|
|
2666
|
+
const own = provideKey(site.id, "url");
|
|
2667
|
+
const ownValue = resolve(own);
|
|
2668
|
+
if (ownValue) args[own] = ownValue;
|
|
2669
|
+
for (const [key, source] of Object.entries(publicEnvFor(site, manifest))) {
|
|
2670
|
+
const value = resolve(source);
|
|
2671
|
+
if (value) args[key] = value;
|
|
2672
|
+
}
|
|
2673
|
+
const prefix = PUBLIC_PREFIX[site.variant];
|
|
2674
|
+
for (const [key, value] of Object.entries(secrets)) if (key.startsWith(prefix) && args[key] === void 0 && value) args[key] = value;
|
|
2675
|
+
return args;
|
|
2676
|
+
}
|
|
2677
|
+
//#endregion
|
|
2644
2678
|
//#region src/exec/imageBuild.ts
|
|
2645
2679
|
/**
|
|
2646
2680
|
* Set by a site's Dockerfile in its builder stage: this process is building
|
|
@@ -5686,12 +5720,7 @@ function localPlan(workspace, manifest, fakes = {}, credentialFakes = {}) {
|
|
|
5686
5720
|
function sitePublicArgs(manifest, appName, env) {
|
|
5687
5721
|
const declaration = Object.entries(manifest).find(([id, d]) => d.kind === "site" && appKey(id) === appName)?.[1];
|
|
5688
5722
|
if (declaration?.kind !== "site") return {};
|
|
5689
|
-
|
|
5690
|
-
for (const key of Object.keys(publicEnvFor(declaration, manifest))) {
|
|
5691
|
-
const value = env[key];
|
|
5692
|
-
if (value !== void 0) args[key] = value;
|
|
5693
|
-
}
|
|
5694
|
-
return args;
|
|
5723
|
+
return siteBuildArgs(declaration, manifest, (key) => env[key], {});
|
|
5695
5724
|
}
|
|
5696
5725
|
/**
|
|
5697
5726
|
* Every key a plan resolves, with each container addressed by its service
|
|
@@ -7144,7 +7173,7 @@ function workerDockerfile(worker, host, options) {
|
|
|
7144
7173
|
*/
|
|
7145
7174
|
function siteDockerfile(appName, app, options) {
|
|
7146
7175
|
const declared = options.manifest ? Object.entries(options.manifest).find(([id, d]) => d.kind === "site" && appKey(id) === appName)?.[1] : void 0;
|
|
7147
|
-
const publicUrlArgs = options.publicUrlArgs ?? (declared?.kind === "site" && options.manifest ? Object.keys(publicEnvFor(declared, options.manifest)) : getPublicUrlArgNames(app));
|
|
7176
|
+
const publicUrlArgs = options.publicUrlArgs ?? (declared?.kind === "site" && options.manifest ? [provideKey(declared.id, "url"), ...Object.keys(publicEnvFor(declared, options.manifest))] : getPublicUrlArgNames(app));
|
|
7148
7177
|
const webOpts = {
|
|
7149
7178
|
...options.image,
|
|
7150
7179
|
publicUrlArgs
|
|
@@ -7311,7 +7340,7 @@ async function createDnsProvider(options) {
|
|
|
7311
7340
|
});
|
|
7312
7341
|
}
|
|
7313
7342
|
if (provider === "godaddy") {
|
|
7314
|
-
const { GoDaddyProvider } = await import("./GoDaddyProvider-
|
|
7343
|
+
const { GoDaddyProvider } = await import("./GoDaddyProvider-DNOK1nFq.mjs");
|
|
7315
7344
|
return new GoDaddyProvider(options.godaddy ?? {});
|
|
7316
7345
|
}
|
|
7317
7346
|
if (provider === "cloudflare") throw new DnsProviderNotImplemented("cloudflare");
|
|
@@ -8160,6 +8189,6 @@ function reportPlannedSeeds(planned, log) {
|
|
|
8160
8189
|
for (const { folder, seeds } of planned) log(`🌱 ${folder}: would run ${seeds.length} (${seeds.join(", ")})`);
|
|
8161
8190
|
}
|
|
8162
8191
|
//#endregion
|
|
8163
|
-
export { devServicesUsed as $,
|
|
8192
|
+
export { devServicesUsed as $, resolveHost as $n, isUnder as $t, assertStageProvidersEnabled as A, appTelemetry as An, isPortAvailable as At, workerDockerfileOf as B, fakeKey as Bn, maskPassword as Bt, setApplicationId as C, stackRedis as Cn, cacheBackendFor as Ct, DnsRecordsUnreadable as D, TELEMETRY_CONTAINER as Dn, createCredentialsPreload as Dt, setPostgresBackupId as E, localRolePassword as En, storageBackendFor as Et, DockerPushFailed as F, usesTelemetry as Fn, isRemoteStore as Ft, CronGenerator as G, LOCAL_LOGS_EMAIL as Gn, imageLayout as Gt, workerBundleName as H, portsOf as Hn, toEmbeddableSecrets as Ht, appDockerfile as I, EMULATOR_ACCESS_KEY_ID as In, secretsStoreFor as It, DEV_SERVICES as J, logsService as Jn, detectPackageManager as Jt, validateImageRef as K, LOGS_SERVICE as Kn, TURBO_VERSION as Kt, dockerCommand as L, hostFor as Ln, storeFromConfig as Lt, stageProviderNotes as M, scopeTelemetryEnv as Mn, loadPortState as Mt, PROVIDER_KINDS as N, surfaceClientTraced as Nn, loadSecretsForApp as Nt, createDnsProvider as O, planFor as On, createEntryWrapper as Ot, DockerBuildFailed as P, telemetryOf as Pn, prepareEntryCredentials as Pt, assertDevServicesFlag as Q, isMainFrontendApp as Qn, siteBuildArgs as Qt, ensureDockerignore as R, DEFAULT_IMAGES as Rn, store_exports as Rt, recordRollback as S, runsRedis as Sn, composeFor as St, setGeneratedSecret as T, envFor as Tn, providerOf as Tt, workerEntryDir as U, postgresImage as Un, withCustomSecret as Ut, WorkerGenerator as V, portKeys as Vn, storage_exports as Vt, QueueGenerator as W, primaryPortKey as Wn, composeBuildPaths as Wt, ExternalServicesNotConfigured as X, withLogsPassword as Xn, imageBuildCredentials as Xt, DevServicesNeedServerTarget as Y, stackLogs as Yn, findBuildRoot as Yt, STORAGE_KEY_PAIR as Z, NoDomainForStage as Zn, isImageBuild as Zt, createComposeState as _, readKey as _n, LEGACY_LOCAL_LOGIN as _t, dnsResources as a, postgresDatabaseNames as an, appEnvKeys as at, getGeneratedSecret as b, STACK_CACHE as bn, pgClient as bt, describeActor as c, LOCAL_RABBITMQ_USER as cn, workerEnvKeys as ct, extractSubdomain as d, postgresSuperuser as dn, constructGlobs as dt, workerUnits as en, externalServices as et, findRootDomain as f, readLocalCredentials as fn, derivedContainers as ft, asDokployState as g, projectKey as gn, forgetState as gt, verifyDnsRecords as h, keystoreProject as hn, LOCAL_CA_PATH as ht, dnsRecordResource as i, bucketPolicies as in, suppliedOnly as it, provisionCommand as j, isTelemetryKey as jn, loadEnvFiles as jt, StageProviderDisabled as k, resourceName as kn, findAvailablePort as kt, isCi as l, loadLocalCredentials as ln, FAKE_ENV as lt, orchestrateDns as m, getKeyPath as mn, workspace_exports as mt, reportDatabaseRuns as n, applyPolicies as nn, requiredStageKeys as nt, recordDnsChanges as o, postgresStatements as on, dockerfileOf as ot, normalizeDnsConfig as p, FileSecretsStore as pn, reconcileWorkspace as pt, AllowDevServicesTakesNoValue as q, logsAccess as qn, WORKER_PORT as qt, reportPlannedSeeds as r, applyPostgres as rn, stageServiceDeclarations as rt, currentActor as s, quoteIdentifier as sn, networkEnv as st, DeploySeedsFailed as t, applyBuckets as tn, reportDevServices as tt, DeployJournal as u, postgresRoleSlug as un, backendsOf as ut, createEmptyState as v, withGeneratedSecrets as vn, ensurePostgresLogin as vt, setBackupState as w, withRedisPassword as wn, eventsBackendFor as wt, recordRelease as x, redisService as xn, CLUSTER_DATABASE as xt, getBackupState as y, REDIS_SERVICE as yn, bucketClient as yt, workerDockerfile as z, describeServices as zn, initStageSecrets as zt };
|
|
8164
8193
|
|
|
8165
|
-
//# sourceMappingURL=seeds-
|
|
8194
|
+
//# sourceMappingURL=seeds-CcNV8zn9.mjs.map
|