Skip to content

Commit 2a10438

Browse files
authored
Merge pull request #139 from 8base/PRODUCT-2846
[Upgrade] PRODUCT-2846 Update and work with nodejs updated versions
2 parents 3030779 + 935751b commit 2a10438

File tree

118 files changed

+14229
-21779
lines changed

Some content is hidden

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

118 files changed

+14229
-21779
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/e2e*

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- uses: actions/checkout@v2
1717
- uses: actions/setup-node@v1
1818
with:
19-
node-version: 11
19+
node-version: 14
2020
- run: |
2121
npm install
2222
npm run build

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Ignore built ts files
22
dist/**/*
33

4-
54
### Node template
65
# Logs
76
*.log
@@ -21,6 +20,7 @@ node_modules
2120
# Editors
2221
.idea
2322
*.iml
23+
.vscode
2424

2525
# Directory for instrumented libs generated by jscoverage/JSCover
2626
lib-cov
@@ -44,7 +44,6 @@ bower_components
4444
build/Release
4545

4646
# Dependency directories
47-
node_modules/
4847
jspm_packages/
4948

5049
# Typescript v1 declaration files

.prettierrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ module.exports = {
44
singleQuote: true,
55
printWidth: 120,
66
tabWidth: 2,
7+
arrowParens: 'avoid',
78
};

.vscode/launch.json

Lines changed: 0 additions & 49 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 0 additions & 12 deletions
This file was deleted.

.vscode/tasks.json

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
{
22
// See https://go.microsoft.com/fwlink/?LinkId=733558
33
// for the documentation about the tasks.json format
4-
"version": "0.1.0",
4+
"version": "2.0.0",
55
"command": "npm",
6-
"isShellCommand": true,
7-
"showOutput": "always",
8-
"suppressTaskName": true,
96
"tasks": [
107
{
11-
"taskName": "build",
12-
"args": ["run", "build"]
8+
"label": "build",
9+
"type": "shell",
10+
"args": [
11+
"run",
12+
"build"
13+
],
14+
"problemMatcher": [],
15+
"group": {
16+
"_id": "build",
17+
"isDefault": false
18+
}
1319
}
1420
]
1521
}

README.md

Lines changed: 32 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 8base CLI [![Build Status](https://travis-ci.org/8base/cli.svg?branch=master)](https://travis-ci.org/8base/cli)
22

3-
[**Sign Up for 8Base**](https://app.8base.com) 🤘 [**Documentation Home**](https://docs.8base.com) 📑 [**Getting Started**](https://docs.8base.com/getting-started/quick-start) 🚀 [**8base Plans**](https://www.8base.com/pricing)
3+
[**Sign Up for 8Base**](https://app.8base.com) 🤘 [**Documentation Home**](https://docs.8base.com) 📑 [**Getting Started**](https://docs.8base.com/projects/backend/getting-started) 🚀 [**8base Plans**](https://www.8base.com/pricing)
44

55
The 8base Command Line Interface (CLI) makes it easy to generate custom functions and manage workspaces straight from the terminal.
66

@@ -37,38 +37,47 @@ $ 8base login --email="my@email.com" --password="myP@ssw0rd"
3737
Once successfully authenticated, a file will be updated at `~/.8baserc` with a JSON payload for the authenticated session.
3838

3939
## Further Information
40-
For more information about commands and configuration options, please refer the [8base CLI documentation](https://docs.8base.com/development-tools/cli). You can also learn about the different commands from the CLI by running `--help` with the package itself, or a given command.
40+
For more information about commands and configuration options, please refer the [8base CLI documentation](https://docs.8base.com/projects/backend/development-tools/cli). You can also learn about the different commands from the CLI by running `--help` with the package itself, or a given command.
4141

4242
```
4343
DESCRIPTION
44-
The 8base Command Line Interface is a unified tool to manage your 8base workspaces services.
44+
The 8base Command Line Interface is a unified tool to manage your 8base workspaces services.
4545
4646
USAGE
47-
8base <command> [OPTIONS]
47+
8base <command> [OPTIONS]
4848
49-
Use 8base command `--help` for information on a specific command. Use 8base help topics to view a list of available help topics. The synopsis for each
50-
command shows it’s parameters and their usage. Optional options are shown in square brackets.
49+
Use 8base command `--help` for information on a specific command. Use 8base help topics to view a list of
50+
available help topics. The synopsis for each command shows its parameters and their usage. Optional options
51+
are shown in square brackets.
5152
5253
COMMANDS
53-
8base configure Allows you to select a default workspace and retrieve the API endpoint URL.
54-
8base deploy Deploys project in current directory to 8base using 8base.yml config file. To use this command, you must be in the root directory
55-
of your 8base project.
56-
8base describe [name] Describes your 8base project’s functions and their types through 8base.yml file.
57-
8base export Export current workspace data schema
58-
8base generate <command> Generator for server and client side resources [aliases: g]
59-
8base import Import 8base schema file and data to the current - or specified - workspace.
60-
8base init Initializes a new project with example directory structure and custom functions.
61-
8base invoke [name] Invokes a custom function in the production workspace.
62-
8base invoke-local [name] Invokes the custom function in the local development workspace.
63-
8base login Authenticates the command line user by letting them log into an 8base account.
64-
8base logout Clears local login credentials and invalidates API session.
65-
8base logs [name] Show logs for the function(s).
66-
8base package Package 8base application without deploying it.
54+
8base backup <command> Backup commands.
55+
8base configure Allows you to select a default workspace and retrieve the API endpoint URL.
56+
8base deploy Deploys project described in 8base.yml config file from your current local
57+
directory to 8base server. You must be in the root directory of your local
58+
8base project to use this command.
59+
8base describe [name] Describes your 8base project’s functions and their types through 8base.yml
60+
file.
61+
8base environment <command> Environment commands.
62+
8base export Exports current workspace data schema
63+
8base generate <command> Generator for server and client side resources [aliases: g]
64+
8base import Imports 8base schema file and data to the current - or specified - workspace.
65+
8base init [name] Initializes a new project with example directory structure and custom
66+
functions.
67+
8base invoke <name> Invokes a custom function in the production workspace.
68+
8base invoke-local <name> Invokes the custom function in the local development workspace.
69+
8base login Authenticates the command line user by letting them log into an 8base account.
70+
8base logout Clears local login credentials and invalidates API session.
71+
8base logs [name] Shows logs for the functions or migrations.
72+
8base migration <command> Migration commands.
73+
8base package Package 8base application without deploying it.
74+
8base project <command> Project-related commands.
75+
8base whoami Displays the current authenticated user.
6776
6877
OPTIONS
69-
--version, -v Show version number [boolean]
70-
--debug, -d Turn on debug logs [boolean]
71-
--help, -h Show help
78+
-v, --version Show version number [boolean]
79+
-d, --debug Turn on debug logs [boolean]
80+
-h, --help Show help [boolean]
7281
```
7382

7483
## Contributing

e2e-scaffold/config.json

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
{
2-
"globals": {
3-
"ts-jest": {
4-
"tsConfig": "<rootDir>/tsconfig.json"
5-
}
6-
},
72
"setupFiles": [
83
"./setup/setup.ts"
94
],
@@ -14,14 +9,20 @@
149
"globalTeardown": "./setup/globalTeardown.ts",
1510
"testEnvironment": "./setup/testEnvironment.js",
1611
"moduleFileExtensions": [
17-
"ts",
1812
"js",
19-
"json"
13+
"json",
14+
"ts"
2015
],
2116
"transform": {
22-
"^.+\\.(ts|tsx)$": "ts-jest"
17+
"^.+\\.tsx?$": [
18+
"ts-jest",
19+
{
20+
"tsconfig": "<rootDir>/tsconfig.json"
21+
}
22+
]
2323
},
2424
"testMatch": [
25-
"/**/*.test.(ts|js)"
26-
]
25+
"/**/*.test.(t|j)s"
26+
],
27+
"preset": "ts-jest"
2728
}

e2e-scaffold/setup/globalSetup.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@ import { generateScaffoldProject } from './helpers/generateScaffoldProject';
22
import { startScaffoldProject } from './helpers/startScaffoldProject';
33

44
import * as puppeteer from 'puppeteer';
5-
import * as fs from 'fs';
6-
import * as mkdirp from 'mkdirp';
5+
import * as fs from 'fs-extra';
76
import * as os from 'os';
87
import * as path from 'path';
98
import * as dotenv from 'dotenv';
10-
import gql from 'graphql-tag';
119
import { Client } from '@8base/api-client';
10+
import gql from 'graphql-tag';
1211

1312
const DIR = path.join(os.tmpdir(), 'jest_puppeteer_global_setup');
1413

@@ -65,8 +64,7 @@ export default async () => {
6564
const launchOptions = getPuppeteerLaunchOptions();
6665

6766
const browser = await puppeteer.launch(launchOptions);
68-
69-
mkdirp.sync(DIR);
67+
fs.ensureDirSync(DIR);
7068
fs.writeFileSync(path.join(DIR, 'wsEndpoint'), browser.wsEndpoint());
7169

7270
global.__BROWSER__ = browser;

0 commit comments

Comments
 (0)