Deploy your static site from GitHub to IPFS, accessible through a .eth
subdomain (i.e. yoursite.hosted.eth
).
- eximchain-notes/ipfs-ens: System diagrams
- terraform-ipfs-ens: Terraform to create infrastructure
- ipfs-ens-types: Shared types package
- ipfs-ens-api-client: Easy client for calling our IPFS-ENS API
- ipfs-ens-lambda: Source for all of the Lambda functions
- ipfs-ens-spa: create-react-app used for OAuth redirects during login
Install this private client from npm
and view the set of commands available:
npm install --global @eximchain/ipfs-ens-cli
deployer --help
Usage: deployer <command>
Commands:
deployer.js create Interactive command for creating a new deployment.
deployer.js list View a list of all of your deployments.
deployer.js login Interactive command to login, authorize the Deployer, and save the auth to your machine.
deployer.js read <EnsName> Read the details about one of your deployments.
deployer.js whoami View the user which is currently logged in.
Options:
--version, -v Show version number
--config Path to a JSON config file; defaults to './ipfsEnsConfig.json'.
All of the file's keys will be treated like options.
Made by Eximchain Pte. Ltd.
If you are going to do active development on this repository, there are a few things you should know:
- You can clone this library, run
npm i; npm run build
, and then run it by callingnode build/deployer.ts [command]
. This gets around having to reinstall the library globally after each change. - Two of the dependent libraries have outdated definitions from
DefinitelyTyped
. After running the firstnpm install
, you may get a Typescript compiler error. Go to./node_modules/@types/
and find theink-table
andink-spinner
directories. Their index files importComponent
fromink.
Instead import it fromReact
and those errors will go away. You can also copy/paste the index files from the section below. - If you need to modify the underlying api-types, ipfs-ens-types, or ipfs-ens-api-client packages, and their directories are siblings to this project, then you can install your local version via:
npm install ../ipfs-ens-types
. - You can change the API URL using a hidden command:
deployer api [newApiUrl]
. If you omit the new URL, it will display the current one. - If you want to get an overall view of how this project is structured, take a look at its Dev Diary.
- This uses Redux for state management & persistence. If you've never used Redux before, take a look at our Redux primer in
eximchain-notes
.
Until the ink-table
and ink-spinner
packages update their types, we need to manually replace index files to get typescript to compile the project. Below are the index files that allow the project to compile.
// Type definitions for ink-table 1.0
// Project: https://github.com/maticzav/ink-table#readme
// Definitions by: Łukasz Ostrowski <https://github.com/lukostry>
// Definitions: https://github.com/DefinitelyTyped/
// TypeScript Version: 2.8
import { FC, Component } from 'react';
export interface TableProps {
cell?: typeof Cell;
data?: ReadonlyArray<object>;
header?: typeof Header;
padding?: number;
skeleton?: typeof Skeleton;
}
export const Cell: FC<{ children: Component }>;
export const Header: FC<{ children: Component }>;
export const Skeleton: FC<{ children: Component }>;
declare const Table: FC<TableProps>;
export default Table;
// Type definitions for ink-spinner 2.0
// Project: https://github.com/vadimdemedes/ink-spinner#readme
// Definitions by: Łukasz Ostrowski <https://github.com/lukostry>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
import { Chalk } from 'chalk';
import * as cliSpinners from 'cli-spinners';
import { Component } from 'react';
type StringifyPartial<T> = {
[P in keyof T]?: string;
};
type BooleansPartial<T> = {
[P in keyof T]?: boolean;
};
type TupleOfNumbersPartial<T> = {
[P in keyof T]?: [number, number, number];
};
// Omit taken from https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html
type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;
type ChalkColorModels = Pick<Chalk, 'rgb' | 'hsl' | 'hsv' | 'hwb' | 'bgRgb' | 'bgHsl' | 'bgHsv' | 'bgHwb'>;
type ChalkKeywordsAndHexes = Pick<Chalk, 'keyword' | 'hex' | 'bgKeyword' | 'bgHex'>;
type ChalkCommons = Omit<Chalk, keyof ChalkColorModels | keyof ChalkKeywordsAndHexes | 'constructor' | 'level' | 'enabled'>;
interface SpinnerProps {
type?: cliSpinners.SpinnerName;
}
type ChalkProps = BooleansPartial<ChalkCommons>
& StringifyPartial<ChalkKeywordsAndHexes>
& TupleOfNumbersPartial<ChalkColorModels>;
declare class Spinner extends Component<SpinnerProps & ChalkProps> { }
export = Spinner;