Skip to content

Commit

Permalink
[COMPLIANCE] Add Copyright and License Headers
Browse files Browse the repository at this point in the history
  • Loading branch information
hashicorp-copywrite[bot] committed Jul 15, 2024
1 parent 27b748c commit 4f456a1
Show file tree
Hide file tree
Showing 282 changed files with 1,388 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

# For configuration details, see:
# https://circleci.com/docs/2.0/configuration-reference
version: 2.1
Expand Down
3 changes: 3 additions & 0 deletions .copywrite.hcl
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

project {
header_ignore = [
# This is a forked version of https://github.com/cyrilwanner/next-optimized-images with a small patch applied
Expand Down
5 changes: 5 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

module.exports = {
root: true,
extends: './packages/cli/config/.eslintrc.js',
Expand Down
5 changes: 5 additions & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

module.exports = {
extends: [
require('path').resolve(
Expand Down
5 changes: 5 additions & 0 deletions global.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

/// <reference types="@hashicorp/platform-types" />
5 changes: 5 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

const makeConfig = require('./packages/configs/jest/config')

const isRunningInEsmMode = !!process.env.TEST_ESM
Expand Down
5 changes: 5 additions & 0 deletions packages/analytics/__tests__/analytics-js-helpers.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
/** @jest-environment jsdom */
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { jest } from '@jest/globals'
import {
getSegmentId,
Expand Down
5 changes: 5 additions & 0 deletions packages/analytics/add-cloud-link-handler/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { getProductIntentFromURL } from '../get-product-intent-from-url'
import { getUTMParamsCaptureState } from '../utm-params-capture'

Expand Down
5 changes: 5 additions & 0 deletions packages/analytics/add-global-link-handler/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { getSegmentId } from '../analytics-js-helpers'
import { getProductIntentFromURL } from '../get-product-intent-from-url'
import { getUTMParamsCaptureState } from '../utm-params-capture'
Expand Down
5 changes: 5 additions & 0 deletions packages/analytics/analytics-event-logger/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import type { Plugin, Context } from '@segment/analytics-next'

function createLogger(type: string) {
Expand Down
5 changes: 5 additions & 0 deletions packages/analytics/analytics-js-helpers.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

/**
* This method provides various helpers that wrap Segment's window.analytics API.
*/
Expand Down
5 changes: 5 additions & 0 deletions packages/analytics/get-product-intent-from-url/index.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
/** @jest-environment jsdom */
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { getProductIntentFromURL } from '.'

describe('getProductIntentFromURL', () => {
Expand Down
5 changes: 5 additions & 0 deletions packages/analytics/get-product-intent-from-url/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

const products = [
'packer',
'terraform',
Expand Down
5 changes: 5 additions & 0 deletions packages/analytics/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import usePageviewAnalytics from './use-page-view-analytics'

export { default as useErrorPageAnalytics } from './use-error-page-analytics'
Expand Down
5 changes: 5 additions & 0 deletions packages/analytics/use-error-page-analytics/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { useEffect } from 'react'

/**
Expand Down
5 changes: 5 additions & 0 deletions packages/analytics/use-page-view-analytics/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { useEffect } from 'react'
import { useRouter } from 'next/router'
import { trackPageview, load } from 'fathom-client'
Expand Down
5 changes: 5 additions & 0 deletions packages/analytics/utm-params-capture/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import Cookies from 'js-cookie'

const UTM_ALLOW_LIST = [
Expand Down
5 changes: 5 additions & 0 deletions packages/cli/__tests__/fixtures/invalid.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

.foo {
color: #4f;
}
5 changes: 5 additions & 0 deletions packages/cli/__tests__/fixtures/invalid.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

function sayHello() {
return 'hello'
}
5 changes: 5 additions & 0 deletions packages/cli/__tests__/fixtures/prettier.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

console.log(
"foo"
)
5 changes: 5 additions & 0 deletions packages/cli/__tests__/fixtures/prettier.original.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

console.log(
"foo"
)
5 changes: 5 additions & 0 deletions packages/cli/__tests__/fixtures/valid.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

.foo {
color: red;
}
5 changes: 5 additions & 0 deletions packages/cli/__tests__/fixtures/valid.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

function sayHello() {
return 'hello'
}
Expand Down
5 changes: 5 additions & 0 deletions packages/cli/__tests__/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

const path = require('path')
const fs = require('fs')
const { execSync } = require('child_process')
Expand Down
5 changes: 5 additions & 0 deletions packages/cli/config/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

module.exports = {
// The parser is inherited from the eslint-config-next, extended here
extends: ['eslint:recommended', 'plugin:prettier/recommended', 'next'],
Expand Down
5 changes: 5 additions & 0 deletions packages/cli/config/lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

module.exports = {
'*.+(css|js|jsx|ts|tsx|md|yml|yaml|json|html|graphql)': (filenames) => {
return [
Expand Down
5 changes: 5 additions & 0 deletions packages/cli/config/prettier.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

module.exports = {
semi: false,
singleQuote: true,
Expand Down
5 changes: 5 additions & 0 deletions packages/cli/config/stylelint.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

const { rules: cssModulesRules } = require('stylelint-config-css-modules')

/** Options directly imported from stylelint-config-css-modules */
Expand Down
5 changes: 5 additions & 0 deletions packages/cli/generators/component/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

const path = require('path')
const inquirer = require('inquirer')
const chalk = require('chalk')
Expand Down
5 changes: 5 additions & 0 deletions packages/cli/generators/component/templates/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import s from './style.module.css'
import { <%= componentClass %>Props } from './types'

Expand Down
5 changes: 5 additions & 0 deletions packages/cli/generators/component/templates/style.module.css
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

.root {
}
5 changes: 5 additions & 0 deletions packages/cli/generators/component/templates/types.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

export interface <%= componentClass %>Props {
}
5 changes: 5 additions & 0 deletions packages/cli/generators/glossary-term/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

const path = require('path')
const inquirer = require('inquirer')
const chalk = require('chalk')
Expand Down
5 changes: 5 additions & 0 deletions packages/cli/generators/ignore-build-step/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

const path = require('path')
const fs = require('fs')
const { promisify } = require('util')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/bin/bash
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0


# This is run during the website build step to determine if we should skip the build or not.
# More information: https://vercel.com/docs/platform/projects#ignored-build-step
Expand Down
5 changes: 5 additions & 0 deletions packages/cli/generators/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

const component = require('./component')
const website = require('./website')
const page = require('./page')
Expand Down
5 changes: 5 additions & 0 deletions packages/cli/generators/page/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

const path = require('path')
const inquirer = require('inquirer')
const chalk = require('chalk')
Expand Down
5 changes: 5 additions & 0 deletions packages/cli/generators/page/templates/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import './style.css'
import { fetch } from '@hashicorp/nextjs-scripts/dato/client'
import query from './query.graphql'
Expand Down
5 changes: 5 additions & 0 deletions packages/cli/generators/page/templates/index_nodata.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import './style.css'

export default function <%= pageClass %>() {
Expand Down
5 changes: 5 additions & 0 deletions packages/cli/generators/page/templates/style.css
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

#p-<%= page %> {
}
5 changes: 5 additions & 0 deletions packages/cli/generators/util.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

const fse = require('fs-extra')
const path = require('path')
const ejs = require('ejs')
Expand Down
5 changes: 5 additions & 0 deletions packages/cli/generators/website/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

const path = require('path')
const inquirer = require('inquirer')
const chalk = require('chalk')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

version: 2
jobs:
build-website-docker-image:
Expand Down
3 changes: 3 additions & 0 deletions packages/cli/generators/website/templates/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

FROM node:10.16.3-alpine
RUN apk add --update --no-cache git make g++ automake autoconf libtool nasm libpng-dev

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import fragment from './fragment.graphql'
import Image from '@hashicorp/react-image'

Expand Down
Loading

0 comments on commit 4f456a1

Please sign in to comment.