+ * SPDX-License-Identifier: Apache-2.0
+ */
import React from "react";
import Button from "react-bootstrap/Button";
@@ -163,7 +154,8 @@ export default class SamplesTable extends React.Component {
>
{key} |
- {Object.keys(value).length > 0 || value instanceof Object
+ {Object.keys(value).length > 0 ||
+ value instanceof Object
? JSON.stringify(value)
: value}
diff --git a/client/src/components/schema/SampleDataPanel/SamplesTable.test.js b/client/src/components/schema/SampleDataPanel/SamplesTable.test.js
index dac6b45e..14fca647 100644
--- a/client/src/components/schema/SampleDataPanel/SamplesTable.test.js
+++ b/client/src/components/schema/SampleDataPanel/SamplesTable.test.js
@@ -1,16 +1,7 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
import React from "react";
import Enzyme from "enzyme";
@@ -33,7 +24,7 @@ test("SamplesTable shouldn't crash on scalars or nested objects", () => {
];
const wrapper = mount(
+ * SPDX-License-Identifier: Apache-2.0
+ */
import React from "react";
import Button from "react-bootstrap/Button";
diff --git a/client/src/components/schema/SampleDataPanel/index.scss b/client/src/components/schema/SampleDataPanel/index.scss
index 7839ffd1..4ef25d1d 100644
--- a/client/src/components/schema/SampleDataPanel/index.scss
+++ b/client/src/components/schema/SampleDataPanel/index.scss
@@ -1,3 +1,8 @@
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
.when-hovered {
opacity: 0;
transition: opacity 100ms;
diff --git a/client/src/components/schema/Schema.js b/client/src/components/schema/Schema.js
index 1506137d..86461894 100644
--- a/client/src/components/schema/Schema.js
+++ b/client/src/components/schema/Schema.js
@@ -1,16 +1,7 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
import React from "react";
import TimeAgo from "react-timeago";
diff --git a/client/src/components/schema/Schema.scss b/client/src/components/schema/Schema.scss
index d1d61b03..95f6480a 100644
--- a/client/src/components/schema/Schema.scss
+++ b/client/src/components/schema/Schema.scss
@@ -1,3 +1,8 @@
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
.main-content.schema {
background-color: transparent;
}
diff --git a/client/src/components/schema/SchemaDropDataModal.js b/client/src/components/schema/SchemaDropDataModal.js
index be72fff6..b4aedb03 100644
--- a/client/src/components/schema/SchemaDropDataModal.js
+++ b/client/src/components/schema/SchemaDropDataModal.js
@@ -1,16 +1,7 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
import React, { useState } from "react";
import Button from "react-bootstrap/Button";
diff --git a/client/src/components/schema/SchemaPredicateForm.js b/client/src/components/schema/SchemaPredicateForm.js
index 33c288d5..78fddcc2 100644
--- a/client/src/components/schema/SchemaPredicateForm.js
+++ b/client/src/components/schema/SchemaPredicateForm.js
@@ -1,16 +1,7 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
import React from "react";
import cloneDeep from "lodash.clonedeep";
diff --git a/client/src/components/schema/SchemaPredicateModal.js b/client/src/components/schema/SchemaPredicateModal.js
index 1be1cfbe..66acc317 100644
--- a/client/src/components/schema/SchemaPredicateModal.js
+++ b/client/src/components/schema/SchemaPredicateModal.js
@@ -1,16 +1,7 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
import React from "react";
import Modal from "react-bootstrap/Modal";
@@ -55,12 +46,8 @@ export default class SchemaPredicateModal extends React.Component {
render() {
const { predicate, onCancel } = this.props;
- const {
- updating,
- clickedSubmit,
- errorMsg,
- predicateQuery,
- } = this.state;
+ const { updating, clickedSubmit, errorMsg, predicateQuery } =
+ this.state;
const predicateForm = this.predicateForm.current;
const canUpdate = predicateForm && !predicateForm.hasErrors();
diff --git a/client/src/components/schema/SchemaRawModeModal.js b/client/src/components/schema/SchemaRawModeModal.js
index 3175b09e..c7441649 100644
--- a/client/src/components/schema/SchemaRawModeModal.js
+++ b/client/src/components/schema/SchemaRawModeModal.js
@@ -1,16 +1,7 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
import React, { useState } from "react";
import Modal from "react-bootstrap/Modal";
diff --git a/client/src/components/schema/TypeProperties.js b/client/src/components/schema/TypeProperties.js
index 7eff450e..2084fb7f 100644
--- a/client/src/components/schema/TypeProperties.js
+++ b/client/src/components/schema/TypeProperties.js
@@ -1,16 +1,7 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
import React from "react";
diff --git a/client/src/components/schema/TypesTable.js b/client/src/components/schema/TypesTable.js
index 10e435c1..08976add 100644
--- a/client/src/components/schema/TypesTable.js
+++ b/client/src/components/schema/TypesTable.js
@@ -1,16 +1,7 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
import React, { useState } from "react";
diff --git a/client/src/containers/App.js b/client/src/containers/App.js
index 561f7dff..c15f8be5 100644
--- a/client/src/containers/App.js
+++ b/client/src/containers/App.js
@@ -1,16 +1,7 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
import React from "react";
import classnames from "classnames";
diff --git a/client/src/containers/AppProvider.js b/client/src/containers/AppProvider.js
index 843a97ca..71349dcc 100644
--- a/client/src/containers/AppProvider.js
+++ b/client/src/containers/AppProvider.js
@@ -1,16 +1,7 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
import React from "react";
import produce from "immer";
diff --git a/client/src/containers/CodeMirror.js b/client/src/containers/CodeMirror.js
index daa40df0..acc3e0e5 100644
--- a/client/src/containers/CodeMirror.js
+++ b/client/src/containers/CodeMirror.js
@@ -1,16 +1,7 @@
-// Copyright 2020 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
import "codemirror/addon/hint/show-hint.css";
diff --git a/client/src/containers/Editor.js b/client/src/containers/Editor.js
index 2b82c943..689d0e73 100644
--- a/client/src/containers/Editor.js
+++ b/client/src/containers/Editor.js
@@ -1,16 +1,7 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
import React, { useCallback, useEffect, useRef, useState } from "react";
import { useSelector } from "react-redux";
@@ -60,7 +51,6 @@ export default function Editor({
const fetchSchema = useCallback(async () => {
const client = await getDgraphClient();
try {
-
const schemaResponse = await client.newTxn().query("schema {}");
const schema = schemaResponse.data.schema;
@@ -70,7 +60,7 @@ export default function Editor({
keywords.concat(
schema.map(kw => kw.predicate),
schema.map(kw => `<${kw.predicate}>`),
- types.map(type => type.name)
+ types.map(type => type.name),
),
);
}
diff --git a/client/src/e2etests/acl/accessDenied.test.js b/client/src/e2etests/acl/accessDenied.test.js
index c2b400f4..bffa67b9 100644
--- a/client/src/e2etests/acl/accessDenied.test.js
+++ b/client/src/e2etests/acl/accessDenied.test.js
@@ -1,16 +1,8 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
import puppeteer from "puppeteer";
import {
diff --git a/client/src/e2etests/acl/aclHelpers.js b/client/src/e2etests/acl/aclHelpers.js
index caf48fdd..01c5ff6d 100644
--- a/client/src/e2etests/acl/aclHelpers.js
+++ b/client/src/e2etests/acl/aclHelpers.js
@@ -1,16 +1,8 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
import puppeteer from "puppeteer";
import {
diff --git a/client/src/e2etests/acl/changePermissions.test.js b/client/src/e2etests/acl/changePermissions.test.js
index f67ecf07..48d82a0c 100644
--- a/client/src/e2etests/acl/changePermissions.test.js
+++ b/client/src/e2etests/acl/changePermissions.test.js
@@ -1,16 +1,8 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
import puppeteer from "puppeteer";
import {
diff --git a/client/src/e2etests/acl/cliUser.test.js b/client/src/e2etests/acl/cliUser.test.js
index 03f06f2f..62df606f 100644
--- a/client/src/e2etests/acl/cliUser.test.js
+++ b/client/src/e2etests/acl/cliUser.test.js
@@ -1,16 +1,8 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
import { spawn } from "child_process";
import fetch from "isomorphic-fetch";
import puppeteer from "puppeteer";
diff --git a/client/src/e2etests/acl/createUser.DISABLED-test.js b/client/src/e2etests/acl/createUser.DISABLED-test.js
index db73ef75..64eaeeaa 100644
--- a/client/src/e2etests/acl/createUser.DISABLED-test.js
+++ b/client/src/e2etests/acl/createUser.DISABLED-test.js
@@ -1,16 +1,8 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
import puppeteer from "puppeteer";
import {
diff --git a/client/src/e2etests/acl/dgraphType.DISABLED-test.js b/client/src/e2etests/acl/dgraphType.DISABLED-test.js
index cc1ee809..b5a5e45e 100644
--- a/client/src/e2etests/acl/dgraphType.DISABLED-test.js
+++ b/client/src/e2etests/acl/dgraphType.DISABLED-test.js
@@ -1,16 +1,8 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
import { spawn } from "child_process";
import puppeteer from "puppeteer";
diff --git a/client/src/e2etests/acl/loginLogout.test.js b/client/src/e2etests/acl/loginLogout.test.js
index b85a74ed..5d5cd553 100644
--- a/client/src/e2etests/acl/loginLogout.test.js
+++ b/client/src/e2etests/acl/loginLogout.test.js
@@ -1,16 +1,8 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
import puppeteer from "puppeteer";
import { createTestTab, setupBrowser, waitForElement } from "../puppetHelpers";
diff --git a/client/src/e2etests/acl/passwordCheck.test.js b/client/src/e2etests/acl/passwordCheck.test.js
index 191eedb9..f7eed28a 100644
--- a/client/src/e2etests/acl/passwordCheck.test.js
+++ b/client/src/e2etests/acl/passwordCheck.test.js
@@ -1,16 +1,8 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
import puppeteer from "puppeteer";
import { createTestTab, setupBrowser, waitForElement } from "../puppetHelpers";
diff --git a/client/src/e2etests/acl/showGroot.test.js b/client/src/e2etests/acl/showGroot.test.js
index f5167882..a23d669e 100644
--- a/client/src/e2etests/acl/showGroot.test.js
+++ b/client/src/e2etests/acl/showGroot.test.js
@@ -1,16 +1,8 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
import puppeteer from "puppeteer";
import { createTestTab, setupBrowser, waitForElement } from "../puppetHelpers";
diff --git a/client/src/e2etests/basic.test.js b/client/src/e2etests/basic.test.js
index 7601681d..f2d06aa6 100644
--- a/client/src/e2etests/basic.test.js
+++ b/client/src/e2etests/basic.test.js
@@ -1,16 +1,8 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
import {
createTestTab,
easyUid,
diff --git a/client/src/e2etests/bigInteger.test.js b/client/src/e2etests/bigInteger.test.js
index 97ca110d..067d45d9 100644
--- a/client/src/e2etests/bigInteger.test.js
+++ b/client/src/e2etests/bigInteger.test.js
@@ -1,16 +1,8 @@
-// Copyright 2020 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
import puppeteer from "puppeteer";
import {
diff --git a/client/src/e2etests/dataExplorer.test.js-DISABLED b/client/src/e2etests/dataExplorer.test.js-DISABLED
index 2002eede..d82fbe57 100644
--- a/client/src/e2etests/dataExplorer.test.js-DISABLED
+++ b/client/src/e2etests/dataExplorer.test.js-DISABLED
@@ -1,16 +1,8 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
import puppeteer from "puppeteer";
import {
diff --git a/client/src/e2etests/expandGraph.test.js b/client/src/e2etests/expandGraph.test.js
index e489c5e2..3509a22f 100644
--- a/client/src/e2etests/expandGraph.test.js
+++ b/client/src/e2etests/expandGraph.test.js
@@ -1,16 +1,8 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
import puppeteer from "puppeteer";
import {
diff --git a/client/src/e2etests/jsonMutation.test.js b/client/src/e2etests/jsonMutation.test.js
index 645e4daf..aece88ad 100644
--- a/client/src/e2etests/jsonMutation.test.js
+++ b/client/src/e2etests/jsonMutation.test.js
@@ -1,16 +1,8 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
import puppeteer from "puppeteer";
import {
diff --git a/client/src/e2etests/noDuplicateMutations.test.js b/client/src/e2etests/noDuplicateMutations.test.js
index 9a889b65..567cd106 100644
--- a/client/src/e2etests/noDuplicateMutations.test.js
+++ b/client/src/e2etests/noDuplicateMutations.test.js
@@ -1,16 +1,8 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
import puppeteer from "puppeteer";
import {
diff --git a/client/src/e2etests/oneToOne.test.js b/client/src/e2etests/oneToOne.test.js
index 8bdae1f8..1ea34488 100644
--- a/client/src/e2etests/oneToOne.test.js
+++ b/client/src/e2etests/oneToOne.test.js
@@ -1,16 +1,8 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
import puppeteer from "puppeteer";
import {
diff --git a/client/src/e2etests/puppetHelpers.js b/client/src/e2etests/puppetHelpers.js
index c49c1ec6..a6f4af20 100644
--- a/client/src/e2etests/puppetHelpers.js
+++ b/client/src/e2etests/puppetHelpers.js
@@ -1,16 +1,8 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
import * as dgraph from "dgraph-js-http";
import puppeteer from "puppeteer";
diff --git a/client/src/e2etests/queryTimeout.test.js b/client/src/e2etests/queryTimeout.test.js
index 02fabab2..57dfc803 100644
--- a/client/src/e2etests/queryTimeout.test.js
+++ b/client/src/e2etests/queryTimeout.test.js
@@ -1,16 +1,8 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
import puppeteer from "puppeteer";
import {
diff --git a/client/src/e2etests/typeSystem.test.js b/client/src/e2etests/typeSystem.test.js
index b999ccce..82c07059 100644
--- a/client/src/e2etests/typeSystem.test.js
+++ b/client/src/e2etests/typeSystem.test.js
@@ -1,16 +1,8 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
import puppeteer from "puppeteer";
import { loginUser } from "./acl/aclHelpers";
diff --git a/client/src/index.js b/client/src/index.js
index 7e20f48a..628281b4 100644
--- a/client/src/index.js
+++ b/client/src/index.js
@@ -1,16 +1,7 @@
-// Copyright 2017-2019 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
import "core-js/stable";
import "regenerator-runtime/runtime";
diff --git a/client/src/index.test.js b/client/src/index.test.js
index 104c544a..54513714 100644
--- a/client/src/index.test.js
+++ b/client/src/index.test.js
@@ -1,16 +1,7 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
import jsdom from "jsdom";
import React from "react";
diff --git a/client/src/lib/ColorGenerator.js b/client/src/lib/ColorGenerator.js
index ccd0bf0c..372baeb2 100644
--- a/client/src/lib/ColorGenerator.js
+++ b/client/src/lib/ColorGenerator.js
@@ -1,16 +1,7 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
import randomColor from "randomcolor";
diff --git a/client/src/lib/GraphLabeler.js b/client/src/lib/GraphLabeler.js
index 14701474..45d9d838 100644
--- a/client/src/lib/GraphLabeler.js
+++ b/client/src/lib/GraphLabeler.js
@@ -1,16 +1,7 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
import ColorGenerator from "./ColorGenerator";
diff --git a/client/src/lib/SchemaGraphParser.js b/client/src/lib/SchemaGraphParser.js
index ce9f52fb..46dfc1b7 100644
--- a/client/src/lib/SchemaGraphParser.js
+++ b/client/src/lib/SchemaGraphParser.js
@@ -1,16 +1,7 @@
-// Copyright 2020 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
import produce from "immer";
diff --git a/client/src/lib/constants.js b/client/src/lib/constants.js
index cc55905c..78d2d8ef 100644
--- a/client/src/lib/constants.js
+++ b/client/src/lib/constants.js
@@ -1,16 +1,7 @@
-// Copyright 2020 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
export const Unknown = Symbol("Unknown");
export const Fetching = Symbol("Fetching");
diff --git a/client/src/lib/dgraph-syntax.js b/client/src/lib/dgraph-syntax.js
index c997bbba..7d4fb168 100644
--- a/client/src/lib/dgraph-syntax.js
+++ b/client/src/lib/dgraph-syntax.js
@@ -1,16 +1,7 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
import { Unknown } from "./constants";
diff --git a/client/src/lib/graph.js b/client/src/lib/graph.js
index 4df1653d..a7c9356e 100644
--- a/client/src/lib/graph.js
+++ b/client/src/lib/graph.js
@@ -1,16 +1,7 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
import cloneDeep from "lodash.clonedeep";
import uuid from "uuid";
diff --git a/client/src/lib/graph.test.js b/client/src/lib/graph.test.js
index 1dd3b4f4..dbb8b603 100644
--- a/client/src/lib/graph.test.js
+++ b/client/src/lib/graph.test.js
@@ -1,16 +1,7 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
import { processGraph } from "./graph";
diff --git a/client/src/lib/helpers.js b/client/src/lib/helpers.js
index e01af080..fdd6eeb5 100644
--- a/client/src/lib/helpers.js
+++ b/client/src/lib/helpers.js
@@ -1,16 +1,7 @@
-// Copyright 2017-2020 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
import * as dgraph from "dgraph-js-http";
import memoizeOne from "memoize-one";
diff --git a/client/src/lib/parsers/queryVars.js b/client/src/lib/parsers/queryVars.js
index 42afbeb0..e9333006 100644
--- a/client/src/lib/parsers/queryVars.js
+++ b/client/src/lib/parsers/queryVars.js
@@ -1,16 +1,7 @@
-// Copyright 2020 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
// import peg from "pegjs";
//
diff --git a/client/src/lib/utils.js b/client/src/lib/utils.js
index a211c775..f13ac224 100644
--- a/client/src/lib/utils.js
+++ b/client/src/lib/utils.js
@@ -1,2 +1,7 @@
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
export const getSpace = tablet =>
tablet ? tablet.space || tablet.onDiskBytes : null;
diff --git a/client/src/reducers/backup.js b/client/src/reducers/backup.js
index 9ccd067b..14b88484 100644
--- a/client/src/reducers/backup.js
+++ b/client/src/reducers/backup.js
@@ -1,16 +1,7 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
import produce from "immer";
import {
@@ -46,9 +37,8 @@ export default (state = defaultState, action) =>
case SAVE_BACKUP_RESULT: {
const { backupId, result } = action;
- draft.backups.find(
- b => b.backupId === backupId,
- ).result = result;
+ draft.backups.find(b => b.backupId === backupId).result =
+ result;
break;
}
diff --git a/client/src/reducers/cluster.js b/client/src/reducers/cluster.js
index 05b9486d..8696f78c 100644
--- a/client/src/reducers/cluster.js
+++ b/client/src/reducers/cluster.js
@@ -1,16 +1,7 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
import produce from "immer";
diff --git a/client/src/reducers/connection.js b/client/src/reducers/connection.js
index fa469f1a..8801fb7e 100644
--- a/client/src/reducers/connection.js
+++ b/client/src/reducers/connection.js
@@ -1,16 +1,7 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
import produce from "immer";
diff --git a/client/src/reducers/frames.js b/client/src/reducers/frames.js
index edff6d3a..0d78fe04 100644
--- a/client/src/reducers/frames.js
+++ b/client/src/reducers/frames.js
@@ -1,16 +1,7 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
import produce from "immer";
import {
@@ -39,11 +30,8 @@ function getFrameTiming(executionStart, extensions) {
networkLatencyNs: fullRequestTimeNs,
};
}
- const {
- parsing_ns,
- processing_ns,
- encoding_ns,
- } = extensions.server_latency;
+ const { parsing_ns, processing_ns, encoding_ns } =
+ extensions.server_latency;
const serverLatencyNs = parsing_ns + processing_ns + (encoding_ns || 0);
return {
serverLatencyNs,
diff --git a/client/src/reducers/index.js b/client/src/reducers/index.js
index 3065129e..d6b6b27c 100644
--- a/client/src/reducers/index.js
+++ b/client/src/reducers/index.js
@@ -1,16 +1,7 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
import { persistCombineReducers } from "redux-persist";
diff --git a/client/src/reducers/query.js b/client/src/reducers/query.js
index a9181331..845ea5ec 100644
--- a/client/src/reducers/query.js
+++ b/client/src/reducers/query.js
@@ -1,16 +1,7 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
import produce from "immer";
import {
diff --git a/client/src/reducers/ui.js b/client/src/reducers/ui.js
index 3bd073e6..1f47eec1 100644
--- a/client/src/reducers/ui.js
+++ b/client/src/reducers/ui.js
@@ -1,16 +1,7 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
import produce from "immer";
diff --git a/client/src/reportWebVitals.js b/client/src/reportWebVitals.js
index 5253d3ad..bc25f520 100644
--- a/client/src/reportWebVitals.js
+++ b/client/src/reportWebVitals.js
@@ -1,13 +1,20 @@
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
const reportWebVitals = onPerfEntry => {
- if (onPerfEntry && onPerfEntry instanceof Function) {
- import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
- getCLS(onPerfEntry);
- getFID(onPerfEntry);
- getFCP(onPerfEntry);
- getLCP(onPerfEntry);
- getTTFB(onPerfEntry);
- });
- }
+ if (onPerfEntry && onPerfEntry instanceof Function) {
+ import("web-vitals").then(
+ ({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
+ getCLS(onPerfEntry);
+ getFID(onPerfEntry);
+ getFCP(onPerfEntry);
+ getLCP(onPerfEntry);
+ getTTFB(onPerfEntry);
+ },
+ );
+ }
};
export default reportWebVitals;
diff --git a/client/src/setupTests.js b/client/src/setupTests.js
index 8f2609b7..baa6a19c 100644
--- a/client/src/setupTests.js
+++ b/client/src/setupTests.js
@@ -1,5 +1,10 @@
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
// jest-dom adds custom jest matchers for asserting on DOM nodes.
// allows you to do things like:
// expect(element).toHaveTextContent(/react/i)
// learn more: https://github.com/testing-library/jest-dom
-import '@testing-library/jest-dom';
+import "@testing-library/jest-dom";
diff --git a/dev/readme.md b/dev/readme.md
index cd773b31..e1b7cc0d 100644
--- a/dev/readme.md
+++ b/dev/readme.md
@@ -19,7 +19,6 @@ docker exec -it ratel_dev_1 bash
## Running the start script
-
if you already attached to the container, you can run the start script directly
```bash
@@ -32,13 +31,13 @@ or you can run the start script from outside the container
docker exec -it ratel_dev_1 bash -c "bash ./dev/run.sh"
```
-
# Issues with Node.js
-To run this project locally you have to use Node.js version 14.x. If you have a different version installed, you will get errors when running the development server.
-
+To run this project locally you have to use Node.js version 14.x. If you have a different version
+installed, you will get errors when running the development server.
-To downgrade Node.js, you can use the Node Version Manager (NVM). If you don't have NVM installed, you can install it with the following command:
+To downgrade Node.js, you can use the Node Version Manager (NVM). If you don't have NVM installed,
+you can install it with the following command:
```bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
@@ -46,14 +45,12 @@ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
After installing NVM, restart your terminal or run:
-
```bash
source ~/.bashrc
```
Now, you can install a compatible Node.js version. For example, to install Node.js 14.x, run:
-
```bash
nvm install 14
@@ -65,4 +62,5 @@ To switch to the newly installed version:
nvm use 14
```
-After downgrading your Node.js version, try running your development server again. The error should be resolved, and your project should work as expected.
\ No newline at end of file
+After downgrading your Node.js version, try running your development server again. The error should
+be resolved, and your project should work as expected.
diff --git a/dev/run.sh b/dev/run.sh
index 25f1bd96..1592077f 100644
--- a/dev/run.sh
+++ b/dev/run.sh
@@ -3,7 +3,7 @@
set -e
# Fix files for Windows. Converting the files to unix type.
-# This is necessary if you are developing from Windows and will be working in a Linux container.
+# This is necessary if you are developing from Windows and will be working in a Linux container.
# Because the file type is not compatible with Linux if it is on a Windows disk.
# find ./* -type d \( -path *node_modules/* -o -path ./.git -o -path */3rdpartystatic/* \) -prune -o -name '*.js*' -print0 | xargs -0 dos2unix
# find ./* -type d \( -path *node_modules/* -o -path ./.git -o -path */3rdpartystatic/* \) -prune -o -name '*.sh*' -print0 | xargs -0 dos2unix
diff --git a/docker-compose.yml b/docker-compose.yml
index d9c3ba4f..7d72ac8b 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,5 +1,5 @@
## Please, read the readme file for more information about developing via container.
-version: '3.8'
+version: "3.8"
services:
dev:
build: ./dev
@@ -8,7 +8,7 @@ services:
- /var/run/docker.sock:/var/run/docker.sock
working_dir: /app
environment:
- # HOST: localhost
+ # HOST: localhost
NODE_ENV: development
command: /bin/sh -c "while sleep 1000; do :; done"
network_mode: "host"
diff --git a/main.go b/main.go
index 696f2423..c1210779 100644
--- a/main.go
+++ b/main.go
@@ -1,16 +1,7 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
package main
diff --git a/scripts/build.prod.sh b/scripts/build.prod.sh
index 33371c6f..a182e7b4 100755
--- a/scripts/build.prod.sh
+++ b/scripts/build.prod.sh
@@ -2,64 +2,68 @@
set -e
-dir="$( cd "$( printf '%s' "${BASH_SOURCE[0]%/*}" )" && pwd )"
+dir="$(cd "$(printf '%s' "${BASH_SOURCE[0]%/*}")" && pwd)"
rootDir=$(git rev-parse --show-toplevel)
# cd to the scripts directory
-pushd "$dir" > /dev/null
- # setting metadata and flags
- version="$(grep -i '"version"' < "$rootDir/client/package.json" | awk -F '"' '{print $4}')"
- flagUploadToS3=false
- buildClientFiles=false
- buildServerBinary=false
- commitID="$(git rev-parse --short HEAD)"
- commitINFO="$(git show --pretty=format:"%h %ad %d" | head -n1)"
+pushd "$dir" >/dev/null
+# setting metadata and flags
+version="$(grep -i '"version"' <"$rootDir/client/package.json" | awk -F '"' '{print $4}')"
+flagUploadToS3=false
+buildClientFiles=false
+buildServerBinary=false
+commitID="$(git rev-parse --short HEAD)"
+commitINFO="$(git show --pretty=format:"%h %ad %d" | head -n1)"
- while [ "$1" != "" ]; do
- case $1 in
- -v | --version ) shift
- version=$1
- ;;
- -u | --upload ) flagUploadToS3=true
- ;;
+while [ "$1" != "" ]; do
+ case $1 in
+ -v | --version)
+ shift
+ version=$1
+ ;;
+ -u | --upload)
+ flagUploadToS3=true
+ ;;
- -c | --client ) buildClientFiles=true
- ;;
+ -c | --client)
+ buildClientFiles=true
+ ;;
- -s | --server ) buildServerBinary=true
- ;;
- esac
+ -s | --server)
+ buildServerBinary=true
+ ;;
+ esac
- shift
- done
+ shift
+done
- # including functions to build client and server
- source ./functions.sh
-popd > /dev/null
+# including functions to build client and server
+source ./functions.sh
+popd >/dev/null
# cd to the root folder.
-pushd "$rootDir" > /dev/null
+pushd "$rootDir" >/dev/null
- # no flag provided build all
- if [ $buildClientFiles = false ] && [ $buildServerBinary = false ]; then
- buildClientFiles=true
- buildServerBinary=true
- fi
+# no flag provided build all
+if [ $buildClientFiles = false ] && [ $buildServerBinary = false ]; then
+ buildClientFiles=true
+ buildServerBinary=true
+fi
- if [ $buildClientFiles = true ]; then
- # build client - production flag set to true
- buildClient true
- fi
+if [ $buildClientFiles = true ]; then
+ # build client - production flag set to true
+ buildClient true
+fi
- if [ $buildServerBinary = true ]; then
- # build server - passing along the production flag and version
- buildServer true "$version"
- fi
+if [ $buildServerBinary = true ]; then
+ # build server - passing along the production flag and version
+ buildServer true "$version"
+fi
- # uploading to s3 when the flagUploadToS3 flag set to true
- if [ $flagUploadToS3 = true ]; then
- uploadToS3
- fi
-popd > /dev/null
+# uploading to s3 when the flagUploadToS3 flag set to true
+if [ $flagUploadToS3 = true ]; then
+ uploadToS3
+fi
+popd >/dev/null
printf "\nDONE\n"
diff --git a/scripts/licensing/header.txt b/scripts/licensing/header.txt
deleted file mode 100644
index c4acd813..00000000
--- a/scripts/licensing/header.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
diff --git a/scripts/licensing/license.sh b/scripts/licensing/license.sh
deleted file mode 100755
index edf0e210..00000000
--- a/scripts/licensing/license.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/bash
-
-tmpfile="$(mktemp)"
-dir="$(dirname "$0")"
-rateldir="$dir/../.."
-files="$(find $rateldir -type f -not -path "*/client/node_modules/*" -name "*.js" -o -name "*.go" ! -name "bindata.go")"
-
-for f in $files
-do
- sed -i -E '/\/\/ Copyright 2017-2021 Dgraph Labs, Inc. and Contributors/,/\/\/ limitations under the License\./d' $f
- cat "$dir/header.txt" $f > $tmpfile
- cp $tmpfile $f
-
- year=$(git log --format=%aD $f | tail -1 | awk '{ print $4 }')
- if [ "$year" != "2019" ]; then
- sed -i "s/Copyright 2017-2021 Dgraph/Copyright $year-2019 Dgraph/g" $f
- fi
-
- echo $f
-done
-rm $tmpfile
diff --git a/scripts/provision.sh b/scripts/provision.sh
index 5f30f95c..a640498f 100755
--- a/scripts/provision.sh
+++ b/scripts/provision.sh
@@ -21,44 +21,43 @@ apt-get install -y nodejs
# puppeteer requirements
apt-get install -y \
- ca-certificates \
- fonts-liberation \
- libappindicator3-1 \
- libasound2 \
- libatk-bridge2.0-0 \
- libatk1.0-0 \
- libc6 \
- libcairo2 \
- libcups2 \
- libdbus-1-3 \
- libexpat1 \
- libfontconfig1 \
- libgbm1 \
- libgcc1 \
- libglib2.0-0 \
- libgtk-3-0 \
- libnspr4 \
- libnss3 \
- libpango-1.0-0 \
- libpangocairo-1.0-0 \
- libstdc++6 \
- libx11-6 \
- libx11-xcb1 \
- libxcb1 \
- libxcomposite1 \
- libxcursor1 \
- libxdamage1 \
- libxext6 \
- libxfixes3 \
- libxi6 \
- libxrandr2 \
- libxrender1 \
- libxss1 \
- libxtst6 \
- lsb-release \
- wget \
- xdg-utils
-
+ ca-certificates \
+ fonts-liberation \
+ libappindicator3-1 \
+ libasound2 \
+ libatk-bridge2.0-0 \
+ libatk1.0-0 \
+ libc6 \
+ libcairo2 \
+ libcups2 \
+ libdbus-1-3 \
+ libexpat1 \
+ libfontconfig1 \
+ libgbm1 \
+ libgcc1 \
+ libglib2.0-0 \
+ libgtk-3-0 \
+ libnspr4 \
+ libnss3 \
+ libpango-1.0-0 \
+ libpangocairo-1.0-0 \
+ libstdc++6 \
+ libx11-6 \
+ libx11-xcb1 \
+ libxcb1 \
+ libxcomposite1 \
+ libxcursor1 \
+ libxdamage1 \
+ libxext6 \
+ libxfixes3 \
+ libxi6 \
+ libxrandr2 \
+ libxrender1 \
+ libxss1 \
+ libxtst6 \
+ lsb-release \
+ wget \
+ xdg-utils
# other
apt install make
diff --git a/scripts/test.sh b/scripts/test.sh
index d4ac6427..32a721df 100755
--- a/scripts/test.sh
+++ b/scripts/test.sh
@@ -10,7 +10,7 @@ if [[ $DEGUG == "1" ]]; then set -x; fi
function wait-for-healthy() {
echo "wait-for-healthy($1): Waiting for $2 to return 200 OK"
tries=0
- until curl -sL -w "%{http_code}\\n" "$2" -o /dev/null | grep -q 200; do
+ until curl -sL -w '%{http_code}\n' "$2" -o /dev/null | grep -q 200; do
tries=$tries+1
if [[ $tries -gt 300 ]]; then
echo "wait-for-healthy($1): Took longer than 1 minute to be healthy."
@@ -23,82 +23,88 @@ function wait-for-healthy() {
}
function check_environment {
- command -v docker > /dev/null || \
- { echo "ERROR: 'docker' command not not found" 1>&2; exit 1; }
+ command -v docker >/dev/null ||
+ {
+ echo "ERROR: 'docker' command not not found" 1>&2
+ exit 1
+ }
- if [[ -z $USE_DOCKER ]]; then
- echo "INFO: \$USE_CONTAINER is not set. Running test from host"
- command -v npm > /dev/null || \
- { echo "ERROR: 'npm' command not not found" 1>&2; exit 1; }
- else
- echo "INFO: \$USE_CONTAINER is set. Running tests with 'docker exec'"
- fi
+ if [[ -z $USE_DOCKER ]]; then
+ echo 'INFO: $USE_CONTAINER is not set. Running test from host'
+ command -v npm >/dev/null ||
+ {
+ echo "ERROR: 'npm' command not not found" 1>&2
+ exit 1
+ }
+ else
+ echo "INFO: \$USE_CONTAINER is set. Running tests with 'docker exec'"
+ fi
}
check_environment $@
-dir="$( cd "$( printf '%s' "${BASH_SOURCE[0]%/*}" )" && pwd )"
+dir="$(cd "$(printf '%s' "${BASH_SOURCE[0]%/*}")" && pwd)"
rootdir="$dir/.."
clientdir="$dir/../client"
composedir="$clientdir/src/e2etests"
-pushd "$dir" > /dev/null
- # Use this file for docker-compose commands
- export COMPOSE_FILE=docker-compose.prod.yml
+pushd "$dir" >/dev/null
+# Use this file for docker-compose commands
+export COMPOSE_FILE=docker-compose.prod.yml
- # Build binary using outside of docker, set LEGACY=1
- if ! [[ -z $LEGACY ]]; then
+# Build binary using outside of docker, set LEGACY=1
+if ! [[ -z $LEGACY ]]; then
# NOTE: Build embedded in docker build
- pushd "$rootdir" > /dev/null
+ pushd "$rootdir" >/dev/null
if [ ! -f "$rootdir/build/ratel" ]; then
- echo "Ratel binary not found. Starting full build. Tested path: \"$rootdir/build/ratel\""
- ./scripts/build.prod.sh
+ echo "Ratel binary not found. Starting full build. Tested path: \"$rootdir/build/ratel\""
+ ./scripts/build.prod.sh
fi
- fi
+fi
- # Run Ratel and Dgraph
- pushd "$composedir" > /dev/null
- set -e
- # TODO: remove the following two calls to `docker-compose down`
- docker-compose down
- docker-compose -p ratel_test down
- docker-compose up --force-recreate --remove-orphans --detach
- sleep 5
- set +e
- popd > /dev/null
+# Run Ratel and Dgraph
+pushd "$composedir" >/dev/null
+set -e
+# TODO: remove the following two calls to `docker-compose down`
+docker-compose down
+docker-compose -p ratel_test down
+docker-compose up --force-recreate --remove-orphans --detach
+sleep 5
+set +e
+popd >/dev/null
- # Verifying that the docker containers are up and running
- docker ps
- ratelport="$(docker container port e2etests_ratel_1 8000 | cut -d: -f2)"
- alphaport="$(docker container port e2etests_alpha_1 8080 | cut -d: -f2)"
+# Verifying that the docker containers are up and running
+docker ps
+ratelport="$(docker container port e2etests_ratel_1 8000 | cut -d: -f2)"
+alphaport="$(docker container port e2etests_alpha_1 8080 | cut -d: -f2)"
- wait-for-healthy "Alpha" "localhost:$alphaport/health"
- wait-for-healthy "Ratel" "localhost:$ratelport"
+wait-for-healthy "Alpha" "localhost:$alphaport/health"
+wait-for-healthy "Ratel" "localhost:$ratelport"
- # Run tests
- pushd "$clientdir" > /dev/null
- if [[ -z $USE_DOCKER ]]; then
- echo "INFO: TEST_DGRAPH_SERVER=\"http://localhost:$alphaport\""
- echo "INFO: TEST_RATEL_URL=\"http://localhost:$ratelport?local\""
- echo "INFO: Running tests with 'npm test'"
+# Run tests
+pushd "$clientdir" >/dev/null
+if [[ -z $USE_DOCKER ]]; then
+ echo "INFO: TEST_DGRAPH_SERVER=\"http://localhost:$alphaport\""
+ echo "INFO: TEST_RATEL_URL=\"http://localhost:$ratelport?local\""
+ echo "INFO: Running tests with 'npm test'"
- # Workaround: Use ?local to run production Ratel builds for e2e tests
- TEST_DGRAPH_SERVER="http://localhost:$alphaport" TEST_RATEL_URL="http://localhost:$ratelport?local" \
+ # Workaround: Use ?local to run production Ratel builds for e2e tests
+ TEST_DGRAPH_SERVER="http://localhost:$alphaport" TEST_RATEL_URL="http://localhost:$ratelport?local" \
npm test -- --runInBand --testTimeout 40000 --watchAll=false
- else
- echo "INFO: Running tests with 'docker exec'"
- docker exec -t e2etests_test_1 npm test -- --runInBand --testTimeout 40000 --watchAll=false
- fi
- testresults="$?"
- popd > /dev/null
+else
+ echo "INFO: Running tests with 'docker exec'"
+ docker exec -t e2etests_test_1 npm test -- --runInBand --testTimeout 40000 --watchAll=false
+fi
+testresults="$?"
+popd >/dev/null
- # Cleanup
- pushd "$composedir" > /dev/null
- if [ $testresults != 0 ]; then
- docker-compose logs
- fi
- docker-compose down && docker-compose rm -f
- popd > /dev/null
-popd > /dev/null
+# Cleanup
+pushd "$composedir" >/dev/null
+if [ $testresults != 0 ]; then
+ docker-compose logs
+fi
+docker-compose down && docker-compose rm -f
+popd >/dev/null
+popd >/dev/null
exit $testresults
diff --git a/server/buffer.go b/server/buffer.go
index eda6152e..aab9cf96 100644
--- a/server/buffer.go
+++ b/server/buffer.go
@@ -1,16 +1,7 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
package server
diff --git a/server/content.go b/server/content.go
index 3a2741a7..feb5d04b 100644
--- a/server/content.go
+++ b/server/content.go
@@ -1,16 +1,7 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
package server
diff --git a/server/server.go b/server/server.go
index 91efcb6e..5f257b1e 100644
--- a/server/server.go
+++ b/server/server.go
@@ -1,16 +1,7 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
package server
diff --git a/server/validate.go b/server/validate.go
index 5c7d439e..6bc1f296 100644
--- a/server/validate.go
+++ b/server/validate.go
@@ -1,16 +1,7 @@
-// Copyright 2017-2021 Dgraph Labs, Inc. and Contributors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: © Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
package server
|