@hyperdrive.bot/sign-cli 0.1.3 → 0.1.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/lib/manifest.js +10 -3
- package/dist/lib/sign-api.d.ts +1 -1
- package/dist/lib/sign-api.js +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +1 -2
package/dist/lib/manifest.js
CHANGED
|
@@ -44,11 +44,18 @@ const loadCachedManifest = async () => {
|
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
46
|
/**
|
|
47
|
-
* Fetch manifest from the API
|
|
47
|
+
* Fetch manifest from the tenants API Gateway (unauthenticated for now).
|
|
48
|
+
* TODO: Move to authenticated endpoint once ABAC feature registration is sorted.
|
|
48
49
|
*/
|
|
49
50
|
const fetchManifest = async (apiClient) => {
|
|
50
|
-
const
|
|
51
|
-
|
|
51
|
+
const bootstrapUrl = process.env.SIGN_BOOTSTRAP_URL || 'https://oo2wp0ax27.execute-api.us-east-1.amazonaws.com/dev/tenant/bootstrap-dev';
|
|
52
|
+
const baseUrl = bootstrapUrl.replace(/\/tenant\/bootstrap.*$/, '');
|
|
53
|
+
const manifestUrl = `${baseUrl}/tenant/manifest`;
|
|
54
|
+
const response = await fetch(manifestUrl);
|
|
55
|
+
if (!response.ok) {
|
|
56
|
+
throw new Error(`Failed to fetch manifest: ${response.status} ${response.statusText}`);
|
|
57
|
+
}
|
|
58
|
+
return await response.json();
|
|
52
59
|
};
|
|
53
60
|
/**
|
|
54
61
|
* Cache manifest to local filesystem
|
package/dist/lib/sign-api.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { SigV4ApiClient } from '@hyperdrive.bot/cli-auth';
|
|
|
11
11
|
export declare class SignApiClient extends SigV4ApiClient {
|
|
12
12
|
constructor(domain?: string);
|
|
13
13
|
/**
|
|
14
|
-
* GET request to the primary API (
|
|
14
|
+
* GET request to the primary API (sign gateway)
|
|
15
15
|
*/
|
|
16
16
|
get<T = unknown>(path: string): Promise<T>;
|
|
17
17
|
/**
|
package/dist/lib/sign-api.js
CHANGED
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperdrive.bot/sign-cli",
|
|
3
3
|
"description": "Sign CLI — runtime-discovered API client for the Sign platform",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.5",
|
|
5
5
|
"author": "marcelomarra",
|
|
6
6
|
"bin": {
|
|
7
7
|
"sign": "./bin/run.js"
|
|
@@ -39,7 +39,6 @@
|
|
|
39
39
|
"commands": "./dist/commands",
|
|
40
40
|
"plugins": [
|
|
41
41
|
"@oclif/plugin-help",
|
|
42
|
-
"@oclif/plugin-not-found",
|
|
43
42
|
"@hyperdrive.bot/auth-plugin"
|
|
44
43
|
],
|
|
45
44
|
"hooks": {
|