-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #81 from storyblok/EXT-2186-update-storyblok-cli
feat: add region-helper functionality
- Loading branch information
Showing
21 changed files
with
109 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "npm" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" | ||
allow: | ||
- dependency-name: "@storyblok/region-helper" | ||
reviewers: | ||
- "storyblok/plugins-team" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,7 @@ | |
"author": "Dominik Angerer <[email protected]>, Alexander Feiglstorfer <[email protected]>", | ||
"license": "MIT", | ||
"dependencies": { | ||
"@storyblok/region-helper": "^1.0.0", | ||
"axios": "^0.27.2", | ||
"chalk": "^4.1.0", | ||
"clear": "0.1.0", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const { getRegionBaseUrl } = require('@storyblok/region-helper') | ||
|
||
const getRegionApiEndpoint = (region) => `${getRegionBaseUrl(region)}/v1/` | ||
|
||
module.exports = { | ||
getRegionApiEndpoint | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
const { getRegionApiEndpoint } = require('../src/utils/region') | ||
const { EU_CODE } = require('@storyblok/region-helper') | ||
const EMAIL_TEST = '[email protected]' | ||
const PASSWORD_TEST = 'test' | ||
const TOKEN_TEST = 'storyblok1234' | ||
const REGION_TEST = 'eu' | ||
const REGION_TEST = EU_CODE | ||
|
||
// use functions to always returns 'new' data | ||
const FAKE_COMPONENTS = () => [ | ||
|
@@ -289,9 +291,15 @@ const FAKE_PRESET = () => ({ | |
description: 'page preset' | ||
}) | ||
|
||
const USERS_ROUTES = { | ||
LOGIN: `${getRegionApiEndpoint(EU_CODE)}users/login`, | ||
SIGNUP: `${getRegionApiEndpoint(EU_CODE)}users/signup` | ||
} | ||
|
||
module.exports = { | ||
EMAIL_TEST, | ||
TOKEN_TEST, | ||
USERS_ROUTES, | ||
FAKE_STORIES, | ||
PASSWORD_TEST, | ||
FAKE_COMPONENTS, | ||
|
Oops, something went wrong.