Skip to content

Commit

Permalink
chore: add consistent license headers PE-4186
Browse files Browse the repository at this point in the history
Rocking the AGLP-3.0
  • Loading branch information
djwhitt committed Jul 18, 2023
1 parent 01e6514 commit de5a210
Show file tree
Hide file tree
Showing 57 changed files with 724 additions and 209 deletions.
10 changes: 9 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@
"parserOptions": {
"project": "tsconfig.json"
},
"plugins": ["@typescript-eslint", "prettier", "mocha", "jest-formatting", "unicorn"],
"plugins": [
"@typescript-eslint",
"header",
"jest-formatting",
"mocha",
"prettier",
"unicorn"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
Expand All @@ -26,6 +33,7 @@
"eqeqeq": 2,
"jest-formatting/padding-around-describe-blocks": 2,
"jest-formatting/padding-around-test-blocks": 2,
"header/header": [2, "./resources/license.header.js"],
"mocha/max-top-level-suites": "off",
"mocha/no-exports": "off",
"mocha/no-mocha-arrows": "off",
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
"eslint": "^8.16.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-jest-formatting": "^3.1.0",
"eslint-plugin-header": "^3.1.1",
"eslint-plugin-mocha": "^10.1.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-unicorn": "^45.0.2",
Expand Down Expand Up @@ -98,7 +99,7 @@
"test": "mocha --no-warnings",
"test:ci": "npx c8 -r lcov mocha --no-warnings --timeout 10000 -R mocha-multi --reporter-options spec=-,json=test-results.json",
"test:coverage": "npx c8 -r text -r html mocha --no-warnings",
"lint:check": "prettier --check .",
"lint:fix": "prettier --write ."
"lint:check": "eslint src test",
"lint:fix": "eslint --fix src test"
}
}
17 changes: 17 additions & 0 deletions resources/license.header.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* AR.IO Gateway
* Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
2 changes: 1 addition & 1 deletion src/app.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* AR.IO Gateway
* Copyright (C) 2022 Permanent Data Solutions, Inc
* Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion src/arweave/composite-client.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* AR.IO Gateway
* Copyright (C) 2022 Permanent Data Solutions, Inc
* Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
3 changes: 2 additions & 1 deletion src/arweave/constants.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* AR.IO Gateway
* Copyright (C) 2022 Permanent Data Solutions, Inc
* Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand All @@ -15,4 +15,5 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

export const MAX_FORK_DEPTH = 50;
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* AR.IO Gateway
* Copyright (C) 2023 Permanent Data Solutions, Inc
* Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
17 changes: 17 additions & 0 deletions src/data/gateway-data-source.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* AR.IO Gateway
* Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import { default as axios } from 'axios';
import winston from 'winston';

Expand Down
17 changes: 17 additions & 0 deletions src/data/read-through-chunk-data-cache.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* AR.IO Gateway
* Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import chai, { expect } from 'chai';
import fs from 'node:fs';
import sinon, { SinonSandbox } from 'sinon';
Expand Down
17 changes: 17 additions & 0 deletions src/data/read-through-chunk-data-cache.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* AR.IO Gateway
* Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import winston from 'winston';

import { ChunkData, ChunkDataByAnySource, ChunkDataStore } from '../types.js';
Expand Down
17 changes: 17 additions & 0 deletions src/data/read-through-chunk-metadata-cache.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* AR.IO Gateway
* Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import winston from 'winston';

import {
Expand Down
17 changes: 17 additions & 0 deletions src/data/read-through-data-cache.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* AR.IO Gateway
* Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import crypto from 'node:crypto';
import { Readable, pipeline } from 'node:stream';
import winston from 'winston';
Expand Down
17 changes: 17 additions & 0 deletions src/data/sequential-data-source.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* AR.IO Gateway
* Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import winston from 'winston';

import {
Expand Down
17 changes: 17 additions & 0 deletions src/data/tx-chunks-data-source.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* AR.IO Gateway
* Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import chai, { expect } from 'chai';
import { Readable } from 'node:stream';
import sinon from 'sinon';
Expand Down
17 changes: 17 additions & 0 deletions src/data/tx-chunks-data-source.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* AR.IO Gateway
* Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import { Readable } from 'node:stream';
import winston from 'winston';

Expand Down
2 changes: 1 addition & 1 deletion src/database/standalone-sqlite.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* AR.IO Gateway
* Copyright (C) 2022 Permanent Data Solutions, Inc
* Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion src/database/standalone-sqlite.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* AR.IO Gateway
* Copyright (C) 2022 Permanent Data Solutions, Inc
* Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
3 changes: 2 additions & 1 deletion src/events.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* AR.IO Gateway
* Copyright (C) 2023 Permanent Data Solutions, Inc
* Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand All @@ -15,6 +15,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

export const ANS104_BUNDLE_INDEXED = 'ans104-bundle-indexed';
export const ANS104_DATA_ITEM_BUNDLE_MATCHED =
'ans104-data-item-bundle-matched';
Expand Down
2 changes: 1 addition & 1 deletion src/filters.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* AR.IO Gateway
* Copyright (C) 2023 Permanent Data Solutions, Inc
* Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
17 changes: 17 additions & 0 deletions src/filters.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* AR.IO Gateway
* Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import { b64UrlToUtf8, fromB64Url, sha256B64Url } from './lib/encoding.js';
import { ItemFilter, MatchableItem } from './types.js';

Expand Down
17 changes: 17 additions & 0 deletions src/lib/ans-104.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* AR.IO Gateway
* Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import arbundles from 'arbundles/stream/index.js';
import * as EventEmitter from 'node:events';
import fs from 'node:fs';
Expand Down
2 changes: 1 addition & 1 deletion src/lib/chaos.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* AR.IO Gateway
* Copyright (C) 2022 Permanent Data Solutions, Inc
* Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion src/lib/encoding.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* AR.IO Gateway
* Copyright (C) 2022 Permanent Data Solutions, Inc
* Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion src/lib/encoding.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* AR.IO Gateway
* Copyright (C) 2022 Permanent Data Solutions, Inc
* Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion src/lib/env.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* AR.IO Gateway
* Copyright (C) 2023 Permanent Data Solutions, Inc
* Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion src/lib/time.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* AR.IO Gateway
* Copyright (C) 2023 Permanent Data Solutions, Inc
* Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
Loading

0 comments on commit de5a210

Please sign in to comment.