@mondaydotcomorg/z2h-cli 0.1.1 → 0.3.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.
Files changed (122) hide show
  1. package/dist/commands/build.d.ts +1 -0
  2. package/dist/commands/build.d.ts.map +1 -1
  3. package/dist/commands/build.js +5 -1
  4. package/dist/commands/create-workspace.d.ts.map +1 -1
  5. package/dist/commands/create-workspace.js +1 -0
  6. package/dist/commands/create.d.ts.map +1 -1
  7. package/dist/commands/create.js +16 -2
  8. package/dist/commands/deploy.d.ts.map +1 -1
  9. package/dist/commands/deploy.js +27 -28
  10. package/dist/commands/dev.d.ts.map +1 -1
  11. package/dist/commands/dev.js +29 -0
  12. package/dist/commands/generate-z2h-token.d.ts +16 -0
  13. package/dist/commands/generate-z2h-token.d.ts.map +1 -0
  14. package/dist/commands/generate-z2h-token.js +107 -0
  15. package/dist/constants.d.ts +8 -0
  16. package/dist/constants.d.ts.map +1 -1
  17. package/dist/constants.js +28 -0
  18. package/dist/esm/commands/build.d.ts +1 -0
  19. package/dist/esm/commands/build.d.ts.map +1 -1
  20. package/dist/esm/commands/build.mjs +5 -1
  21. package/dist/esm/commands/create-workspace.d.ts.map +1 -1
  22. package/dist/esm/commands/create-workspace.mjs +1 -0
  23. package/dist/esm/commands/create.d.ts.map +1 -1
  24. package/dist/esm/commands/create.mjs +16 -2
  25. package/dist/esm/commands/deploy.d.ts.map +1 -1
  26. package/dist/esm/commands/deploy.mjs +24 -26
  27. package/dist/esm/commands/dev.d.ts.map +1 -1
  28. package/dist/esm/commands/dev.mjs +25 -1
  29. package/dist/esm/commands/generate-z2h-token.d.ts +16 -0
  30. package/dist/esm/commands/generate-z2h-token.d.ts.map +1 -0
  31. package/dist/esm/commands/generate-z2h-token.mjs +99 -0
  32. package/dist/esm/constants.d.ts +8 -0
  33. package/dist/esm/constants.d.ts.map +1 -1
  34. package/dist/esm/constants.mjs +21 -1
  35. package/dist/esm/index.mjs +15 -0
  36. package/dist/esm/shadow/scaffold.d.ts.map +1 -1
  37. package/dist/esm/shadow/scaffold.mjs +5 -0
  38. package/dist/esm/templates/app/claude-settings.mjs +15 -2
  39. package/dist/esm/util/auth/__tests__/auth-store.test.d.ts +2 -0
  40. package/dist/esm/util/auth/__tests__/auth-store.test.d.ts.map +1 -0
  41. package/dist/esm/util/auth/__tests__/broker-credential-provider.test.d.ts +2 -0
  42. package/dist/esm/util/auth/__tests__/broker-credential-provider.test.d.ts.map +1 -0
  43. package/dist/esm/util/auth/__tests__/loopback-server.test.d.ts +2 -0
  44. package/dist/esm/util/auth/__tests__/loopback-server.test.d.ts.map +1 -0
  45. package/dist/esm/util/auth/__tests__/write-auth.test.d.ts +2 -0
  46. package/dist/esm/util/auth/__tests__/write-auth.test.d.ts.map +1 -0
  47. package/dist/esm/util/auth/auth-store.d.ts +11 -0
  48. package/dist/esm/util/auth/auth-store.d.ts.map +1 -0
  49. package/dist/esm/util/auth/auth-store.mjs +29 -0
  50. package/dist/esm/util/auth/broker-credential-provider.d.ts +12 -0
  51. package/dist/esm/util/auth/broker-credential-provider.d.ts.map +1 -0
  52. package/dist/esm/util/auth/broker-credential-provider.mjs +76 -0
  53. package/dist/esm/util/auth/loopback-server.d.ts +12 -0
  54. package/dist/esm/util/auth/loopback-server.d.ts.map +1 -0
  55. package/dist/esm/util/auth/loopback-server.mjs +87 -0
  56. package/dist/esm/util/auth/write-auth.d.ts +11 -0
  57. package/dist/esm/util/auth/write-auth.d.ts.map +1 -0
  58. package/dist/esm/util/auth/write-auth.mjs +22 -0
  59. package/dist/esm/util/manifest.d.ts +1 -0
  60. package/dist/esm/util/manifest.d.ts.map +1 -1
  61. package/dist/esm/util/manifest.mjs +2 -1
  62. package/dist/esm/util/s3/client.d.ts +7 -8
  63. package/dist/esm/util/s3/client.d.ts.map +1 -1
  64. package/dist/esm/util/s3/client.mjs +15 -30
  65. package/dist/esm/util/s3/upload.d.ts.map +1 -1
  66. package/dist/esm/util/s3/upload.mjs +2 -1
  67. package/dist/index.js +15 -0
  68. package/dist/shadow/scaffold.d.ts.map +1 -1
  69. package/dist/shadow/scaffold.js +5 -0
  70. package/dist/templates/app/claude-settings.js +15 -1
  71. package/dist/util/auth/__tests__/auth-store.test.d.ts +2 -0
  72. package/dist/util/auth/__tests__/auth-store.test.d.ts.map +1 -0
  73. package/dist/util/auth/__tests__/broker-credential-provider.test.d.ts +2 -0
  74. package/dist/util/auth/__tests__/broker-credential-provider.test.d.ts.map +1 -0
  75. package/dist/util/auth/__tests__/loopback-server.test.d.ts +2 -0
  76. package/dist/util/auth/__tests__/loopback-server.test.d.ts.map +1 -0
  77. package/dist/util/auth/__tests__/write-auth.test.d.ts +2 -0
  78. package/dist/util/auth/__tests__/write-auth.test.d.ts.map +1 -0
  79. package/dist/util/auth/auth-store.d.ts +11 -0
  80. package/dist/util/auth/auth-store.d.ts.map +1 -0
  81. package/dist/util/auth/auth-store.js +39 -0
  82. package/dist/util/auth/broker-credential-provider.d.ts +12 -0
  83. package/dist/util/auth/broker-credential-provider.d.ts.map +1 -0
  84. package/dist/util/auth/broker-credential-provider.js +80 -0
  85. package/dist/util/auth/loopback-server.d.ts +12 -0
  86. package/dist/util/auth/loopback-server.d.ts.map +1 -0
  87. package/dist/util/auth/loopback-server.js +94 -0
  88. package/dist/util/auth/write-auth.d.ts +11 -0
  89. package/dist/util/auth/write-auth.d.ts.map +1 -0
  90. package/dist/util/auth/write-auth.js +26 -0
  91. package/dist/util/manifest.d.ts +1 -0
  92. package/dist/util/manifest.d.ts.map +1 -1
  93. package/dist/util/manifest.js +5 -4
  94. package/dist/util/s3/client.d.ts +7 -8
  95. package/dist/util/s3/client.d.ts.map +1 -1
  96. package/dist/util/s3/client.js +14 -36
  97. package/dist/util/s3/upload.d.ts.map +1 -1
  98. package/dist/util/s3/upload.js +2 -1
  99. package/package.json +10 -1
  100. package/src/commands/__tests__/create.test.ts +3 -0
  101. package/src/commands/build.ts +6 -1
  102. package/src/commands/create-workspace.ts +1 -0
  103. package/src/commands/create.ts +19 -2
  104. package/src/commands/deploy.ts +27 -36
  105. package/src/commands/dev.ts +26 -1
  106. package/src/commands/generate-z2h-token.ts +124 -0
  107. package/src/constants.ts +25 -0
  108. package/src/index.ts +17 -0
  109. package/src/shadow/scaffold.ts +5 -0
  110. package/src/templates/app/claude-settings.json +12 -0
  111. package/src/templates/workspace/yarnlock +0 -0
  112. package/src/util/auth/__tests__/auth-store.test.ts +50 -0
  113. package/src/util/auth/__tests__/broker-credential-provider.test.ts +115 -0
  114. package/src/util/auth/__tests__/loopback-server.test.ts +85 -0
  115. package/src/util/auth/__tests__/write-auth.test.ts +79 -0
  116. package/src/util/auth/auth-store.ts +31 -0
  117. package/src/util/auth/broker-credential-provider.ts +93 -0
  118. package/src/util/auth/loopback-server.ts +103 -0
  119. package/src/util/auth/write-auth.ts +24 -0
  120. package/src/util/manifest.ts +3 -1
  121. package/src/util/s3/client.ts +15 -32
  122. package/src/util/s3/upload.ts +2 -1
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/util/s3/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,QAAQ,EAAsB,MAAM,oBAAoB,CAAC;AAErF,eAAO,MAAM,iBAAiB,qCAAqC,CAAC;AACpE,eAAO,MAAM,MAAM,cAAc,CAAC;AAClC,eAAO,MAAM,gBAAgB,wEAA4D,CAAC;AAE1F,eAAO,MAAM,oBAAoB,2BAA2B,CAAC;AAC7D,eAAO,MAAM,mBAAmB,+CAAgD,CAAC;AAKjF,eAAO,MAAM,YAAY,cAAc,CAAC;AACxC,eAAO,MAAM,iBAAiB,yDAA2C,CAAC;AAI1E,wBAAgB,WAAW,IAAI,QAAQ,CAKtC;AAED,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,CAexD"}
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/util/s3/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAM9C;;;GAGG;AACH,wBAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAKpE;AAED,wBAAgB,WAAW,IAAI,QAAQ,CAKtC"}
@@ -1,38 +1,23 @@
1
- import { S3Client, HeadBucketCommand, S3ServiceException } from '@aws-sdk/client-s3';
1
+ import { S3Client } from '@aws-sdk/client-s3';
2
+ import { brokerCredentialProvider } from '../auth/broker-credential-provider.mjs';
3
+ import { REGION } from '../../constants.mjs';
2
4
 
3
- const BUCKET_WRITE_NAME = 'prod-use1-bigbrain-zth-mf-assets';
4
- const REGION = 'us-east-1';
5
- const BUCKET_WRITE_URL = `https://${BUCKET_WRITE_NAME}.s3.${REGION}.amazonaws.com`;
6
- const BUCKET_READ_DNS_NAME = 'bigbrain-zth-mf-assets';
7
- const BUCKET_READ_DNS_URL = `https://${BUCKET_READ_DNS_NAME}.bigbrain.me`;
8
- // No `.json` extension — TridentSkeleton's `mfUrl` API appends `/mf-assets`
9
- // to the bucket base when fetching, so the manifest must live at this exact
10
- // key. See microfrontends/mf-bigbrain-zth/.../ZeroToHeroHost.tsx.
11
- const MANIFEST_KEY = 'mf-assets';
12
- const MANIFEST_READ_URL = `${BUCKET_READ_DNS_URL}/${MANIFEST_KEY}`;
13
5
  let client = null;
6
+ /**
7
+ * Initialize the per-process S3 client with broker-issued credentials scoped
8
+ * to the given app's S3 prefix. Must be called once before any `getS3Client`.
9
+ */
10
+ function setupS3Client({ appName }) {
11
+ client = new S3Client({
12
+ region: REGION,
13
+ credentials: brokerCredentialProvider({ appName }),
14
+ });
15
+ }
14
16
  function getS3Client() {
15
17
  if (!client) {
16
- client = new S3Client({ region: REGION });
18
+ throw new Error('S3 client not initialized — call setupS3Client({ appName }) first.');
17
19
  }
18
20
  return client;
19
21
  }
20
- async function assertBucketExists() {
21
- try {
22
- await getS3Client().send(new HeadBucketCommand({ Bucket: BUCKET_WRITE_NAME }));
23
- }
24
- catch (err) {
25
- if (err instanceof S3ServiceException) {
26
- const status = err.$metadata.httpStatusCode;
27
- if (status === 404 || err.name === 'NotFound' || err.name === 'NoSuchBucket') {
28
- throw new Error(`S3 bucket "${BUCKET_WRITE_NAME}" does not exist (region: ${REGION}).`);
29
- }
30
- if (status === 403) {
31
- throw new Error(`No access to S3 bucket "${BUCKET_WRITE_NAME}" (region: ${REGION}). Check AWS credentials.`);
32
- }
33
- }
34
- throw err;
35
- }
36
- }
37
22
 
38
- export { BUCKET_READ_DNS_NAME, BUCKET_READ_DNS_URL, BUCKET_WRITE_NAME, BUCKET_WRITE_URL, MANIFEST_KEY, MANIFEST_READ_URL, REGION, assertBucketExists, getS3Client };
23
+ export { getS3Client, setupS3Client };
@@ -1 +1 @@
1
- {"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../../../src/util/s3/upload.ts"],"names":[],"mappings":"AAcA,wBAAsB,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CA0BtF"}
1
+ {"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../../../src/util/s3/upload.ts"],"names":[],"mappings":"AAeA,wBAAsB,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CA0BtF"}
@@ -4,7 +4,8 @@ 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 { getS3Client, BUCKET_WRITE_NAME } from './client.mjs';
7
+ import { BUCKET_WRITE_NAME } from '../../constants.mjs';
8
+ import { getS3Client } from './client.mjs';
8
9
 
9
10
  // Each deploy uploads to a version-prefixed path (<app>/<version>/...), so
10
11
  // the URL itself is the cache key. Assets never need to be revalidated.
package/dist/index.js CHANGED
@@ -5,6 +5,7 @@ const commands_clean = require('./commands/clean.js');
5
5
  const commands_deploy = require('./commands/deploy.js');
6
6
  const commands_createWorkspace = require('./commands/create-workspace.js');
7
7
  const commands_create = require('./commands/create.js');
8
+ const commands_generateZ2hToken = require('./commands/generate-z2h-token.js');
8
9
  const util_logger = require('./util/logger.js');
9
10
 
10
11
  async function main() {
@@ -88,6 +89,20 @@ async function main() {
88
89
  util_logger.fail(`create-workspace failed: ${err.message}`, { command: 'create-workspace' }, 1);
89
90
  }
90
91
  });
92
+ program
93
+ .command('generate-z2h-token')
94
+ .description('Open the bigbrain.me token page, capture the token via a loopback callback, and persist it to ~/.zth/auth.json')
95
+ .option('--no-browser', "don't auto-open the browser; print the URL and prompt for manual paste")
96
+ .option('--url <url>', 'Override the token page URL (e.g. for staging)')
97
+ .option('--json', 'emit structured JSON on stdout')
98
+ .action(async (opts) => {
99
+ try {
100
+ await commands_generateZ2hToken.generateZ2HTokenCommand(opts);
101
+ }
102
+ catch (err) {
103
+ util_logger.fail(`generate-z2h-token failed: ${err.message}`, { command: 'generate-z2h-token' }, 1);
104
+ }
105
+ });
91
106
  program
92
107
  .command('create <app-name>')
93
108
  .description('Scaffold a new Z2H consumer app inside ~/zth-projects/')
@@ -1 +1 @@
1
- {"version":3,"file":"scaffold.d.ts","sourceRoot":"","sources":["../../src/shadow/scaffold.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAqG9C;;;GAGG;AACH,wBAAsB,cAAc,CAAC,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAYvG"}
1
+ {"version":3,"file":"scaffold.d.ts","sourceRoot":"","sources":["../../src/shadow/scaffold.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AA0G9C;;;GAGG;AACH,wBAAsB,cAAc,CAAC,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAYvG"}
@@ -79,6 +79,11 @@ declare module '*.wasm' {
79
79
  const e: string;
80
80
  export default e;
81
81
  }
82
+
83
+ declare module '*.html?url' {
84
+ const src: string;
85
+ export default src;
86
+ }
82
87
  `;
83
88
  const TSCONFIG_TEMPLATE = {
84
89
  compilerOptions: {
@@ -5,9 +5,23 @@ var permissions = {
5
5
  "Skill(z2h:*)"
6
6
  ]
7
7
  };
8
+ var hooks = {
9
+ Stop: [
10
+ {
11
+ hooks: [
12
+ {
13
+ type: "command",
14
+ command: "if [ -f .zth/dev.pid ]; then kill $(cat .zth/dev.pid) 2>/dev/null; rm .zth/dev.pid; fi"
15
+ }
16
+ ]
17
+ }
18
+ ]
19
+ };
8
20
  const claudeSettings = {
9
- permissions: permissions
21
+ permissions: permissions,
22
+ hooks: hooks
10
23
  };
11
24
 
12
25
  exports.default = claudeSettings;
26
+ exports.hooks = hooks;
13
27
  exports.permissions = permissions;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=auth-store.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-store.test.d.ts","sourceRoot":"","sources":["../../../../src/util/auth/__tests__/auth-store.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=broker-credential-provider.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"broker-credential-provider.test.d.ts","sourceRoot":"","sources":["../../../../src/util/auth/__tests__/broker-credential-provider.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=loopback-server.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loopback-server.test.d.ts","sourceRoot":"","sources":["../../../../src/util/auth/__tests__/loopback-server.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=write-auth.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"write-auth.test.d.ts","sourceRoot":"","sources":["../../../../src/util/auth/__tests__/write-auth.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ export declare const Z2H_AUTH_DIR: string;
2
+ export declare const Z2H_AUTH_FILE: string;
3
+ export interface ZthAuth {
4
+ token: string;
5
+ }
6
+ export declare class Z2hAuthMissingError extends Error {
7
+ readonly authFilePath: string;
8
+ constructor(authFilePath: string);
9
+ }
10
+ export declare function readZthAuth(): Promise<ZthAuth>;
11
+ //# sourceMappingURL=auth-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-store.d.ts","sourceRoot":"","sources":["../../../src/util/auth/auth-store.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,YAAY,QAAkC,CAAC;AAC5D,eAAO,MAAM,aAAa,QAAuC,CAAC;AAElE,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,qBAAa,mBAAoB,SAAQ,KAAK;aAChB,YAAY,EAAE,MAAM;gBAApB,YAAY,EAAE,MAAM;CAIjD;AAED,wBAAsB,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC,CASpD"}
@@ -0,0 +1,39 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ const path = require('node:path');
4
+ const os = require('node:os');
5
+ const fsExtra = require('fs-extra');
6
+
7
+ const _interopDefault = e => e && e.__esModule ? e : { default: e };
8
+
9
+ const path__default = /*#__PURE__*/_interopDefault(path);
10
+ const os__default = /*#__PURE__*/_interopDefault(os);
11
+
12
+ // npm-style convention: per-user config under ~/.zth (mirrors ~/.npmrc, ~/.aws/).
13
+ // Kept out of the workspace dir so accidental `git init` in ~/zth-projects can't
14
+ // stage it.
15
+ const Z2H_AUTH_DIR = path__default.default.join(os__default.default.homedir(), '.zth');
16
+ const Z2H_AUTH_FILE = path__default.default.join(Z2H_AUTH_DIR, 'auth.json');
17
+ class Z2hAuthMissingError extends Error {
18
+ authFilePath;
19
+ constructor(authFilePath) {
20
+ super(`No Z2H deploy token found at ${authFilePath}. Please run 'z2h-cli generate-z2h-token' command.`);
21
+ this.authFilePath = authFilePath;
22
+ this.name = 'Z2hAuthMissingError';
23
+ }
24
+ }
25
+ async function readZthAuth() {
26
+ if (!(await fsExtra.pathExists(Z2H_AUTH_FILE))) {
27
+ throw new Z2hAuthMissingError(Z2H_AUTH_FILE);
28
+ }
29
+ const parsed = (await fsExtra.readJson(Z2H_AUTH_FILE));
30
+ if (!parsed.token) {
31
+ throw new Error(`${Z2H_AUTH_FILE} is missing a "token" string field.`);
32
+ }
33
+ return { token: parsed.token };
34
+ }
35
+
36
+ exports.Z2H_AUTH_DIR = Z2H_AUTH_DIR;
37
+ exports.Z2H_AUTH_FILE = Z2H_AUTH_FILE;
38
+ exports.Z2hAuthMissingError = Z2hAuthMissingError;
39
+ exports.readZthAuth = readZthAuth;
@@ -0,0 +1,12 @@
1
+ import type { AwsCredentialIdentityProvider } from '@aws-sdk/types';
2
+ export declare const DEFAULT_BROKER_BASE_URL = "https://bigbrain-zth.bigbrain.me";
3
+ export declare const STS_BROKER_PATH = "/z2h-cli/sts/credentials";
4
+ /**
5
+ * AWS SDK credential provider that fetches short-lived deploy credentials
6
+ * from the bigbrain-zth STS broker. Credentials are cached in memory until
7
+ * 5 minutes before expiry; concurrent calls share a single in-flight fetch.
8
+ */
9
+ export declare function brokerCredentialProvider({ appName }: {
10
+ appName: string;
11
+ }): AwsCredentialIdentityProvider;
12
+ //# sourceMappingURL=broker-credential-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"broker-credential-provider.d.ts","sourceRoot":"","sources":["../../../src/util/auth/broker-credential-provider.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAyB,6BAA6B,EAAE,MAAM,gBAAgB,CAAC;AAE3F,eAAO,MAAM,uBAAuB,qCAAqC,CAAC;AAC1E,eAAO,MAAM,eAAe,6BAA6B,CAAC;AA4D1D;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,6BAA6B,CAuBxG"}
@@ -0,0 +1,80 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ const util_auth_authStore = require('./auth-store.js');
4
+
5
+ const DEFAULT_BROKER_BASE_URL = 'https://bigbrain-zth.bigbrain.me';
6
+ const STS_BROKER_PATH = '/z2h-cli/sts/credentials';
7
+ // Refresh the cached credentials this many ms before they expire so the next
8
+ // AWS API call doesn't race the broker round-trip against a hard expiry.
9
+ const REFRESH_BUFFER_MS = 5 * 60 * 1000;
10
+ function brokerBaseUrl() {
11
+ return process.env.Z2H_BROKER_BASE_URL || DEFAULT_BROKER_BASE_URL;
12
+ }
13
+ async function fetchCredentialsOnce(appName) {
14
+ const { token } = await util_auth_authStore.readZthAuth();
15
+ const url = `${brokerBaseUrl()}${STS_BROKER_PATH}`;
16
+ let res;
17
+ try {
18
+ res = await fetch(url, {
19
+ method: 'POST',
20
+ headers: {
21
+ Authorization: `Bearer ${token}`,
22
+ 'Content-Type': 'application/json',
23
+ Accept: 'application/json',
24
+ },
25
+ body: JSON.stringify({ appName }),
26
+ });
27
+ }
28
+ catch (err) {
29
+ const message = err instanceof Error ? err.message : String(err);
30
+ throw new Error(`Z2H deploy broker request failed: ${message}`);
31
+ }
32
+ if (res.status === 401 || res.status === 403) {
33
+ throw new Error(`Z2H deploy token rejected by the broker (${res.status}). Refresh user token by running 'z2h-cli generate-z2h-token'.`);
34
+ }
35
+ if (!res.ok) {
36
+ const text = await res.text();
37
+ throw new Error(`Z2H deploy broker returned ${res.status}: ${text.slice(0, 1024)}`);
38
+ }
39
+ const body = (await res.json());
40
+ if (!body.accessKeyId || !body.secretAccessKey || !body.sessionToken || !body.expiration) {
41
+ throw new Error('Z2H deploy broker response missing required credential fields');
42
+ }
43
+ return {
44
+ accessKeyId: body.accessKeyId,
45
+ secretAccessKey: body.secretAccessKey,
46
+ sessionToken: body.sessionToken,
47
+ expiration: new Date(body.expiration),
48
+ };
49
+ }
50
+ /**
51
+ * AWS SDK credential provider that fetches short-lived deploy credentials
52
+ * from the bigbrain-zth STS broker. Credentials are cached in memory until
53
+ * 5 minutes before expiry; concurrent calls share a single in-flight fetch.
54
+ */
55
+ function brokerCredentialProvider({ appName }) {
56
+ let cached;
57
+ let inflight;
58
+ return async () => {
59
+ const now = Date.now();
60
+ if (cached && cached.expiration && cached.expiration.getTime() - now > REFRESH_BUFFER_MS) {
61
+ return cached;
62
+ }
63
+ if (inflight) {
64
+ return inflight;
65
+ }
66
+ inflight = fetchCredentialsOnce(appName)
67
+ .then(creds => {
68
+ cached = creds;
69
+ return creds;
70
+ })
71
+ .finally(() => {
72
+ inflight = undefined;
73
+ });
74
+ return inflight;
75
+ };
76
+ }
77
+
78
+ exports.DEFAULT_BROKER_BASE_URL = DEFAULT_BROKER_BASE_URL;
79
+ exports.STS_BROKER_PATH = STS_BROKER_PATH;
80
+ exports.brokerCredentialProvider = brokerCredentialProvider;
@@ -0,0 +1,12 @@
1
+ export interface LoopbackHandle {
2
+ /** Fully-qualified URL the browser should POST to (e.g. http://127.0.0.1:53811/token). */
3
+ callbackUrl: string;
4
+ /**
5
+ * Resolves with the token once the page POSTs it back. Rejects on timeout
6
+ * or if the server is closed before a token arrives.
7
+ */
8
+ waitForToken(timeoutMs: number): Promise<string>;
9
+ close(): void;
10
+ }
11
+ export declare function startLoopbackServer(): Promise<LoopbackHandle>;
12
+ //# sourceMappingURL=loopback-server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loopback-server.d.ts","sourceRoot":"","sources":["../../../src/util/auth/loopback-server.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,cAAc;IAC7B,0FAA0F;IAC1F,WAAW,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACjD,KAAK,IAAI,IAAI,CAAC;CACf;AAED,wBAAgB,mBAAmB,IAAI,OAAO,CAAC,cAAc,CAAC,CAkF7D"}
@@ -0,0 +1,94 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ const cors = require('cors');
4
+ const express = require('express');
5
+
6
+ const _interopDefault = e => e && e.__esModule ? e : { default: e };
7
+
8
+ const cors__default = /*#__PURE__*/_interopDefault(cors);
9
+ const express__default = /*#__PURE__*/_interopDefault(express);
10
+
11
+ const ALLOWED_ORIGINS = new Set(['https://bigbrain.me', 'https://bigbrainstaging.me']);
12
+ const CALLBACK_PATH = '/token';
13
+ const REQUEST_BODY_LIMIT = '16kb';
14
+ const PREFLIGHT_MAX_AGE_SECONDS = 600;
15
+ function startLoopbackServer() {
16
+ return new Promise((resolve, reject) => {
17
+ let resolveToken = null;
18
+ let rejectToken = null;
19
+ const app = express__default.default();
20
+ // Reflect the origin if it's one of ours; otherwise wildcard. The
21
+ // endpoint is loopback-bound and single-shot, so the CORS surface is
22
+ // moot — we keep allowlist behavior so the test contract stays exact.
23
+ app.use(cors__default.default({
24
+ origin: (origin, cb) => {
25
+ if (origin && ALLOWED_ORIGINS.has(origin)) {
26
+ cb(null, origin);
27
+ }
28
+ else {
29
+ cb(null, '*');
30
+ }
31
+ },
32
+ methods: ['POST', 'OPTIONS'],
33
+ allowedHeaders: ['Content-Type'],
34
+ maxAge: PREFLIGHT_MAX_AGE_SECONDS,
35
+ }));
36
+ app.use(express.json({ limit: REQUEST_BODY_LIMIT }));
37
+ app.post(CALLBACK_PATH, (req, res) => {
38
+ const body = req.body;
39
+ const token = typeof body?.token === 'string' ? body.token.trim() : '';
40
+ if (!token) {
41
+ res.status(400).json({ error: 'missing token' });
42
+ return;
43
+ }
44
+ // Ack the page so it can transition to "Token sent ✓" and auto-close.
45
+ // The bigbrain.me page never displays this body — it just inspects res.ok.
46
+ res.status(200).json({ ok: true });
47
+ if (resolveToken) {
48
+ const fn = resolveToken;
49
+ resolveToken = null;
50
+ rejectToken = null;
51
+ fn(token);
52
+ }
53
+ });
54
+ const server = app.listen(0, '127.0.0.1', () => {
55
+ const address = server.address();
56
+ if (!address || typeof address === 'string') {
57
+ server.close();
58
+ reject(new Error('Failed to determine loopback port'));
59
+ return;
60
+ }
61
+ resolve({
62
+ callbackUrl: `http://127.0.0.1:${address.port}${CALLBACK_PATH}`,
63
+ waitForToken(timeoutMs) {
64
+ return new Promise((res, rej) => {
65
+ resolveToken = res;
66
+ rejectToken = rej;
67
+ const timer = setTimeout(() => {
68
+ if (rejectToken) {
69
+ const reject = rejectToken;
70
+ resolveToken = null;
71
+ rejectToken = null;
72
+ reject(new Error('Loopback callback timed out'));
73
+ }
74
+ }, timeoutMs);
75
+ // Don't keep the event loop alive on the timer alone.
76
+ timer.unref?.();
77
+ });
78
+ },
79
+ close() {
80
+ if (rejectToken) {
81
+ const reject = rejectToken;
82
+ resolveToken = null;
83
+ rejectToken = null;
84
+ reject(new Error('Loopback server closed before token arrived'));
85
+ }
86
+ server.close();
87
+ },
88
+ });
89
+ });
90
+ server.on('error', reject);
91
+ });
92
+ }
93
+
94
+ exports.startLoopbackServer = startLoopbackServer;
@@ -0,0 +1,11 @@
1
+ import { type ZthAuth } from './auth-store';
2
+ export declare function writeZthAuth(auth: ZthAuth): Promise<{
3
+ filePath: string;
4
+ }>;
5
+ /**
6
+ * Three base64url segments separated by dots — a structural sanity check,
7
+ * not a real verification. Server-side validation happens at the STS broker.
8
+ */
9
+ export declare function validateJwtPattern(token: string): boolean;
10
+ export { Z2H_AUTH_FILE } from './auth-store';
11
+ //# sourceMappingURL=write-auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"write-auth.d.ts","sourceRoot":"","sources":["../../../src/util/auth/write-auth.ts"],"names":[],"mappings":"AAEA,OAAO,EAA+B,KAAK,OAAO,EAAE,MAAM,cAAc,CAAC;AAMzE,wBAAsB,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CAK/E;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEzD;AAED,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,26 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ const promises = require('node:fs/promises');
4
+ const fsExtra = require('fs-extra');
5
+ const util_auth_authStore = require('./auth-store.js');
6
+
7
+ // 0o600 — owner read/write only. The file holds a long-lived bearer token,
8
+ // so other local users on the machine must not be able to read it.
9
+ const OWNER_READ_WRITE_FILE_MODE = 0o600;
10
+ async function writeZthAuth(auth) {
11
+ await fsExtra.ensureDir(util_auth_authStore.Z2H_AUTH_DIR);
12
+ await fsExtra.writeFile(util_auth_authStore.Z2H_AUTH_FILE, `${JSON.stringify(auth, null, 2)}\n`);
13
+ await promises.chmod(util_auth_authStore.Z2H_AUTH_FILE, OWNER_READ_WRITE_FILE_MODE);
14
+ return { filePath: util_auth_authStore.Z2H_AUTH_FILE };
15
+ }
16
+ /**
17
+ * Three base64url segments separated by dots — a structural sanity check,
18
+ * not a real verification. Server-side validation happens at the STS broker.
19
+ */
20
+ function validateJwtPattern(token) {
21
+ return /^[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+$/.test(token);
22
+ }
23
+
24
+ exports.Z2H_AUTH_FILE = util_auth_authStore.Z2H_AUTH_FILE;
25
+ exports.validateJwtPattern = validateJwtPattern;
26
+ exports.writeZthAuth = writeZthAuth;
@@ -22,6 +22,7 @@ export interface AssetManifestFile {
22
22
  export interface ManifestEntry extends AssetManifestFile {
23
23
  version: number;
24
24
  url: string;
25
+ deployedBy: string;
25
26
  }
26
27
  export type Manifest = Record<string, ManifestEntry>;
27
28
  export declare function readManifest(): Promise<Manifest>;
@@ -1 +1 @@
1
- {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/util/manifest.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,SAAS;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtC;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,OAAO,CAAC;IACpB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,uBAAuB,CAAC,EAAE,MAAM,EAAE,CAAC;IACnC,UAAU,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAClC,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;CAChB;AAED,MAAM,WAAW,aAAc,SAAQ,iBAAiB;IACtD,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AAErD,wBAAsB,YAAY,IAAI,OAAO,CAAC,QAAQ,CAAC,CAQtD;AAED,wBAAgB,WAAW,CAAC,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,UAI1D;AAED,wBAAgB,WAAW,CAAC,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,GAAG,QAAQ,CAE3F;AAED,wBAAsB,aAAa,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAWrE"}
1
+ {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/util/manifest.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,SAAS;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtC;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,OAAO,CAAC;IACpB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,uBAAuB,CAAC,EAAE,MAAM,EAAE,CAAC;IACnC,UAAU,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAClC,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;CAChB;AAED,MAAM,WAAW,aAAc,SAAQ,iBAAiB;IACtD,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AAErD,wBAAsB,YAAY,IAAI,OAAO,CAAC,QAAQ,CAAC,CAQtD;AAED,wBAAgB,WAAW,CAAC,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,UAI1D;AAED,wBAAgB,WAAW,CAAC,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,GAAG,QAAQ,CAE3F;AAED,wBAAsB,aAAa,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAWrE"}
@@ -1,13 +1,14 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
 
3
3
  const clientS3 = require('@aws-sdk/client-s3');
4
+ const constants = require('../constants.js');
4
5
  const util_s3_client = require('./s3/client.js');
5
6
 
6
7
  async function readManifest() {
7
8
  // Read via the public CDN endpoint, no AWS auth required.
8
- const res = await fetch(util_s3_client.MANIFEST_READ_URL);
9
+ const res = await fetch(constants.MANIFEST_READ_URL);
9
10
  if (!res.ok) {
10
- throw new Error(`failed to read manifest from ${util_s3_client.MANIFEST_READ_URL}: HTTP ${res.status}`);
11
+ throw new Error(`failed to read manifest from ${constants.MANIFEST_READ_URL}: HTTP ${res.status}`);
11
12
  }
12
13
  return (await res.json());
13
14
  }
@@ -22,8 +23,8 @@ function upsertEntry(manifest, app, entry) {
22
23
  async function writeManifest(manifest) {
23
24
  const s3 = util_s3_client.getS3Client();
24
25
  await s3.send(new clientS3.PutObjectCommand({
25
- Bucket: util_s3_client.BUCKET_WRITE_NAME,
26
- Key: util_s3_client.MANIFEST_KEY,
26
+ Bucket: constants.BUCKET_WRITE_NAME,
27
+ Key: constants.MANIFEST_KEY,
27
28
  Body: JSON.stringify(manifest, null, 2),
28
29
  ContentType: 'application/json',
29
30
  CacheControl: 'no-cache',
@@ -1,11 +1,10 @@
1
1
  import { S3Client } from '@aws-sdk/client-s3';
2
- export declare const BUCKET_WRITE_NAME = "prod-use1-bigbrain-zth-mf-assets";
3
- export declare const REGION = "us-east-1";
4
- export declare const BUCKET_WRITE_URL = "https://prod-use1-bigbrain-zth-mf-assets.s3.us-east-1.amazonaws.com";
5
- export declare const BUCKET_READ_DNS_NAME = "bigbrain-zth-mf-assets";
6
- export declare const BUCKET_READ_DNS_URL = "https://bigbrain-zth-mf-assets.bigbrain.me";
7
- export declare const MANIFEST_KEY = "mf-assets";
8
- export declare const MANIFEST_READ_URL = "https://bigbrain-zth-mf-assets.bigbrain.me/mf-assets";
2
+ /**
3
+ * Initialize the per-process S3 client with broker-issued credentials scoped
4
+ * to the given app's S3 prefix. Must be called once before any `getS3Client`.
5
+ */
6
+ export declare function setupS3Client({ appName }: {
7
+ appName: string;
8
+ }): void;
9
9
  export declare function getS3Client(): S3Client;
10
- export declare function assertBucketExists(): Promise<void>;
11
10
  //# sourceMappingURL=client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/util/s3/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,QAAQ,EAAsB,MAAM,oBAAoB,CAAC;AAErF,eAAO,MAAM,iBAAiB,qCAAqC,CAAC;AACpE,eAAO,MAAM,MAAM,cAAc,CAAC;AAClC,eAAO,MAAM,gBAAgB,wEAA4D,CAAC;AAE1F,eAAO,MAAM,oBAAoB,2BAA2B,CAAC;AAC7D,eAAO,MAAM,mBAAmB,+CAAgD,CAAC;AAKjF,eAAO,MAAM,YAAY,cAAc,CAAC;AACxC,eAAO,MAAM,iBAAiB,yDAA2C,CAAC;AAI1E,wBAAgB,WAAW,IAAI,QAAQ,CAKtC;AAED,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,CAexD"}
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/util/s3/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAM9C;;;GAGG;AACH,wBAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAKpE;AAED,wBAAgB,WAAW,IAAI,QAAQ,CAKtC"}
@@ -1,48 +1,26 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
 
3
3
  const clientS3 = require('@aws-sdk/client-s3');
4
+ const util_auth_brokerCredentialProvider = require('../auth/broker-credential-provider.js');
5
+ const constants = require('../../constants.js');
4
6
 
5
- const BUCKET_WRITE_NAME = 'prod-use1-bigbrain-zth-mf-assets';
6
- const REGION = 'us-east-1';
7
- const BUCKET_WRITE_URL = `https://${BUCKET_WRITE_NAME}.s3.${REGION}.amazonaws.com`;
8
- const BUCKET_READ_DNS_NAME = 'bigbrain-zth-mf-assets';
9
- const BUCKET_READ_DNS_URL = `https://${BUCKET_READ_DNS_NAME}.bigbrain.me`;
10
- // No `.json` extension — TridentSkeleton's `mfUrl` API appends `/mf-assets`
11
- // to the bucket base when fetching, so the manifest must live at this exact
12
- // key. See microfrontends/mf-bigbrain-zth/.../ZeroToHeroHost.tsx.
13
- const MANIFEST_KEY = 'mf-assets';
14
- const MANIFEST_READ_URL = `${BUCKET_READ_DNS_URL}/${MANIFEST_KEY}`;
15
7
  let client = null;
8
+ /**
9
+ * Initialize the per-process S3 client with broker-issued credentials scoped
10
+ * to the given app's S3 prefix. Must be called once before any `getS3Client`.
11
+ */
12
+ function setupS3Client({ appName }) {
13
+ client = new clientS3.S3Client({
14
+ region: constants.REGION,
15
+ credentials: util_auth_brokerCredentialProvider.brokerCredentialProvider({ appName }),
16
+ });
17
+ }
16
18
  function getS3Client() {
17
19
  if (!client) {
18
- client = new clientS3.S3Client({ region: REGION });
20
+ throw new Error('S3 client not initialized — call setupS3Client({ appName }) first.');
19
21
  }
20
22
  return client;
21
23
  }
22
- async function assertBucketExists() {
23
- try {
24
- await getS3Client().send(new clientS3.HeadBucketCommand({ Bucket: BUCKET_WRITE_NAME }));
25
- }
26
- catch (err) {
27
- if (err instanceof clientS3.S3ServiceException) {
28
- const status = err.$metadata.httpStatusCode;
29
- if (status === 404 || err.name === 'NotFound' || err.name === 'NoSuchBucket') {
30
- throw new Error(`S3 bucket "${BUCKET_WRITE_NAME}" does not exist (region: ${REGION}).`);
31
- }
32
- if (status === 403) {
33
- throw new Error(`No access to S3 bucket "${BUCKET_WRITE_NAME}" (region: ${REGION}). Check AWS credentials.`);
34
- }
35
- }
36
- throw err;
37
- }
38
- }
39
24
 
40
- exports.BUCKET_READ_DNS_NAME = BUCKET_READ_DNS_NAME;
41
- exports.BUCKET_READ_DNS_URL = BUCKET_READ_DNS_URL;
42
- exports.BUCKET_WRITE_NAME = BUCKET_WRITE_NAME;
43
- exports.BUCKET_WRITE_URL = BUCKET_WRITE_URL;
44
- exports.MANIFEST_KEY = MANIFEST_KEY;
45
- exports.MANIFEST_READ_URL = MANIFEST_READ_URL;
46
- exports.REGION = REGION;
47
- exports.assertBucketExists = assertBucketExists;
48
25
  exports.getS3Client = getS3Client;
26
+ exports.setupS3Client = setupS3Client;
@@ -1 +1 @@
1
- {"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../../src/util/s3/upload.ts"],"names":[],"mappings":"AAcA,wBAAsB,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CA0BtF"}
1
+ {"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../../src/util/s3/upload.ts"],"names":[],"mappings":"AAeA,wBAAsB,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CA0BtF"}