Skip to content

Commit bbe2109

Browse files
authored
chore: update APIX extension deployment (#1321)
1 parent f43948f commit bbe2109

File tree

3 files changed

+33
-28
lines changed

3 files changed

+33
-28
lines changed

packages/extension-api-explorer/README.md

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,14 @@
33
The API Explorer extension can be manually installed and run with a Looker instance using the following steps:
44

55
1. create a new LookML project called `apix`
6-
2. create a new model. In `apix.model`, put:
6+
1. create a new model. In `apix.model`, put:
77
```lookml
88
connection: "<any valid connection name>"
99
```
10-
3. in `manifest.lkml` put:
11-
```lookml
12-
project_name: "api-explorer"
13-
application: api-explorer {
14-
label: "API Explorer"
15-
# file: "bundle.js"
16-
url: "https://localhost:8080/dist/bundle.js"
17-
entitlements: {
18-
local_storage: yes
19-
navigation: no
20-
new_window: yes
21-
new_window_external_urls: ["https://looker.com/*", "https://developer.mozilla.org/*", "https://docs.looker.com/*"]
22-
raw_api_request: yes
23-
use_form_submit: yes
24-
use_embeds: yes
25-
use_clipboard: yes
26-
core_api_methods: ["versions", "api_spec"]
27-
external_api_urls : ["https://raw.githubusercontent.com","http://localhost:30000","https://localhost:8080","https://static-a.cdn.looker.app","https://docs.looker.com","https://developer.mozilla.org/"]
28-
oauth2_urls: []
29-
}
30-
}
31-
```
32-
the `http://localhost:30000` is for when you want to use the [API Explorer file server](/apix-files/README.md)
33-
4. save all changes and deploy to production
34-
5. in the root of `sdk-codegen`:
10+
1. Use the contents of the linked [`manifest.lkml`](manifest.lkml) as the project's `manifest.lkml`. The `http://localhost:30000` url is for the optional [API Explorer file server](/apix-files/README.md)
11+
1. save all changes and deploy to production
12+
1. in the root of `sdk-codegen`:
3513
```sh
3614
yarn && yarn build && yarn dev:xapix
3715
```
38-
6. on the Looker web page, click `Browse|API Explorer` to view the API Explorer
16+
1. on the Looker web page, click `Browse|API Explorer` to view the API Explorer

packages/extension-api-explorer/bin/deploy

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ rm -rf dist/
2828
echo "Creating extension-api-explorer production bundle"
2929
yarn bundle
3030
BUNDLE=$(pwd)"/dist/bundle.js"
31+
MANIFEST=$(pwd)"/manifest.lkml"
3132

3233
cd "${ROOT}"/..
3334
if [ -d "extension-api-explorer" ]
@@ -42,7 +43,8 @@ fi
4243
echo "Copying extension bundle into repo"
4344
git checkout main || { echo "Error checking out branch"; exit 1; }
4445
cp "${BUNDLE}" .
46+
cp "${MANIFEST}" .
4547
echo "Pushing changes to remote"
46-
git add bundle.js && git commit -m "${commit_msg}" && git push || { exit 1; }
48+
git add bundle.js manifest.lkml && git commit -m "${commit_msg}" && git push || { exit 1; }
4749
echo "The extension's bundle commit hash is:"
4850
git rev-parse HEAD
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
project_name: "api-explorer"
2+
3+
application: api-explorer {
4+
label: "API Explorer"
5+
# file: "bundle.js"
6+
url: "https://localhost:8080/dist/bundle.js"
7+
entitlements: {
8+
local_storage: yes
9+
navigation: no
10+
new_window: yes
11+
new_window_external_urls: ["https://looker.com/*", "https://developer.mozilla.org/*", "https://docs.looker.com/*"]
12+
raw_api_request: yes
13+
use_form_submit: yes
14+
use_embeds: yes
15+
use_clipboard: yes
16+
core_api_methods: ["versions", "api_spec"]
17+
external_api_urls : ["https://raw.githubusercontent.com","http://localhost:30000","https://localhost:8080","https://static-a.cdn.looker.app","https://docs.looker.com","https://developer.mozilla.org/"]
18+
oauth2_urls: []
19+
}
20+
}
21+
22+
constant: CONNECTION_NAME {
23+
value: ""
24+
export: override_optional
25+
}

0 commit comments

Comments
 (0)