@superglue/cli 1.1.2 → 1.1.4
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "superglue",
|
|
3
3
|
"description": "Build, test, and manage superglue tools via the sg CLI. Use when working with superglue tools, systems, APIs, SDKs, or the sg command.",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.4",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "superglue",
|
|
7
7
|
"email": "hello@superglue.cloud"
|
package/dist/cli.js
CHANGED
|
@@ -5329,6 +5329,75 @@ IMPORTANT: Sandbox and production use completely separate credentials and base U
|
|
|
5329
5329
|
docsUrl: "https://ai.google.dev/api",
|
|
5330
5330
|
// there is a openapi spec here: https://generativelanguage.googleapis.com/$discovery/OPENAPI3_0?version=v1beta&key=$GOOGLE_API_KEY - but you need your own google api key to access it
|
|
5331
5331
|
preferredAuthType: "apikey"
|
|
5332
|
+
},
|
|
5333
|
+
tableau: {
|
|
5334
|
+
name: "tableau",
|
|
5335
|
+
apiUrl: "https://{your-server}.online.tableau.com",
|
|
5336
|
+
regex: "^.*(tableau\\.com|online\\.tableau).*$",
|
|
5337
|
+
icon: "lucide:plus",
|
|
5338
|
+
docsUrl: "https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api.htm",
|
|
5339
|
+
preferredAuthType: "apikey",
|
|
5340
|
+
keywords: [
|
|
5341
|
+
"workbooks",
|
|
5342
|
+
"views",
|
|
5343
|
+
"datasources",
|
|
5344
|
+
"projects",
|
|
5345
|
+
"users",
|
|
5346
|
+
"groups",
|
|
5347
|
+
"permissions",
|
|
5348
|
+
"sheets",
|
|
5349
|
+
"published data sources",
|
|
5350
|
+
"sites",
|
|
5351
|
+
"jobs",
|
|
5352
|
+
"favorites",
|
|
5353
|
+
"flows",
|
|
5354
|
+
"metrics",
|
|
5355
|
+
"webhooks",
|
|
5356
|
+
"connected apps",
|
|
5357
|
+
"jwt",
|
|
5358
|
+
"vizql",
|
|
5359
|
+
"row-level security"
|
|
5360
|
+
],
|
|
5361
|
+
systemSpecificInstructions: `Tableau supports two Connected App authentication methods:
|
|
5362
|
+
1. **Direct Trust**: Requires client_id, secret_id, and secret_value \u2014 you generate and sign JWTs yourself
|
|
5363
|
+
2. **OAuth 2.0**: Standard OAuth flow with client_id and client_secret
|
|
5364
|
+
|
|
5365
|
+
DIRECT TRUST CREDENTIALS (from Settings > Connected Apps):
|
|
5366
|
+
- tableau_url: Server URL (e.g., https://prod-uk-a.online.tableau.com)
|
|
5367
|
+
- tableau_site_id: The content URL from browser (e.g., "mysite" from /site/mysite/)
|
|
5368
|
+
- tableau_client_id: Connected App ID
|
|
5369
|
+
- tableau_secret_id: The key ID you generated
|
|
5370
|
+
- tableau_client_secret: The secret value (only shown once when created)
|
|
5371
|
+
|
|
5372
|
+
DIRECT TRUST AUTH FLOW:
|
|
5373
|
+
1. Generate a JWT signed with HMAC-SHA256 using the secret value. Include:
|
|
5374
|
+
- Header: { alg: "HS256", typ: "JWT", kid: secret_id, iss: client_id }
|
|
5375
|
+
- Payload: { iss: client_id, sub: "<username>", aud: "tableau", exp: <now+600>, jti: <uuid>, scp: ["tableau:content:read", "tableau:query:run"] }
|
|
5376
|
+
2. Exchange JWT for access token: POST /api/3.24/auth/signin with body: { credentials: { jwt: "<token>", site: { contentUrl: "<site_id>" } } }
|
|
5377
|
+
3. Use the returned token in X-Tableau-Auth header for all subsequent requests
|
|
5378
|
+
|
|
5379
|
+
AVAILABLE APIs:
|
|
5380
|
+
- REST API (/api/3.24/...): Management & metadata \u2014 list datasources, workbooks, users, download view/dashboard data
|
|
5381
|
+
- Metadata API: GraphQL for relationships and lineage
|
|
5382
|
+
- VizQL Data Service (/api/v1/vizql-data-service/query-datasource): Query datasource rows directly
|
|
5383
|
+
|
|
5384
|
+
ROW-LEVEL SECURITY: The JWT's "sub" claim determines which user's permissions apply. Data is automatically filtered based on that user's access.
|
|
5385
|
+
|
|
5386
|
+
SUPERGLUE EXAMPLE - JWT generation in a transform step (Direct Trust):
|
|
5387
|
+
\`\`\`javascript
|
|
5388
|
+
(data) => {
|
|
5389
|
+
const creds = data._credentials || {};
|
|
5390
|
+
const now = Math.floor(Date.now() / 1000);
|
|
5391
|
+
const header = base64url(JSON.stringify({ alg: 'HS256', typ: 'JWT', kid: creds.tableau_secret_id, iss: creds.tableau_client_id }));
|
|
5392
|
+
const payload = base64url(JSON.stringify({ iss: creds.tableau_client_id, sub: data.username, aud: 'tableau', exp: now + 600, jti: crypto.randomUUID(), scp: ['tableau:content:read', 'tableau:query:run'] }));
|
|
5393
|
+
const signature = crypto.createHmac('sha256', creds.tableau_client_secret).update(header + '.' + payload).digest('base64url');
|
|
5394
|
+
return { jwt: header + '.' + payload + '.' + signature };
|
|
5395
|
+
};
|
|
5396
|
+
\`\`\`
|
|
5397
|
+
|
|
5398
|
+
EXAMPLE WORKFLOWS:
|
|
5399
|
+
- Generate JWT \u2192 Sign in \u2192 List datasources \u2192 Query via VizQL Data Service
|
|
5400
|
+
- Generate JWT \u2192 Sign in \u2192 Get workbook \u2192 Download view/dashboard data as CSV/PDF`
|
|
5332
5401
|
}
|
|
5333
5402
|
};
|
|
5334
5403
|
exports2.systemOptions = [
|
|
@@ -21710,7 +21779,7 @@ var import_node_util = require("util");
|
|
|
21710
21779
|
// package.json
|
|
21711
21780
|
var package_default = {
|
|
21712
21781
|
name: "@superglue/cli",
|
|
21713
|
-
version: "1.1.
|
|
21782
|
+
version: "1.1.4",
|
|
21714
21783
|
bin: {
|
|
21715
21784
|
sg: "./dist/cli.js"
|
|
21716
21785
|
},
|
package/dist/dist/cli.js
CHANGED
|
@@ -5329,6 +5329,75 @@ IMPORTANT: Sandbox and production use completely separate credentials and base U
|
|
|
5329
5329
|
docsUrl: "https://ai.google.dev/api",
|
|
5330
5330
|
// there is a openapi spec here: https://generativelanguage.googleapis.com/$discovery/OPENAPI3_0?version=v1beta&key=$GOOGLE_API_KEY - but you need your own google api key to access it
|
|
5331
5331
|
preferredAuthType: "apikey"
|
|
5332
|
+
},
|
|
5333
|
+
tableau: {
|
|
5334
|
+
name: "tableau",
|
|
5335
|
+
apiUrl: "https://{your-server}.online.tableau.com",
|
|
5336
|
+
regex: "^.*(tableau\\.com|online\\.tableau).*$",
|
|
5337
|
+
icon: "lucide:plus",
|
|
5338
|
+
docsUrl: "https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api.htm",
|
|
5339
|
+
preferredAuthType: "apikey",
|
|
5340
|
+
keywords: [
|
|
5341
|
+
"workbooks",
|
|
5342
|
+
"views",
|
|
5343
|
+
"datasources",
|
|
5344
|
+
"projects",
|
|
5345
|
+
"users",
|
|
5346
|
+
"groups",
|
|
5347
|
+
"permissions",
|
|
5348
|
+
"sheets",
|
|
5349
|
+
"published data sources",
|
|
5350
|
+
"sites",
|
|
5351
|
+
"jobs",
|
|
5352
|
+
"favorites",
|
|
5353
|
+
"flows",
|
|
5354
|
+
"metrics",
|
|
5355
|
+
"webhooks",
|
|
5356
|
+
"connected apps",
|
|
5357
|
+
"jwt",
|
|
5358
|
+
"vizql",
|
|
5359
|
+
"row-level security"
|
|
5360
|
+
],
|
|
5361
|
+
systemSpecificInstructions: `Tableau supports two Connected App authentication methods:
|
|
5362
|
+
1. **Direct Trust**: Requires client_id, secret_id, and secret_value \u2014 you generate and sign JWTs yourself
|
|
5363
|
+
2. **OAuth 2.0**: Standard OAuth flow with client_id and client_secret
|
|
5364
|
+
|
|
5365
|
+
DIRECT TRUST CREDENTIALS (from Settings > Connected Apps):
|
|
5366
|
+
- tableau_url: Server URL (e.g., https://prod-uk-a.online.tableau.com)
|
|
5367
|
+
- tableau_site_id: The content URL from browser (e.g., "mysite" from /site/mysite/)
|
|
5368
|
+
- tableau_client_id: Connected App ID
|
|
5369
|
+
- tableau_secret_id: The key ID you generated
|
|
5370
|
+
- tableau_client_secret: The secret value (only shown once when created)
|
|
5371
|
+
|
|
5372
|
+
DIRECT TRUST AUTH FLOW:
|
|
5373
|
+
1. Generate a JWT signed with HMAC-SHA256 using the secret value. Include:
|
|
5374
|
+
- Header: { alg: "HS256", typ: "JWT", kid: secret_id, iss: client_id }
|
|
5375
|
+
- Payload: { iss: client_id, sub: "<username>", aud: "tableau", exp: <now+600>, jti: <uuid>, scp: ["tableau:content:read", "tableau:query:run"] }
|
|
5376
|
+
2. Exchange JWT for access token: POST /api/3.24/auth/signin with body: { credentials: { jwt: "<token>", site: { contentUrl: "<site_id>" } } }
|
|
5377
|
+
3. Use the returned token in X-Tableau-Auth header for all subsequent requests
|
|
5378
|
+
|
|
5379
|
+
AVAILABLE APIs:
|
|
5380
|
+
- REST API (/api/3.24/...): Management & metadata \u2014 list datasources, workbooks, users, download view/dashboard data
|
|
5381
|
+
- Metadata API: GraphQL for relationships and lineage
|
|
5382
|
+
- VizQL Data Service (/api/v1/vizql-data-service/query-datasource): Query datasource rows directly
|
|
5383
|
+
|
|
5384
|
+
ROW-LEVEL SECURITY: The JWT's "sub" claim determines which user's permissions apply. Data is automatically filtered based on that user's access.
|
|
5385
|
+
|
|
5386
|
+
SUPERGLUE EXAMPLE - JWT generation in a transform step (Direct Trust):
|
|
5387
|
+
\`\`\`javascript
|
|
5388
|
+
(data) => {
|
|
5389
|
+
const creds = data._credentials || {};
|
|
5390
|
+
const now = Math.floor(Date.now() / 1000);
|
|
5391
|
+
const header = base64url(JSON.stringify({ alg: 'HS256', typ: 'JWT', kid: creds.tableau_secret_id, iss: creds.tableau_client_id }));
|
|
5392
|
+
const payload = base64url(JSON.stringify({ iss: creds.tableau_client_id, sub: data.username, aud: 'tableau', exp: now + 600, jti: crypto.randomUUID(), scp: ['tableau:content:read', 'tableau:query:run'] }));
|
|
5393
|
+
const signature = crypto.createHmac('sha256', creds.tableau_client_secret).update(header + '.' + payload).digest('base64url');
|
|
5394
|
+
return { jwt: header + '.' + payload + '.' + signature };
|
|
5395
|
+
};
|
|
5396
|
+
\`\`\`
|
|
5397
|
+
|
|
5398
|
+
EXAMPLE WORKFLOWS:
|
|
5399
|
+
- Generate JWT \u2192 Sign in \u2192 List datasources \u2192 Query via VizQL Data Service
|
|
5400
|
+
- Generate JWT \u2192 Sign in \u2192 Get workbook \u2192 Download view/dashboard data as CSV/PDF`
|
|
5332
5401
|
}
|
|
5333
5402
|
};
|
|
5334
5403
|
exports2.systemOptions = [
|
|
@@ -21710,7 +21779,7 @@ var import_node_util = require("util");
|
|
|
21710
21779
|
// package.json
|
|
21711
21780
|
var package_default = {
|
|
21712
21781
|
name: "@superglue/cli",
|
|
21713
|
-
version: "1.1.
|
|
21782
|
+
version: "1.1.4",
|
|
21714
21783
|
bin: {
|
|
21715
21784
|
sg: "./dist/cli.js"
|
|
21716
21785
|
},
|
|
@@ -617,7 +617,7 @@ Drafts live in `.superglue/drafts/<draftId>.json`. Created by `build`, updated b
|
|
|
617
617
|
|
|
618
618
|
## File References
|
|
619
619
|
|
|
620
|
-
Attach files with `--file key=path`. Reference in payloads with `file::<key>`. Auto-parsed
|
|
620
|
+
Attach files with `--file key=path`. Reference in payloads with `file::<key>`. Auto-parsed to JSON.
|
|
621
621
|
|
|
622
622
|
```bash
|
|
623
623
|
sg tool run --draft <id> --payload '{"data": "file::mysheet"}' --file mysheet=data.xlsx
|
|
@@ -617,7 +617,7 @@ Drafts live in `.superglue/drafts/<draftId>.json`. Created by `build`, updated b
|
|
|
617
617
|
|
|
618
618
|
## File References
|
|
619
619
|
|
|
620
|
-
Attach files with `--file key=path`. Reference in payloads with `file::<key>`. Auto-parsed
|
|
620
|
+
Attach files with `--file key=path`. Reference in payloads with `file::<key>`. Auto-parsed to JSON.
|
|
621
621
|
|
|
622
622
|
```bash
|
|
623
623
|
sg tool run --draft <id> --payload '{"data": "file::mysheet"}' --file mysheet=data.xlsx
|
package/package.json
CHANGED
|
@@ -617,7 +617,7 @@ Drafts live in `.superglue/drafts/<draftId>.json`. Created by `build`, updated b
|
|
|
617
617
|
|
|
618
618
|
## File References
|
|
619
619
|
|
|
620
|
-
Attach files with `--file key=path`. Reference in payloads with `file::<key>`. Auto-parsed
|
|
620
|
+
Attach files with `--file key=path`. Reference in payloads with `file::<key>`. Auto-parsed to JSON.
|
|
621
621
|
|
|
622
622
|
```bash
|
|
623
623
|
sg tool run --draft <id> --payload '{"data": "file::mysheet"}' --file mysheet=data.xlsx
|