@mondaydotcomorg/z2h-cli 0.34.0 → 0.34.1
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/commands/backend.js +2 -2
- package/dist/commands/deploy.js +9 -8
- package/dist/constants.d.ts +1 -13
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +48 -45
- package/dist/esm/commands/backend.mjs +1 -1
- package/dist/esm/commands/deploy.mjs +2 -1
- package/dist/esm/constants.d.ts +1 -13
- package/dist/esm/constants.d.ts.map +1 -1
- package/dist/esm/constants.mjs +2 -35
- package/dist/esm/util/app-name.mjs +1 -1
- package/dist/esm/util/git/repo.mjs +1 -1
- package/dist/esm/util/s3/client.mjs +1 -1
- package/dist/esm/util/s3/upload.mjs +1 -1
- package/dist/util/app-name.js +6 -6
- package/dist/util/git/repo.js +2 -2
- package/dist/util/s3/client.js +2 -2
- package/dist/util/s3/upload.js +2 -2
- package/package.json +2 -2
- package/src/constants.ts +19 -47
package/dist/commands/backend.js
CHANGED
|
@@ -10,7 +10,7 @@ const util_machineIdentity = require('../util/machine-identity.js');
|
|
|
10
10
|
const backend_handlers = require('../backend/handlers.js');
|
|
11
11
|
const backend_detectIntegrations = require('../backend/detect-integrations.js');
|
|
12
12
|
const util_s3_client = require('../util/s3/client.js');
|
|
13
|
-
const
|
|
13
|
+
const z2hSharedUtils = require('@mondaydotcomorg/z2h-shared-utils');
|
|
14
14
|
const backend_client = require('../backend/client.js');
|
|
15
15
|
const backend_formatSandboxRun = require('../backend/format-sandbox-run.js');
|
|
16
16
|
const backend_validate = require('../backend/validate.js');
|
|
@@ -41,7 +41,7 @@ async function readDetectAndUpload(appDir, prefix, appName, version, deployedBy,
|
|
|
41
41
|
}
|
|
42
42
|
const s3 = util_s3_client.getS3Client();
|
|
43
43
|
const meta = JSON.stringify({ version, deployedBy, handlers: Object.keys(handlers) });
|
|
44
|
-
const put = (key, body, contentType) => s3.send(new clientS3.PutObjectCommand({ Bucket:
|
|
44
|
+
const put = (key, body, contentType) => s3.send(new clientS3.PutObjectCommand({ Bucket: z2hSharedUtils.BUCKET_WRITE_NAME, Key: key, Body: body, ContentType: contentType }));
|
|
45
45
|
await Promise.all([
|
|
46
46
|
...Object.entries(handlers).map(([name, code]) => put(`${prefix}/${name}.js`, code, 'application/javascript')),
|
|
47
47
|
put(`${prefix}/meta.json`, meta, 'application/json'),
|
package/dist/commands/deploy.js
CHANGED
|
@@ -23,6 +23,7 @@ const util_errors = require('../util/errors.js');
|
|
|
23
23
|
const commands_backend = require('./backend.js');
|
|
24
24
|
const commands_build = require('./build.js');
|
|
25
25
|
const commands_tag = require('./tag.js');
|
|
26
|
+
const z2hSharedUtils = require('@mondaydotcomorg/z2h-shared-utils');
|
|
26
27
|
|
|
27
28
|
const _interopDefault = e => e && e.__esModule ? e : { default: e };
|
|
28
29
|
|
|
@@ -97,7 +98,7 @@ async function uploadAndRegister(opts) {
|
|
|
97
98
|
isPreview,
|
|
98
99
|
});
|
|
99
100
|
try {
|
|
100
|
-
util_logger.info(`uploading ${isPreview ? 'preview ' : ''}build → s3://${
|
|
101
|
+
util_logger.info(`uploading ${isPreview ? 'preview ' : ''}build → s3://${z2hSharedUtils.BUCKET_WRITE_NAME}/${keyPrefix}/`);
|
|
101
102
|
await util_s3_upload.uploadDir(paths.shadowBuild, keyPrefix);
|
|
102
103
|
await util_broker_app.registerOrUpdateApp({
|
|
103
104
|
appName,
|
|
@@ -135,10 +136,10 @@ async function deployPreview({ paths, consumerName, appName, token, opts }) {
|
|
|
135
136
|
const { previewId } = await shadow_prepare.resolvePortAndMetadata(paths, util_appName.cleanAppName(consumerName));
|
|
136
137
|
const previewSlug = util_appName.buildPreviewSlug(consumerName, previewId);
|
|
137
138
|
const previewAppName = util_appName.mfAppName(previewSlug);
|
|
138
|
-
const keyPrefix = `${
|
|
139
|
+
const keyPrefix = `${z2hSharedUtils.S3_PREVIEWS_FOLDER}/${previewAppName}/MF`;
|
|
139
140
|
// Full CDN URL, not a relative path — trident-skeleton uses a manifest
|
|
140
141
|
// entry's `url` verbatim as the asset base, never joined with its own mfUrl.
|
|
141
|
-
const url = `${
|
|
142
|
+
const url = `${z2hSharedUtils.BUCKET_READ_DNS_URL}/${keyPrefix}`;
|
|
142
143
|
// No catch-all: every stage below tags its own DeployError reason at the throw site,
|
|
143
144
|
// and anything unclassified reports as `unknown` via reasonOf() in runCommand.
|
|
144
145
|
const nextVersion = (await util_auth_brokerCredentialProvider.fetchDeployVersion(previewAppName)) + 1;
|
|
@@ -173,7 +174,7 @@ async function deployPreview({ paths, consumerName, appName, token, opts }) {
|
|
|
173
174
|
appName,
|
|
174
175
|
previewId,
|
|
175
176
|
previewAppName,
|
|
176
|
-
bucket:
|
|
177
|
+
bucket: z2hSharedUtils.BUCKET_WRITE_NAME,
|
|
177
178
|
keyPrefix,
|
|
178
179
|
url,
|
|
179
180
|
previewUrl,
|
|
@@ -225,16 +226,16 @@ async function deployLive({ paths, consumerName, appName, token, opts }) {
|
|
|
225
226
|
}
|
|
226
227
|
util_logger.info('reading current Z2H manifest');
|
|
227
228
|
const keyPrefix = `${appName}/${nextVersion}`;
|
|
228
|
-
const url = `${
|
|
229
|
+
const url = `${z2hSharedUtils.BUCKET_READ_DNS_URL}/${keyPrefix}`;
|
|
229
230
|
util_logger.info('building');
|
|
230
231
|
const entry = await buildAndStamp({ paths, publicUrl: url, nextVersion, gitRemote, prebuiltDir: opts.prebuiltDir });
|
|
231
232
|
if (opts.dryRun) {
|
|
232
|
-
util_logger.output(`[z2h-cli] dry-run: would upload to s3://${
|
|
233
|
+
util_logger.output(`[z2h-cli] dry-run: would upload to s3://${z2hSharedUtils.BUCKET_WRITE_NAME}/${keyPrefix}/ as v${version}`, {
|
|
233
234
|
ok: true,
|
|
234
235
|
dryRun: true,
|
|
235
236
|
appName,
|
|
236
237
|
version,
|
|
237
|
-
bucket:
|
|
238
|
+
bucket: z2hSharedUtils.BUCKET_WRITE_NAME,
|
|
238
239
|
keyPrefix,
|
|
239
240
|
url,
|
|
240
241
|
entry,
|
|
@@ -285,7 +286,7 @@ async function deployLive({ paths, consumerName, appName, token, opts }) {
|
|
|
285
286
|
ok: true,
|
|
286
287
|
appName,
|
|
287
288
|
version: nextVersion,
|
|
288
|
-
bucket:
|
|
289
|
+
bucket: z2hSharedUtils.BUCKET_WRITE_NAME,
|
|
289
290
|
keyPrefix,
|
|
290
291
|
url,
|
|
291
292
|
liveUrl,
|
package/dist/constants.d.ts
CHANGED
|
@@ -8,19 +8,7 @@ export declare const SHADOW_DEV_DEPS: Record<string, string>;
|
|
|
8
8
|
export declare const MIN_PORT = 13000;
|
|
9
9
|
export declare const MAX_PORT = 19999;
|
|
10
10
|
export declare const GITIGNORE_ENTRIES: string[];
|
|
11
|
-
export
|
|
12
|
-
export declare const REGION = "us-east-1";
|
|
13
|
-
export declare const BUCKET_WRITE_URL = "https://prod-use1-bigbrain-zth-mf-assets.s3.us-east-1.amazonaws.com";
|
|
14
|
-
export declare const BUCKET_READ_DNS_NAME = "bigbrain-zth-mf-assets";
|
|
15
|
-
export declare const BUCKET_READ_DNS_URL = "https://bigbrain-zth-mf-assets.bigbrain.me";
|
|
16
|
-
export declare const S3_PREVIEWS_FOLDER = "previews";
|
|
17
|
-
export declare const MANIFEST_KEY = "mf-assets";
|
|
18
|
-
export declare const MANIFEST_READ_URL = "https://bigbrain-zth-mf-assets.bigbrain.me/mf-assets";
|
|
19
|
-
export declare const S3_SKILLS_BUCKET_NAME = "prod-use1-bigbrain-zth-skills";
|
|
20
|
-
export declare const DATAVIZ_SKILLS_PREFIX = "dataviz/";
|
|
21
|
-
export declare const APP_NAME_PATTERN: RegExp;
|
|
22
|
-
export declare const PREVIEW_APP_NAME_PREFIX = "zth-preview-";
|
|
23
|
-
export { ALWAYS_ON_CHANNELS, DECLARED_INTEGRATIONS, type DeclaredIntegration } from '@mondaydotcomorg/z2h-shared-utils';
|
|
11
|
+
export { ALWAYS_ON_CHANNELS, APP_NAME_PATTERN, BUCKET_READ_DNS_NAME, BUCKET_READ_DNS_URL, BUCKET_WRITE_NAME, BUCKET_WRITE_URL, DATAVIZ_SKILLS_PREFIX, DECLARED_INTEGRATIONS, MANIFEST_KEY, MANIFEST_READ_URL, PREVIEW_APP_NAME_PREFIX, REGION, S3_PREVIEWS_FOLDER, S3_SKILLS_BUCKET_NAME, type DeclaredIntegration, } from '@mondaydotcomorg/z2h-shared-utils';
|
|
24
12
|
export declare const DEFAULT_BROKER_BASE_URL = "https://bigbrain-zth.bigbrain.me";
|
|
25
13
|
/**
|
|
26
14
|
* Resolves the broker origin (no trailing slash). Honors
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,eAAO,MAAM,eAAe,SAAS,CAAC;AAGtC,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAEjD,CAAC;AAKF,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAElD,CAAC;AAMF,eAAO,MAAM,QAAQ,QAAQ,CAAC;AAC9B,eAAO,MAAM,QAAQ,QAAQ,CAAC;AAG9B,eAAO,MAAM,iBAAiB,UAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,eAAO,MAAM,eAAe,SAAS,CAAC;AAGtC,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAEjD,CAAC;AAKF,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAElD,CAAC;AAMF,eAAO,MAAM,QAAQ,QAAQ,CAAC;AAC9B,eAAO,MAAM,QAAQ,QAAQ,CAAC;AAG9B,eAAO,MAAM,iBAAiB,UAAY,CAAC;AAI3C,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,EACrB,YAAY,EACZ,iBAAiB,EACjB,uBAAuB,EACvB,MAAM,EACN,kBAAkB,EAClB,qBAAqB,EACrB,KAAK,mBAAmB,GACzB,MAAM,mCAAmC,CAAC;AAK3C,eAAO,MAAM,uBAAuB,qCAAqC,CAAC;AAE1E;;;;GAIG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAID,wBAAgB,cAAc,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAGvD;AAKD,eAAO,MAAM,eAAe,iBAAiB,CAAC;AAG9C,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AAGnD,eAAO,MAAM,uBAAuB,gCAAgC,CAAC;AAMrE,eAAO,MAAM,iBAAiB,EAAG,eAAwB,CAAC;AAE1D;;;;;GAKG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAE7C"}
|
package/dist/constants.js
CHANGED
|
@@ -26,39 +26,6 @@ const MIN_PORT = 13000;
|
|
|
26
26
|
const MAX_PORT = 19999;
|
|
27
27
|
// ─────────── Gitignore entries auto-appended to the consumer's file ────
|
|
28
28
|
const GITIGNORE_ENTRIES = ['.zth/'];
|
|
29
|
-
// ─────────── Z2H deploy bucket / contract ─────────
|
|
30
|
-
// Source of truth for the bucket layout. The CLI uses these when configuring
|
|
31
|
-
// the S3 client + uploading; bigbrain-zth's STS broker imports them via
|
|
32
|
-
// `@mondaydotcomorg/z2h-cli/constants` to scope the per-deploy session
|
|
33
|
-
// policy to the same bucket + manifest key.
|
|
34
|
-
const BUCKET_WRITE_NAME = 'prod-use1-bigbrain-zth-mf-assets';
|
|
35
|
-
const REGION = 'us-east-1';
|
|
36
|
-
const BUCKET_WRITE_URL = `https://${BUCKET_WRITE_NAME}.s3.${REGION}.amazonaws.com`;
|
|
37
|
-
const BUCKET_READ_DNS_NAME = 'bigbrain-zth-mf-assets';
|
|
38
|
-
const BUCKET_READ_DNS_URL = `https://${BUCKET_READ_DNS_NAME}.bigbrain.me`;
|
|
39
|
-
// Root prefix for ephemeral preview uploads: `previews/<previewAppName>/MF/...`,
|
|
40
|
-
// where previewAppName is the preview's own `mf-zth-preview-<id>-<app>` name.
|
|
41
|
-
// Shared by the CLI (upload path) and bigbrain-zth (STS policy + manifest overlay).
|
|
42
|
-
const S3_PREVIEWS_FOLDER = 'previews';
|
|
43
|
-
// No `.json` extension — TridentSkeleton's `mfUrl` API appends `/mf-assets`
|
|
44
|
-
// to the bucket base when fetching, so the manifest must live at this exact
|
|
45
|
-
// key. See microfrontends/mf-bigbrain-zth/.../ZeroToHeroHost.tsx.
|
|
46
|
-
const MANIFEST_KEY = 'mf-assets';
|
|
47
|
-
const MANIFEST_READ_URL = `${BUCKET_READ_DNS_URL}/${MANIFEST_KEY}`;
|
|
48
|
-
// ─────────── Skills bucket (read-only) ─────────
|
|
49
|
-
// bigbrain-zth mints read-only STS creds scoped to this bucket (mintDatavizSkillsCredentials);
|
|
50
|
-
// bigbrain-zth-agent syncs from it into its vendor/ at pod startup (syncDatavizVendor).
|
|
51
|
-
// Both import from here so the two sides can't drift.
|
|
52
|
-
const S3_SKILLS_BUCKET_NAME = 'prod-use1-bigbrain-zth-skills';
|
|
53
|
-
// Prefix the dataviz design-system skills are published under
|
|
54
|
-
// (by data-cookbook's own CI on merge to master).
|
|
55
|
-
const DATAVIZ_SKILLS_PREFIX = 'dataviz/';
|
|
56
|
-
// ─────────── App-name slug — backend & CLI both honor this ─────
|
|
57
|
-
// Lowercase kebab-case, must start with a letter, 2-50 chars total. The
|
|
58
|
-
// backend STS broker rejects anything else with 400; the CLI can validate
|
|
59
|
-
// upfront for friendlier errors.
|
|
60
|
-
const APP_NAME_PATTERN = /^[a-z][a-z0-9-]{1,49}$/;
|
|
61
|
-
const PREVIEW_APP_NAME_PREFIX = 'zth-preview-';
|
|
62
29
|
// ─────────── Broker origin + npm registry (shared §3 contract) ─────
|
|
63
30
|
// The bigbrain-zth broker fronts both the STS credential route and the npm
|
|
64
31
|
// proxy. `Z2H_BROKER_BASE_URL` overrides the origin for tests/staging.
|
|
@@ -104,29 +71,65 @@ Object.defineProperty(exports, 'ALWAYS_ON_CHANNELS', {
|
|
|
104
71
|
enumerable: true,
|
|
105
72
|
get: () => z2hSharedUtils.ALWAYS_ON_CHANNELS
|
|
106
73
|
});
|
|
74
|
+
Object.defineProperty(exports, 'APP_NAME_PATTERN', {
|
|
75
|
+
enumerable: true,
|
|
76
|
+
get: () => z2hSharedUtils.APP_NAME_PATTERN
|
|
77
|
+
});
|
|
78
|
+
Object.defineProperty(exports, 'BUCKET_READ_DNS_NAME', {
|
|
79
|
+
enumerable: true,
|
|
80
|
+
get: () => z2hSharedUtils.BUCKET_READ_DNS_NAME
|
|
81
|
+
});
|
|
82
|
+
Object.defineProperty(exports, 'BUCKET_READ_DNS_URL', {
|
|
83
|
+
enumerable: true,
|
|
84
|
+
get: () => z2hSharedUtils.BUCKET_READ_DNS_URL
|
|
85
|
+
});
|
|
86
|
+
Object.defineProperty(exports, 'BUCKET_WRITE_NAME', {
|
|
87
|
+
enumerable: true,
|
|
88
|
+
get: () => z2hSharedUtils.BUCKET_WRITE_NAME
|
|
89
|
+
});
|
|
90
|
+
Object.defineProperty(exports, 'BUCKET_WRITE_URL', {
|
|
91
|
+
enumerable: true,
|
|
92
|
+
get: () => z2hSharedUtils.BUCKET_WRITE_URL
|
|
93
|
+
});
|
|
94
|
+
Object.defineProperty(exports, 'DATAVIZ_SKILLS_PREFIX', {
|
|
95
|
+
enumerable: true,
|
|
96
|
+
get: () => z2hSharedUtils.DATAVIZ_SKILLS_PREFIX
|
|
97
|
+
});
|
|
107
98
|
Object.defineProperty(exports, 'DECLARED_INTEGRATIONS', {
|
|
108
99
|
enumerable: true,
|
|
109
100
|
get: () => z2hSharedUtils.DECLARED_INTEGRATIONS
|
|
110
101
|
});
|
|
111
|
-
exports
|
|
102
|
+
Object.defineProperty(exports, 'MANIFEST_KEY', {
|
|
103
|
+
enumerable: true,
|
|
104
|
+
get: () => z2hSharedUtils.MANIFEST_KEY
|
|
105
|
+
});
|
|
106
|
+
Object.defineProperty(exports, 'MANIFEST_READ_URL', {
|
|
107
|
+
enumerable: true,
|
|
108
|
+
get: () => z2hSharedUtils.MANIFEST_READ_URL
|
|
109
|
+
});
|
|
110
|
+
Object.defineProperty(exports, 'PREVIEW_APP_NAME_PREFIX', {
|
|
111
|
+
enumerable: true,
|
|
112
|
+
get: () => z2hSharedUtils.PREVIEW_APP_NAME_PREFIX
|
|
113
|
+
});
|
|
114
|
+
Object.defineProperty(exports, 'REGION', {
|
|
115
|
+
enumerable: true,
|
|
116
|
+
get: () => z2hSharedUtils.REGION
|
|
117
|
+
});
|
|
118
|
+
Object.defineProperty(exports, 'S3_PREVIEWS_FOLDER', {
|
|
119
|
+
enumerable: true,
|
|
120
|
+
get: () => z2hSharedUtils.S3_PREVIEWS_FOLDER
|
|
121
|
+
});
|
|
122
|
+
Object.defineProperty(exports, 'S3_SKILLS_BUCKET_NAME', {
|
|
123
|
+
enumerable: true,
|
|
124
|
+
get: () => z2hSharedUtils.S3_SKILLS_BUCKET_NAME
|
|
125
|
+
});
|
|
112
126
|
exports.BROKER_NPM_SCOPE = BROKER_NPM_SCOPE;
|
|
113
|
-
exports.BUCKET_READ_DNS_NAME = BUCKET_READ_DNS_NAME;
|
|
114
|
-
exports.BUCKET_READ_DNS_URL = BUCKET_READ_DNS_URL;
|
|
115
|
-
exports.BUCKET_WRITE_NAME = BUCKET_WRITE_NAME;
|
|
116
|
-
exports.BUCKET_WRITE_URL = BUCKET_WRITE_URL;
|
|
117
|
-
exports.DATAVIZ_SKILLS_PREFIX = DATAVIZ_SKILLS_PREFIX;
|
|
118
127
|
exports.DEFAULT_BROKER_BASE_URL = DEFAULT_BROKER_BASE_URL;
|
|
119
128
|
exports.GITIGNORE_ENTRIES = GITIGNORE_ENTRIES;
|
|
120
|
-
exports.MANIFEST_KEY = MANIFEST_KEY;
|
|
121
|
-
exports.MANIFEST_READ_URL = MANIFEST_READ_URL;
|
|
122
129
|
exports.MAX_PORT = MAX_PORT;
|
|
123
130
|
exports.MIN_PORT = MIN_PORT;
|
|
124
131
|
exports.NPM_BROKER_PATH = NPM_BROKER_PATH;
|
|
125
|
-
exports.PREVIEW_APP_NAME_PREFIX = PREVIEW_APP_NAME_PREFIX;
|
|
126
132
|
exports.PUBLIC_NPM_REGISTRY_URL = PUBLIC_NPM_REGISTRY_URL;
|
|
127
|
-
exports.REGION = REGION;
|
|
128
|
-
exports.S3_PREVIEWS_FOLDER = S3_PREVIEWS_FOLDER;
|
|
129
|
-
exports.S3_SKILLS_BUCKET_NAME = S3_SKILLS_BUCKET_NAME;
|
|
130
133
|
exports.SHADOW_DEV_DEPS = SHADOW_DEV_DEPS;
|
|
131
134
|
exports.SHADOW_DIR_NAME = SHADOW_DIR_NAME;
|
|
132
135
|
exports.SHADOW_SCRIPTS = SHADOW_SCRIPTS;
|
|
@@ -8,7 +8,7 @@ import { whoAmI } from '../util/machine-identity.mjs';
|
|
|
8
8
|
import { readHandlers } from '../backend/handlers.mjs';
|
|
9
9
|
import { detectIntegrations } from '../backend/detect-integrations.mjs';
|
|
10
10
|
import { getS3Client } from '../util/s3/client.mjs';
|
|
11
|
-
import { BUCKET_WRITE_NAME } from '
|
|
11
|
+
import { BUCKET_WRITE_NAME } from '@mondaydotcomorg/z2h-shared-utils';
|
|
12
12
|
import { runSandbox } from '../backend/client.mjs';
|
|
13
13
|
import { formatSandboxRun } from '../backend/format-sandbox-run.mjs';
|
|
14
14
|
import { validateHandlerSource } from '../backend/validate.mjs';
|
|
@@ -4,7 +4,7 @@ import { info, output, getOutputMode, warn } from '../util/logger.mjs';
|
|
|
4
4
|
import { resolveConsumerPaths } from '../shadow/paths.mjs';
|
|
5
5
|
import { fetchAppTags, fetchTagCatalog, setAppTags } from '../util/tags.mjs';
|
|
6
6
|
import { uploadDir } from '../util/s3/upload.mjs';
|
|
7
|
-
import {
|
|
7
|
+
import { brokerBaseUrl, routingHeaders } from '../constants.mjs';
|
|
8
8
|
import { fetchDeployVersion, brokerCredentialProvider } from '../util/auth/broker-credential-provider.mjs';
|
|
9
9
|
import { readZthAuth } from '../util/auth/auth-store.mjs';
|
|
10
10
|
import { validateAppName, cleanAppName, mfAppName, buildPreviewSlug } from '../util/app-name.mjs';
|
|
@@ -21,6 +21,7 @@ import { tagDeployError, DeployError, grantReasonForStatus } from '../util/error
|
|
|
21
21
|
import { deployBackend } from './backend.mjs';
|
|
22
22
|
import { buildCommand } from './build.mjs';
|
|
23
23
|
import { promptForTags } from './tag.mjs';
|
|
24
|
+
import { BUCKET_WRITE_NAME, S3_PREVIEWS_FOLDER, BUCKET_READ_DNS_URL } from '@mondaydotcomorg/z2h-shared-utils';
|
|
24
25
|
|
|
25
26
|
// Should be run from the consumer app directory — uses process.cwd() to locate it.
|
|
26
27
|
async function deployCommand(opts = {}) {
|
package/dist/esm/constants.d.ts
CHANGED
|
@@ -8,19 +8,7 @@ export declare const SHADOW_DEV_DEPS: Record<string, string>;
|
|
|
8
8
|
export declare const MIN_PORT = 13000;
|
|
9
9
|
export declare const MAX_PORT = 19999;
|
|
10
10
|
export declare const GITIGNORE_ENTRIES: string[];
|
|
11
|
-
export
|
|
12
|
-
export declare const REGION = "us-east-1";
|
|
13
|
-
export declare const BUCKET_WRITE_URL = "https://prod-use1-bigbrain-zth-mf-assets.s3.us-east-1.amazonaws.com";
|
|
14
|
-
export declare const BUCKET_READ_DNS_NAME = "bigbrain-zth-mf-assets";
|
|
15
|
-
export declare const BUCKET_READ_DNS_URL = "https://bigbrain-zth-mf-assets.bigbrain.me";
|
|
16
|
-
export declare const S3_PREVIEWS_FOLDER = "previews";
|
|
17
|
-
export declare const MANIFEST_KEY = "mf-assets";
|
|
18
|
-
export declare const MANIFEST_READ_URL = "https://bigbrain-zth-mf-assets.bigbrain.me/mf-assets";
|
|
19
|
-
export declare const S3_SKILLS_BUCKET_NAME = "prod-use1-bigbrain-zth-skills";
|
|
20
|
-
export declare const DATAVIZ_SKILLS_PREFIX = "dataviz/";
|
|
21
|
-
export declare const APP_NAME_PATTERN: RegExp;
|
|
22
|
-
export declare const PREVIEW_APP_NAME_PREFIX = "zth-preview-";
|
|
23
|
-
export { ALWAYS_ON_CHANNELS, DECLARED_INTEGRATIONS, type DeclaredIntegration } from '@mondaydotcomorg/z2h-shared-utils';
|
|
11
|
+
export { ALWAYS_ON_CHANNELS, APP_NAME_PATTERN, BUCKET_READ_DNS_NAME, BUCKET_READ_DNS_URL, BUCKET_WRITE_NAME, BUCKET_WRITE_URL, DATAVIZ_SKILLS_PREFIX, DECLARED_INTEGRATIONS, MANIFEST_KEY, MANIFEST_READ_URL, PREVIEW_APP_NAME_PREFIX, REGION, S3_PREVIEWS_FOLDER, S3_SKILLS_BUCKET_NAME, type DeclaredIntegration, } from '@mondaydotcomorg/z2h-shared-utils';
|
|
24
12
|
export declare const DEFAULT_BROKER_BASE_URL = "https://bigbrain-zth.bigbrain.me";
|
|
25
13
|
/**
|
|
26
14
|
* Resolves the broker origin (no trailing slash). Honors
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,eAAO,MAAM,eAAe,SAAS,CAAC;AAGtC,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAEjD,CAAC;AAKF,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAElD,CAAC;AAMF,eAAO,MAAM,QAAQ,QAAQ,CAAC;AAC9B,eAAO,MAAM,QAAQ,QAAQ,CAAC;AAG9B,eAAO,MAAM,iBAAiB,UAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,eAAO,MAAM,eAAe,SAAS,CAAC;AAGtC,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAEjD,CAAC;AAKF,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAElD,CAAC;AAMF,eAAO,MAAM,QAAQ,QAAQ,CAAC;AAC9B,eAAO,MAAM,QAAQ,QAAQ,CAAC;AAG9B,eAAO,MAAM,iBAAiB,UAAY,CAAC;AAI3C,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,EACrB,YAAY,EACZ,iBAAiB,EACjB,uBAAuB,EACvB,MAAM,EACN,kBAAkB,EAClB,qBAAqB,EACrB,KAAK,mBAAmB,GACzB,MAAM,mCAAmC,CAAC;AAK3C,eAAO,MAAM,uBAAuB,qCAAqC,CAAC;AAE1E;;;;GAIG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAID,wBAAgB,cAAc,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAGvD;AAKD,eAAO,MAAM,eAAe,iBAAiB,CAAC;AAG9C,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AAGnD,eAAO,MAAM,uBAAuB,gCAAgC,CAAC;AAMrE,eAAO,MAAM,iBAAiB,EAAG,eAAwB,CAAC;AAE1D;;;;;GAKG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAE7C"}
|
package/dist/esm/constants.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ALWAYS_ON_CHANNELS, DECLARED_INTEGRATIONS } from '@mondaydotcomorg/z2h-shared-utils';
|
|
1
|
+
export { ALWAYS_ON_CHANNELS, APP_NAME_PATTERN, BUCKET_READ_DNS_NAME, BUCKET_READ_DNS_URL, BUCKET_WRITE_NAME, BUCKET_WRITE_URL, DATAVIZ_SKILLS_PREFIX, DECLARED_INTEGRATIONS, MANIFEST_KEY, MANIFEST_READ_URL, PREVIEW_APP_NAME_PREFIX, REGION, S3_PREVIEWS_FOLDER, S3_SKILLS_BUCKET_NAME } from '@mondaydotcomorg/z2h-shared-utils';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Cross-file constants. Narrowly-used literals (templates, prefixes used in
|
|
@@ -24,39 +24,6 @@ const MIN_PORT = 13000;
|
|
|
24
24
|
const MAX_PORT = 19999;
|
|
25
25
|
// ─────────── Gitignore entries auto-appended to the consumer's file ────
|
|
26
26
|
const GITIGNORE_ENTRIES = ['.zth/'];
|
|
27
|
-
// ─────────── Z2H deploy bucket / contract ─────────
|
|
28
|
-
// Source of truth for the bucket layout. The CLI uses these when configuring
|
|
29
|
-
// the S3 client + uploading; bigbrain-zth's STS broker imports them via
|
|
30
|
-
// `@mondaydotcomorg/z2h-cli/constants` to scope the per-deploy session
|
|
31
|
-
// policy to the same bucket + manifest key.
|
|
32
|
-
const BUCKET_WRITE_NAME = 'prod-use1-bigbrain-zth-mf-assets';
|
|
33
|
-
const REGION = 'us-east-1';
|
|
34
|
-
const BUCKET_WRITE_URL = `https://${BUCKET_WRITE_NAME}.s3.${REGION}.amazonaws.com`;
|
|
35
|
-
const BUCKET_READ_DNS_NAME = 'bigbrain-zth-mf-assets';
|
|
36
|
-
const BUCKET_READ_DNS_URL = `https://${BUCKET_READ_DNS_NAME}.bigbrain.me`;
|
|
37
|
-
// Root prefix for ephemeral preview uploads: `previews/<previewAppName>/MF/...`,
|
|
38
|
-
// where previewAppName is the preview's own `mf-zth-preview-<id>-<app>` name.
|
|
39
|
-
// Shared by the CLI (upload path) and bigbrain-zth (STS policy + manifest overlay).
|
|
40
|
-
const S3_PREVIEWS_FOLDER = 'previews';
|
|
41
|
-
// No `.json` extension — TridentSkeleton's `mfUrl` API appends `/mf-assets`
|
|
42
|
-
// to the bucket base when fetching, so the manifest must live at this exact
|
|
43
|
-
// key. See microfrontends/mf-bigbrain-zth/.../ZeroToHeroHost.tsx.
|
|
44
|
-
const MANIFEST_KEY = 'mf-assets';
|
|
45
|
-
const MANIFEST_READ_URL = `${BUCKET_READ_DNS_URL}/${MANIFEST_KEY}`;
|
|
46
|
-
// ─────────── Skills bucket (read-only) ─────────
|
|
47
|
-
// bigbrain-zth mints read-only STS creds scoped to this bucket (mintDatavizSkillsCredentials);
|
|
48
|
-
// bigbrain-zth-agent syncs from it into its vendor/ at pod startup (syncDatavizVendor).
|
|
49
|
-
// Both import from here so the two sides can't drift.
|
|
50
|
-
const S3_SKILLS_BUCKET_NAME = 'prod-use1-bigbrain-zth-skills';
|
|
51
|
-
// Prefix the dataviz design-system skills are published under
|
|
52
|
-
// (by data-cookbook's own CI on merge to master).
|
|
53
|
-
const DATAVIZ_SKILLS_PREFIX = 'dataviz/';
|
|
54
|
-
// ─────────── App-name slug — backend & CLI both honor this ─────
|
|
55
|
-
// Lowercase kebab-case, must start with a letter, 2-50 chars total. The
|
|
56
|
-
// backend STS broker rejects anything else with 400; the CLI can validate
|
|
57
|
-
// upfront for friendlier errors.
|
|
58
|
-
const APP_NAME_PATTERN = /^[a-z][a-z0-9-]{1,49}$/;
|
|
59
|
-
const PREVIEW_APP_NAME_PREFIX = 'zth-preview-';
|
|
60
27
|
// ─────────── Broker origin + npm registry (shared §3 contract) ─────
|
|
61
28
|
// The bigbrain-zth broker fronts both the STS credential route and the npm
|
|
62
29
|
// proxy. `Z2H_BROKER_BASE_URL` overrides the origin for tests/staging.
|
|
@@ -98,4 +65,4 @@ function brokerNpmRegistryUrl() {
|
|
|
98
65
|
return `${brokerBaseUrl()}${NPM_BROKER_PATH}`;
|
|
99
66
|
}
|
|
100
67
|
|
|
101
|
-
export {
|
|
68
|
+
export { BROKER_NPM_SCOPE, DEFAULT_BROKER_BASE_URL, GITIGNORE_ENTRIES, MAX_PORT, MIN_PORT, NPM_BROKER_PATH, PUBLIC_NPM_REGISTRY_URL, SHADOW_DEV_DEPS, SHADOW_DIR_NAME, SHADOW_SCRIPTS, Z2H_NPM_TOKEN_ENV, brokerBaseUrl, brokerNpmRegistryUrl, routingHeaders };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { readFileSync } from 'node:fs';
|
|
2
|
-
import { APP_NAME_PATTERN, PREVIEW_APP_NAME_PREFIX } from '
|
|
2
|
+
import { APP_NAME_PATTERN, PREVIEW_APP_NAME_PREFIX } from '@mondaydotcomorg/z2h-shared-utils';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Strip any npm scope (`@scope/`) from a package name.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
2
|
import fs from 'fs-extra';
|
|
3
3
|
import { execa } from 'execa';
|
|
4
|
-
import { BUCKET_WRITE_NAME } from '
|
|
4
|
+
import { BUCKET_WRITE_NAME } from '@mondaydotcomorg/z2h-shared-utils';
|
|
5
5
|
import { mfAppName } from '../app-name.mjs';
|
|
6
6
|
import { GitConflictError, DeployError, messageOf } from '../errors.mjs';
|
|
7
7
|
|
|
@@ -4,7 +4,7 @@ import { readFile } from 'fs-extra';
|
|
|
4
4
|
import { lookup } from 'mime-types';
|
|
5
5
|
import pMap from 'p-map';
|
|
6
6
|
import { PutObjectCommand } from '@aws-sdk/client-s3';
|
|
7
|
-
import { BUCKET_WRITE_NAME } from '
|
|
7
|
+
import { BUCKET_WRITE_NAME } from '@mondaydotcomorg/z2h-shared-utils';
|
|
8
8
|
import { tagDeployError } from '../errors.mjs';
|
|
9
9
|
import { getS3Client } from './client.mjs';
|
|
10
10
|
|
package/dist/util/app-name.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
|
|
3
3
|
const fs = require('node:fs');
|
|
4
|
-
const
|
|
4
|
+
const z2hSharedUtils = require('@mondaydotcomorg/z2h-shared-utils');
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Strip any npm scope (`@scope/`) from a package name.
|
|
@@ -40,12 +40,12 @@ function validateAppName(appName) {
|
|
|
40
40
|
if (RESERVED_APP_NAMES.has(appName)) {
|
|
41
41
|
throw new Error(`App name "${appName}" is reserved by the Z2H host for a platform page under /bigbrain-vibe/${appName}. Pick a different name.`);
|
|
42
42
|
}
|
|
43
|
-
if (!
|
|
43
|
+
if (!z2hSharedUtils.APP_NAME_PATTERN.test(appName)) {
|
|
44
44
|
throw new Error(`App name "${appName}" is invalid. Use lowercase kebab-case (a-z, 0-9, -), ` +
|
|
45
45
|
`2-50 chars, starting with a letter.`);
|
|
46
46
|
}
|
|
47
|
-
if (appName.startsWith(
|
|
48
|
-
throw new Error(`App names starting with "${
|
|
47
|
+
if (appName.startsWith(z2hSharedUtils.PREVIEW_APP_NAME_PREFIX)) {
|
|
48
|
+
throw new Error(`App names starting with "${z2hSharedUtils.PREVIEW_APP_NAME_PREFIX}" are reserved for the ephemeral preview mechanism. Pick a different name.`);
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
// Preview slugs are capped here so the mf-prefixed name (`mf-` + slug) stays
|
|
@@ -61,13 +61,13 @@ const PREVIEW_SLUG_MAX_LEN = 47;
|
|
|
61
61
|
*/
|
|
62
62
|
function buildPreviewSlug(appName, previewId) {
|
|
63
63
|
const shortId = previewId.replace(/-/g, '').slice(0, 8);
|
|
64
|
-
const base = `${
|
|
64
|
+
const base = `${z2hSharedUtils.PREVIEW_APP_NAME_PREFIX}${shortId}-${cleanAppName(appName)}`;
|
|
65
65
|
// Trailing hyphens are stripped post-slice — a cut that lands right after a
|
|
66
66
|
// hyphen in appName would otherwise leave one dangling.
|
|
67
67
|
return base.slice(0, PREVIEW_SLUG_MAX_LEN).replace(/-+$/, '');
|
|
68
68
|
}
|
|
69
69
|
function isPreviewAppName(appName) {
|
|
70
|
-
return appName.startsWith(`mf-${
|
|
70
|
+
return appName.startsWith(`mf-${z2hSharedUtils.PREVIEW_APP_NAME_PREFIX}`);
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
exports.buildPreviewSlug = buildPreviewSlug;
|
package/dist/util/git/repo.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
3
3
|
const path = require('node:path');
|
|
4
4
|
const fs = require('fs-extra');
|
|
5
5
|
const execa = require('execa');
|
|
6
|
-
const
|
|
6
|
+
const z2hSharedUtils = require('@mondaydotcomorg/z2h-shared-utils');
|
|
7
7
|
const util_appName = require('../app-name.js');
|
|
8
8
|
const util_errors = require('../errors.js');
|
|
9
9
|
|
|
@@ -23,7 +23,7 @@ async function execGitLines(args, dir, env) {
|
|
|
23
23
|
const REQUIRED_GITIGNORE_ENTRIES = ['node_modules/', '.zth/', 'build/'];
|
|
24
24
|
const LOCAL_HOOKS_DIR = '.zth/hooks';
|
|
25
25
|
function defaultS3Remote(app) {
|
|
26
|
-
return `s3://${
|
|
26
|
+
return `s3://${z2hSharedUtils.BUCKET_WRITE_NAME}/${util_appName.mfAppName(app)}/git`;
|
|
27
27
|
}
|
|
28
28
|
async function initRepo(dir, remote) {
|
|
29
29
|
await ensureGitignore(dir);
|
package/dist/util/s3/client.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
|
|
3
3
|
const clientS3 = require('@aws-sdk/client-s3');
|
|
4
|
-
const
|
|
4
|
+
const z2hSharedUtils = require('@mondaydotcomorg/z2h-shared-utils');
|
|
5
5
|
|
|
6
6
|
let client = null;
|
|
7
7
|
function setupS3Client(credentials) {
|
|
8
|
-
client = new clientS3.S3Client({ region:
|
|
8
|
+
client = new clientS3.S3Client({ region: z2hSharedUtils.REGION, credentials });
|
|
9
9
|
}
|
|
10
10
|
function getS3Client() {
|
|
11
11
|
if (!client) {
|
package/dist/util/s3/upload.js
CHANGED
|
@@ -6,7 +6,7 @@ const fs = require('fs-extra');
|
|
|
6
6
|
const mimeTypes = require('mime-types');
|
|
7
7
|
const pMap = require('p-map');
|
|
8
8
|
const clientS3 = require('@aws-sdk/client-s3');
|
|
9
|
-
const
|
|
9
|
+
const z2hSharedUtils = require('@mondaydotcomorg/z2h-shared-utils');
|
|
10
10
|
const util_errors = require('../errors.js');
|
|
11
11
|
const util_s3_client = require('./client.js');
|
|
12
12
|
|
|
@@ -19,7 +19,7 @@ const pMap__default = /*#__PURE__*/_interopDefault(pMap);
|
|
|
19
19
|
// the URL itself is the cache key. Assets never need to be revalidated.
|
|
20
20
|
const FOREVER = 'public, immutable';
|
|
21
21
|
const UPLOAD_CONCURRENCY = 5;
|
|
22
|
-
async function uploadDir(localDir, keyPrefix, bucket =
|
|
22
|
+
async function uploadDir(localDir, keyPrefix, bucket = z2hSharedUtils.BUCKET_WRITE_NAME) {
|
|
23
23
|
try {
|
|
24
24
|
const entries = await promises.readdir(localDir, { recursive: true, withFileTypes: true });
|
|
25
25
|
const files = entries.filter(e => e.isFile()).map(e => path__default.default.relative(localDir, path__default.default.join(e.parentPath, e.name)));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mondaydotcomorg/z2h-cli",
|
|
3
|
-
"version": "0.34.
|
|
3
|
+
"version": "0.34.1",
|
|
4
4
|
"bin": "./bin/z2h-cli.js",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@aws-sdk/client-s3": "^3.706.0",
|
|
59
59
|
"@mondaydotcomorg/z2h-dashboard-templates": "^0.4.0",
|
|
60
|
-
"@mondaydotcomorg/z2h-shared-utils": "^0.7.
|
|
60
|
+
"@mondaydotcomorg/z2h-shared-utils": "^0.7.3",
|
|
61
61
|
"acorn": "^8.14.0",
|
|
62
62
|
"acorn-walk": "^8.3.4",
|
|
63
63
|
"chokidar": "^3.6.0",
|
package/src/constants.ts
CHANGED
|
@@ -28,53 +28,25 @@ export const MAX_PORT = 19999;
|
|
|
28
28
|
// ─────────── Gitignore entries auto-appended to the consumer's file ────
|
|
29
29
|
export const GITIGNORE_ENTRIES = ['.zth/'];
|
|
30
30
|
|
|
31
|
-
// ───────────
|
|
32
|
-
//
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
// to the bucket base when fetching, so the manifest must live at this exact
|
|
51
|
-
// key. See microfrontends/mf-bigbrain-zth/.../ZeroToHeroHost.tsx.
|
|
52
|
-
export const MANIFEST_KEY = 'mf-assets';
|
|
53
|
-
export const MANIFEST_READ_URL = `${BUCKET_READ_DNS_URL}/${MANIFEST_KEY}`;
|
|
54
|
-
|
|
55
|
-
// ─────────── Skills bucket (read-only) ─────────
|
|
56
|
-
// bigbrain-zth mints read-only STS creds scoped to this bucket (mintDatavizSkillsCredentials);
|
|
57
|
-
// bigbrain-zth-agent syncs from it into its vendor/ at pod startup (syncDatavizVendor).
|
|
58
|
-
// Both import from here so the two sides can't drift.
|
|
59
|
-
export const S3_SKILLS_BUCKET_NAME = 'prod-use1-bigbrain-zth-skills';
|
|
60
|
-
|
|
61
|
-
// Prefix the dataviz design-system skills are published under
|
|
62
|
-
// (by data-cookbook's own CI on merge to master).
|
|
63
|
-
export const DATAVIZ_SKILLS_PREFIX = 'dataviz/';
|
|
64
|
-
|
|
65
|
-
// ─────────── App-name slug — backend & CLI both honor this ─────
|
|
66
|
-
// Lowercase kebab-case, must start with a letter, 2-50 chars total. The
|
|
67
|
-
// backend STS broker rejects anything else with 400; the CLI can validate
|
|
68
|
-
// upfront for friendlier errors.
|
|
69
|
-
export const APP_NAME_PATTERN = /^[a-z][a-z0-9-]{1,49}$/;
|
|
70
|
-
|
|
71
|
-
export const PREVIEW_APP_NAME_PREFIX = 'zth-preview-';
|
|
72
|
-
|
|
73
|
-
// ─────────── Backend channels — re-exported from shared-utils ─────
|
|
74
|
-
// Single source of truth lives in `@mondaydotcomorg/z2h-shared-utils` so the
|
|
75
|
-
// CLI detector and broker stay in lockstep. Kept here for existing
|
|
76
|
-
// `@mondaydotcomorg/z2h-cli/constants` consumers.
|
|
77
|
-
export { ALWAYS_ON_CHANNELS, DECLARED_INTEGRATIONS, type DeclaredIntegration } from '@mondaydotcomorg/z2h-shared-utils';
|
|
31
|
+
// ─────────── Re-exported from shared-utils (source of truth) ─────
|
|
32
|
+
// Kept here so existing CLI imports of ./constants keep working.
|
|
33
|
+
export {
|
|
34
|
+
ALWAYS_ON_CHANNELS,
|
|
35
|
+
APP_NAME_PATTERN,
|
|
36
|
+
BUCKET_READ_DNS_NAME,
|
|
37
|
+
BUCKET_READ_DNS_URL,
|
|
38
|
+
BUCKET_WRITE_NAME,
|
|
39
|
+
BUCKET_WRITE_URL,
|
|
40
|
+
DATAVIZ_SKILLS_PREFIX,
|
|
41
|
+
DECLARED_INTEGRATIONS,
|
|
42
|
+
MANIFEST_KEY,
|
|
43
|
+
MANIFEST_READ_URL,
|
|
44
|
+
PREVIEW_APP_NAME_PREFIX,
|
|
45
|
+
REGION,
|
|
46
|
+
S3_PREVIEWS_FOLDER,
|
|
47
|
+
S3_SKILLS_BUCKET_NAME,
|
|
48
|
+
type DeclaredIntegration,
|
|
49
|
+
} from '@mondaydotcomorg/z2h-shared-utils';
|
|
78
50
|
|
|
79
51
|
// ─────────── Broker origin + npm registry (shared §3 contract) ─────
|
|
80
52
|
// The bigbrain-zth broker fronts both the STS credential route and the npm
|