Skip to content

Commit afb876e

Browse files
authored
docs: standardize license headers (#1028)
1 parent 3aa1333 commit afb876e

File tree

83 files changed

+247
-4
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+247
-4
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ yarn-error.log*
2121

2222
/tmp
2323

24+
.bin/
2425
.idea/
2526

2627
docs/build

.prettierignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ package-lock.json
1010
build/
1111
.next
1212
playwright-report/
13-
.github/pull_request_template.md
13+
.github/pull_request_template.md
14+
src/plugins/

.prettierrc.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
module.exports = {
25
...require("ory-prettier-styles"),
36
overrides: [

Makefile

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ SHELL=/bin/bash -euo pipefail
33
export GO111MODULE := on
44
export PATH := .bin:${PATH}
55

6-
format: node_modules
6+
format: .bin/ory node_modules # formats all source code
7+
.bin/ory dev headers license --exclude=src/plugins
78
npm exec -- prettier --write .
89

910
.PHONY: install
@@ -36,8 +37,8 @@ test: install build-examples .bin/ory
3637
curl https://raw.githubusercontent.com/ory/ci/master/licenses/install | sh
3738

3839
.bin/ory: Makefile
39-
bash <(curl https://raw.githubusercontent.com/ory/meta/master/install.sh) -d -b .bin ory v0.1.44
40-
touch -a -m .bin/ory
40+
curl https://raw.githubusercontent.com/ory/meta/master/install.sh | bash -s -- -b .bin ory v0.1.47
41+
touch .bin/ory
4142

4243
node_modules: package-lock.json
4344
npm ci

code-examples/auth-api/expressjs/index.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
const express = require("express")
25
const cors = require("cors")
36
const { V0alpha2Api, Configuration } = require("@ory/client")

code-examples/oathkeeper/ws/main.go

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
package main
25

36
import (

code-examples/oathkeeper/ws/main_test.go

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
package main
25

36
import (

code-examples/protect-page-login/expressjs/app.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
var createError = require("http-errors")
25
var express = require("express")
36
var path = require("path")

code-examples/protect-page-login/expressjs/routes/index.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
var express = require("express")
25
var router = express.Router()
36
// highlight-start

code-examples/protect-page-login/flutter_web_redirect/lib/main.dart

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
import 'dart:html';
25
import 'package:dio/adapter_browser.dart';
36
import 'package:dio/browser_imp.dart';

code-examples/protect-page-login/flutter_web_redirect/lib/services/auth.dart

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
import 'dart:convert';
25

36
import 'package:dio/dio.dart';

code-examples/protect-page-login/go/handler.go

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
package main
25

36
import (

code-examples/protect-page-login/go/main.go

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
package main
25

36
import (

code-examples/protect-page-login/go/middleware.go

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
package main
25

36
import (

code-examples/protect-page-login/nextjs/next-env.d.ts

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
/// <reference types="next" />
25
/// <reference types="next/image-types/global" />
36

code-examples/protect-page-login/nextjs/next.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
/** @type {import('next').NextConfig} */
25
const nextConfig = {
36
reactStrictMode: true,

code-examples/protect-page-login/nextjs/pages/api/.ory/[...paths].ts

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
// @ory/integrations offers a package for integrating with Next.js.
25
import { config, createApiHandler } from "@ory/integrations/next-edge"
36

code-examples/protect-page-login/php/app.php

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
<?php
25

36
class App {

code-examples/protect-page-login/php/index.php

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
<?php
25
require 'vendor/autoload.php';
36
require_once 'app.php';
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
/// <reference types="react-scripts" />

code-examples/protect-page-login/react/src/reportWebVitals.ts

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
import { ReportHandler } from "web-vitals"
25

36
const reportWebVitals = (onPerfEntry?: ReportHandler) => {

code-examples/protect-page-login/react/src/setupTests.ts

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
// jest-dom adds custom jest matchers for asserting on DOM nodes.
25
// allows you to do things like:
36
// expect(element).toHaveTextContent(/react/i)
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
module.exports = {
25
presets: ["@vue/cli-plugin-babel/preset"],
36
}

code-examples/protect-page-login/vue/src/App.vue

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
<!-- Copyright © 2022 Ory Corp -->
2+
<!-- SPDX-License-Identifier: Apache-2.0 -->
3+
14
<template>
25
<img alt="Vue logo" src="./assets/logo.png" />
36
<HelloWorld msg="Welcome to Your Ory + Vue.js App" />

code-examples/protect-page-login/vue/src/components/HelloWorld.vue

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
<!-- Copyright © 2022 Ory Corp -->
2+
<!-- SPDX-License-Identifier: Apache-2.0 -->
3+
14
<template>
25
<div class="main">
36
<h1>{{ msg }}</h1>

code-examples/protect-page-login/vue/src/main.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
import { createApp } from "vue"
25
import App from "./App.vue"
36

code-examples/protect-page-login/vue/vue.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
const { defineConfig } = require("@vue/cli-service")
25
module.exports = defineConfig({
36
transpileDependencies: true,

code-examples/validate-jwt/nodejs/index.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
// This is the middleware which protects the endpoint. It requires a valid
25
// JSON Web Token signed by a key provided by the Ory Proxy.
36
import jwt from "express-jwt"

docs/kratos/self-service/flows/code/login/index.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
export const getFlowMethodPasswordWithErrors = {
25
browser: {
36
label: "Browser UI",

docs/kratos/self-service/flows/code/logout/index.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
import logoutCode from "@site/src/theme/logoutCode"
25
export const apiFlow = {
36
curl: {

docs/kratos/self-service/flows/code/recovery/index.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
export const getFlowMethodLinkWithErrors = {
25
browser: {
36
label: "Browser UI",

docs/kratos/self-service/flows/code/registration/index.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
export const getFlowMethodPasswordWithErrors = {
25
browser: {
36
label: "Browser UI",

docs/kratos/self-service/flows/code/settings/index.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
import mp4 from "./images/browser-privileged-update.mp4"
25
import webm from "./images/browser-privileged-update.webm"
36

docs/kratos/self-service/flows/code/verification/index.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
export const getFlowMethodLinkWithErrors = {
25
browser: {
36
label: "Browser UI",

docusaurus.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
const githubPrismTheme = require("prism-react-renderer/themes/github")
25

36
const prismThemeLight = {

jest.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
module.exports = {
25
testEnvironment: "node",
36
testMatch: ["**/?(*.)+(test).[jt]s?(x)"],

playwright.config.ts

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
import type { PlaywrightTestConfig } from "@playwright/test"
25
import { devices } from "@playwright/test"
36

src/config/hydra/config.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
module.exports = {
25
projectName: "Ory Hydra",
36
projectSlug: "hydra",

src/config/hydra/docusaurus.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
const config = require("./contrib/config.js")
25
const fs = require("fs")
36

src/config/keto/config.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
module.exports = {
25
projectName: "ORY Oathkeeper",
36
projectSlug: "oathkeeper",

src/config/keto/docusaurus.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
const config = require("./contrib/config.js")
25
const fs = require("fs")
36

src/config/kratos/config.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
module.exports = {
25
projectName: "Ory Kratos",
36
projectSlug: "kratos",

src/config/kratos/docusaurus.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
const config = require("./contrib/config.js")
25
const fs = require("fs")
36

src/config/oathkeeper/config.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
module.exports = {
25
projectName: "ORY Oathkeeper",
36
projectSlug: "oathkeeper",

src/config/oathkeeper/docusaurus.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
const config = require("./contrib/config.js")
25
const fs = require("fs")
36

src/hooks/index.ts

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
import { useEffect, useState } from "react"
25
import { Configuration, V0alpha2Api } from "@ory/client"
36
import { Octokit } from "@octokit/rest"

src/pages/http-api.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
import React from "react"
25
import ApiDoc from "@theme/ApiDoc"
36
import useBaseUrl from "@docusaurus/useBaseUrl"

src/scripts/config.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
const RefParser = require("json-schema-ref-parser")
25
const parser = new RefParser()
36
const jsf = require("json-schema-faker").default

src/scripts/docker-tag.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
const fs = require("fs")
25
const path = require("path")
36

src/scripts/fix-api.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
const fs = require("fs")
25
const prettier = require("prettier")
36
const prettierStyles = require("ory-prettier-styles")

src/scripts/gen-faq.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
// gen-faq.js
25
// generates faq.mdx and faq.module.css from the contents of faq.yaml. See https://github.com/ory/kratos/pull/1039.
36
const fs = require("fs")

src/scripts/rerelease.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
const path = require("path")
25
const name = process.argv[2]
36
const fs = require("fs")

src/sidebar.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
module.exports = {
25
docs: [
36
{

src/static/scripts/init.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
;(function () {
25
const script = document.createElement("script")
36
script.src = "https://www.ory.sh/scripts.js"

src/static/scripts/redirect.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright © 2022 Ory Corp
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
// Needed as a workaround for https://answers.netlify.com/t/trailing-slash-missing-on-proxied-netlify-site/36367
25
;(function () {
36
if (location.pathname === "/docs") {

0 commit comments

Comments
 (0)