Skip to content

Commit 95f6e1a

Browse files
authored
Merge pull request #63 from instantcommerce/feat/rebranding
feat: rebranding
2 parents bd925f6 + aa9c743 commit 95f6e1a

16 files changed

+1676
-2713
lines changed

.github/workflows/release.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Setup Node.js
1616
uses: actions/setup-node@v2
1717
with:
18-
node-version: 12
18+
node-version: 16
1919
- name: Install dependencies
2020
run: yarn
2121
- name: Release

.github/workflows/test.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Setup Node.js
1919
uses: actions/setup-node@v2
2020
with:
21-
node-version: 12
21+
node-version: 16
2222

2323
- name: Get yarn cache directory path
2424
id: yarn-cache-dir-path

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2021 Story of AMS
3+
Copyright (c) 2021 Instant Commerce
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
<p align="center">
2-
<a aria-label="Story of AMS logo" href="https://storyofams.com/" target="_blank" align="center">
3-
<img src="https://avatars.githubusercontent.com/u/19343504" alt="Story of AMS" width="100">
2+
<a aria-label="Instant Commerce logo" href="https://instantcommerce.io/" target="_blank" align="center">
3+
<img src="https://avatars.githubusercontent.com/u/93975473" alt="Instant Commerce" width="100">
44
</a>
5-
<h1 align="center">@storyofams/next-password-protect</h1>
5+
<h1 align="center">next-password-protect</h1>
66
<p align="center">
7-
<a aria-label="releases" href="https://GitHub.com/storyofams/next-password-protect/releases/" target="_blank">
8-
<img src="https://github.com/storyofams/next-password-protect/workflows/Release/badge.svg">
7+
<a aria-label="releases" href="https://github.com/instantcommerce/next-password-protect/releases/" target="_blank">
8+
<img src="https://github.com/instantcommerce/next-password-protect/workflows/Release/badge.svg">
99
</a>
10-
<a aria-label="npm" href="https://www.npmjs.com/package/@storyofams/next-password-protect" target="_blank">
11-
<img src="https://img.shields.io/npm/v/@storyofams/next-password-protect">
10+
<a aria-label="npm" href="https://www.npmjs.com/package/next-password-protect" target="_blank">
11+
<img src="https://img.shields.io/npm/v/next-password-protect">
1212
</a>
13-
<a aria-label="codecov" href="https://codecov.io/gh/storyofams/next-password-protect" target="_blank">
14-
<img src="https://codecov.io/gh/storyofams/next-password-protect/branch/master/graph/badge.svg?token=ZV0YT4HU5H">
13+
<a aria-label="codecov" href="https://codecov.io/gh/instantcommerce/next-password-protect" target="_blank">
14+
<img src="https://codecov.io/gh/instantcommerce/next-password-protect/branch/master/graph/badge.svg?token=ZV0YT4HU5H">
1515
</a>
16-
<a aria-label="stars" href="https://github.com/storyofams/next-password-protect/stargazers/" target="_blank">
17-
<img src="https://img.shields.io/github/stars/storyofams/next-password-protect.svg?style=social&label=Star&maxAge=86400" />
16+
<a aria-label="stars" href="https://github.com/instantcommerce/next-password-protect/stargazers/" target="_blank">
17+
<img src="https://img.shields.io/github/stars/instantcommerce/next-password-protect.svg?style=social&label=Star&maxAge=86400" />
1818
</a>
1919
</p>
2020
<p align="center">Password protect your Next.js deployments. <a href="http://next-password-protect.vercel.app/" target="_blank">View demo</a> (Password is <b>secret</b>)</p>
@@ -39,9 +39,9 @@ This library adds a password prompt to your Next.js deployment. It consists of t
3939
## Installation
4040

4141
```sh
42-
yarn add @storyofams/next-password-protect
42+
yarn add next-password-protect
4343
# or
44-
npm install @storyofams/next-password-protect
44+
npm install next-password-protect
4545
```
4646

4747
## Usage
@@ -66,7 +66,7 @@ module.exports = {
6666
Add two api routes, one with the `loginHandler` and one with the `passwordCheckHandler` api function. You can name them anything, as long as you pass the names to `loginApiUrl` and `checkApiUrl` respectively, in the next step. By default it expects `/login` and `/passwordCheck`.
6767

6868
```javascript
69-
import { loginHandler } from "@storyofams/next-password-protect";
69+
import { loginHandler } from "next-password-protect";
7070

7171
export default loginHandler("YOUR_SECRET_PASSWORD", {
7272
// Options go here (optional)
@@ -75,7 +75,7 @@ export default loginHandler("YOUR_SECRET_PASSWORD", {
7575
```
7676

7777
```javascript
78-
import { passwordCheckHandler } from "@storyofams/next-password-protect";
78+
import { passwordCheckHandler } from "next-password-protect";
7979

8080
export default passwordCheckHandler("YOUR_SECRET_PASSWORD", {
8181
// Options go here (optional)
@@ -88,7 +88,7 @@ export default passwordCheckHandler("YOUR_SECRET_PASSWORD", {
8888
Add the `withPasswordProtect` HOC to the default export of `App` in `pages/_app.tsx`:
8989

9090
```javascript
91-
import { withPasswordProtect } from "@storyofams/next-password-protect";
91+
import { withPasswordProtect } from "next-password-protect";
9292

9393
// Before: export default App;
9494
export default process.env.PASSWORD_PROTECT

example/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<p align="center">
2-
<a href="https://storyofams.com/" target="_blank" align="center">
3-
<img src="https://storyofams.com/public/[email protected]" alt="Story of AMS" width="120">
2+
<a href="https://instantcommerce.io/" target="_blank" align="center">
3+
<img src="https://avatars.githubusercontent.com/u/93975473" alt="Instant Commerce" width="120">
44
</a>
5-
<h1 align="center">@storyofams/next-password-protect example</h1>
5+
<h1 align="center">next-password-protect example</h1>
66
</p>
77

88
## Setup

example/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"dependencies": {
1616
"@reach/alert": "^0.7.4",
1717
"@storyofams/react-helpers": "0.3.6",
18-
"@storyofams/next-password-protect": "link:..",
18+
"next-password-protect": "link:..",
1919
"@styled-system/css": "^5.1.4",
2020
"@styled-system/props": "^5.1.4",
2121
"@svgr/webpack": "^5.0.1",
@@ -106,4 +106,4 @@
106106
"git add"
107107
]
108108
}
109-
}
109+
}

example/src/pages/_app.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ class MyApp extends App {
3030
export default process.env.PASSWORD_PROTECT
3131
? withPasswordProtect(MyApp, {
3232
loginComponentProps: {
33-
backUrl: 'https://github.com/storyofams/next-password-protect',
34-
logo: 'https://storyofams.com/public/[email protected]',
33+
backUrl: 'https://github.com/instantcommerce/next-password-protect',
34+
logo: 'https://avatars.githubusercontent.com/u/93975473',
3535
},
3636
})
3737
: App;

example/src/pages/api/login.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { loginHandler } from '@storyofams/next-password-protect';
1+
import { loginHandler } from 'next-password-protect';
22

33
export default loginHandler(process.env.STAGING_PASSWORD, {
44
cookieName: 'authorization',

example/src/pages/api/logout.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { logoutHandler } from '@storyofams/next-password-protect';
1+
import { logoutHandler } from 'next-password-protect';
22

33
export default logoutHandler({
44
cookieName: 'authorization',

example/src/pages/api/passwordCheck.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { passwordCheckHandler } from '@storyofams/next-password-protect';
1+
import { passwordCheckHandler } from 'next-password-protect';
22

33
export default passwordCheckHandler(process.env.STAGING_PASSWORD, {
44
cookieName: 'authorization',

0 commit comments

Comments
 (0)