diff --git a/frontend/package.json b/frontend/package.json index ef76f662ec..b8f282b888 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,7 +1,7 @@ { "name": "unleash-frontend", "description": "unleash your features", - "version": "1.0.0", + "version": "1.0.0-alpha.2", "keywords": [ "unleash", "feature toggle", @@ -9,7 +9,8 @@ "toggle" ], "files": [ - "public" + "dist", + "index.js" ], "repository": { "type": "git", @@ -30,7 +31,8 @@ "lint": "eslint . --ext=js,jsx", "test": "echo 'no test'", "test:ci": "npm run test", - "prepublish": "npm run build" + "prepublish": "npm run build", + "postinstall": "npm run build" }, "main": "./index.js", "dependencies": { diff --git a/frontend/src/data/archive-api.js b/frontend/src/data/archive-api.js index 29f6ae3743..21724b6bd7 100644 --- a/frontend/src/data/archive-api.js +++ b/frontend/src/data/archive-api.js @@ -1,6 +1,6 @@ import { throwIfNotSuccess, headers } from './helper'; -const URI = '/archive'; +const URI = '/api/archive'; function fetchAll () { return fetch(`${URI}/features`) diff --git a/frontend/src/data/client-instance-api.js b/frontend/src/data/client-instance-api.js index bb56fd43a2..ad6882c078 100644 --- a/frontend/src/data/client-instance-api.js +++ b/frontend/src/data/client-instance-api.js @@ -1,6 +1,6 @@ import { throwIfNotSuccess, headers } from './helper'; -const URI = '/client/instances'; +const URI = '/api/client/instances'; function fetchAll () { return fetch(URI, { headers }) diff --git a/frontend/src/data/client-strategy-api.js b/frontend/src/data/client-strategy-api.js index d97642f233..1681d74be1 100644 --- a/frontend/src/data/client-strategy-api.js +++ b/frontend/src/data/client-strategy-api.js @@ -1,6 +1,6 @@ import { throwIfNotSuccess, headers } from './helper'; -const URI = '/client/strategies'; +const URI = '/api/client/strategies'; function fetchAll () { return fetch(URI, { headers }) diff --git a/frontend/src/data/feature-api.js b/frontend/src/data/feature-api.js index 5cf22290f8..39ed242606 100644 --- a/frontend/src/data/feature-api.js +++ b/frontend/src/data/feature-api.js @@ -1,7 +1,7 @@ import { throwIfNotSuccess, headers } from './helper'; -const URI = '/features'; -const URI_VALIDATE = '/features-validate'; +const URI = '/api/features'; +const URI_VALIDATE = '/api/features-validate'; function fetchAll () { return fetch(URI) diff --git a/frontend/src/data/history-api.js b/frontend/src/data/history-api.js index 48037fa52a..d8d7a28c17 100644 --- a/frontend/src/data/history-api.js +++ b/frontend/src/data/history-api.js @@ -1,6 +1,6 @@ import { throwIfNotSuccess } from './helper'; -const URI = '/events'; +const URI = '/api/api/events'; function fetchAll () { return fetch(URI) diff --git a/frontend/src/data/metrics-api.js b/frontend/src/data/metrics-api.js index dbbdf19b76..53d1867894 100644 --- a/frontend/src/data/metrics-api.js +++ b/frontend/src/data/metrics-api.js @@ -1,6 +1,6 @@ import { throwIfNotSuccess } from './helper'; -const URI = '/metrics'; +const URI = '/api/metrics'; function fetchAll () { return fetch(URI) diff --git a/frontend/src/data/strategy-api.js b/frontend/src/data/strategy-api.js index 9aa061fe10..d466805ae9 100644 --- a/frontend/src/data/strategy-api.js +++ b/frontend/src/data/strategy-api.js @@ -1,6 +1,6 @@ import { throwIfNotSuccess, headers } from './helper'; -const URI = '/strategies'; +const URI = '/api/strategies'; function fetchAll () { return fetch(URI)