Skip to content

Commit

Permalink
Merge branch 'main' of github.com:kinde-oss/kinde-auth-nextjs into pe…
Browse files Browse the repository at this point in the history
…ter/fix/safari-cookie-bug
  • Loading branch information
peterphanouvong committed Aug 29, 2023
2 parents 89ad738 + 51721bd commit f0bf238
Show file tree
Hide file tree
Showing 93 changed files with 12,076 additions and 1,714 deletions.
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
dist
.DS_Store
coverage
18 changes: 18 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"env": {
"browser": true,
"es2021": true
},
"globals": {
"window": true,
"module": true,
"jest": true
},
"extends": ["eslint:recommended", "prettier"],
"parserOptions": {
"ecmaVersion": 13,
"sourceType": "module"
},
"plugins": ["jest"],
"rules": {}
}
4 changes: 4 additions & 0 deletions .github/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
dist
.DS_Store
coverage
18 changes: 18 additions & 0 deletions .github/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"env": {
"browser": true,
"es2021": true
},
"globals": {
"window": true,
"module": true,
"jest": true
},
"extends": ["plugin:jest/recommended", "eslint:recommended", "prettier"],
"parserOptions": {
"ecmaVersion": 13,
"sourceType": "module"
},
"plugins": ["jest"],
"rules": {}
}
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Release and Publish to NPM
on: workflow_dispatch
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Install dependencies and build 🔧
run: npm ci
- name: Initialize Git user
run: |
git config --global user.email "engineering@kinde.com"
git config --global user.name "Kinde Engineering"
- name: Initialize NPM config
run: npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
env:
NPM_TOKEN: ${{secrets.npm_token}}
- name: Run release
run: npm run release --ci
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
NPM_TOKEN: ${{secrets.npm_token}}
- name: End message
run: echo 'Job done'
5 changes: 5 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"singleQuote": true,
"trailingComma": "none",
"bracketSpacing": false
}
16 changes: 16 additions & 0 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"git": {
"requireBranch": "main",
"commitMessage": "chore: release v${version}"
},
"hooks": {
"before:init": ["git pull", "npm run lint"],
"after:bump": "npx auto-changelog -p && npm run build"
},
"github": {
"release": true
},
"npm": {
"publish": true
}
}
1 change: 1 addition & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @daveordead @peterphanouvong
3 changes: 0 additions & 3 deletions SECURITY.md

This file was deleted.

24 changes: 24 additions & 0 deletions clientConfig/rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
const packageJson = require('./package.json');

import babel from '@rollup/plugin-babel';
import {terser} from 'rollup-plugin-terser';

export default {
plugins: [babel({babelHelpers: 'bundled'}), terser()],
input: './src/index.js',
output: [
{
file: packageJson.module,
format: 'esm',
sourcemap: true,
exports: 'named'
},
{
file: packageJson.main,
format: 'cjs',
sourcemap: true,
exports: 'named'
}
],
external: ['react', 'react-dom']
};
11 changes: 6 additions & 5 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { ReactElement } from "react";
import {ReactElement} from 'react';

export declare function useKindeAuth(): State;

export declare function KindeProvider({
children,
children
}: {
children: any;
}): ReactElement<State>;

export declare function handleAuth(): any;

export type User = {
Expand All @@ -29,9 +30,9 @@ export type KindePermission = {
orgCode: string;
};

export type KindeFlagTypeCode = "b" | "i" | "s";
export type KindeFlagTypeCode = 'b' | 'i' | 's';

export type KindeFlagTypeValue = "boolean" | "integer" | "string";
export type KindeFlagTypeValue = 'boolean' | 'integer' | 'string';

export type KindeFlag = {
code: string;
Expand Down Expand Up @@ -63,7 +64,7 @@ export type State = {
) => KindeFlag;
getBooleanFlag: (code: string, defaultValue?: boolean) => boolean;
getStringFlag: (code, defaultValue) => string;
getIntegerFlag: (code, defaultValue) => integer;
getIntegerFlag: (code, defaultValue) => number;
getPermissions: () => KindePermissions;
getPermission: (key: string) => KindePermission;
getOrganization: () => KindeOrganization;
Expand Down
10 changes: 0 additions & 10 deletions nextjs-workspace.code-workspace

This file was deleted.

Loading

0 comments on commit f0bf238

Please sign in to comment.