Skip to content

Commit

Permalink
Change Package Name (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
henriqueleite42 committed May 30, 2022
1 parent 18597ae commit efa64ab
Show file tree
Hide file tree
Showing 32 changed files with 99 additions and 123 deletions.
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@ tsconfig*
!tsconfig.build.json

# local
symbiosis.config.js
thothom.config.js
/migrations
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @techmmunity-symbiosis/reviewers
* @thothom/reviewers
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/Bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const your = (code) => here;
## Environment

<pre><code>
Symbiosis version: X.Y.Z
ThothOM version: X.Y.Z
<!-- Check whether this is still an issue in the most recent Nest version -->

For Tooling issues:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,5 @@ tsconfig*
!tsconfig.build.json

# local
symbiosis.config.js
thothom.config.js
/migrations
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@
"plugable",
"prebuild",
"sonarjs",
"symb",
"symbiosisrc",
"thothomrc",
"techmmunity",
"thothom",
"transpiled",
"tsbuildinfo",
"typeorm",
Expand Down
20 changes: 19 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,28 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.0.1] - 2021-07-31
## [Unreleased] - 0000-00-00

### Added

### Changed

### Fixed

### Removed

### Dependencies

## [0.0.1] - 2022-06-30

### Added

### Changed

- Package name to `ThothOM`, `@thothom/cli`

### Fixed

### Removed

### Dependencies
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# How to contribute?

All the details about contributing are in [our website](https://symbiosis.techmmunity.com.br).
All the details about contributing are in [our website](https://thothom.com).
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
<div align="center">

<img src="https://github.com/techmmunity-symbiosis/symbiosis/raw/master/resources/logo.gif" width="300" height="300">
<img src="https://github.com/thothom/core/raw/master/resources/logo.gif" width="300" height="300">

# Techmmunity - Symbiosis CLI
# ThothOM CLI

<a href="https://github.com/techmmunity/eslint-config">
<img src="https://img.shields.io/badge/style%20guide-Techmmunity-01d2ce?style=for-the-badge" alt="Style Guide: Techmmunity">
</a>
<a href="https://www.codefactor.io/repository/github/techmmunity-symbiosis/cli">
<img src="https://www.codefactor.io/repository/github/techmmunity-symbiosis/cli/badge?style=for-the-badge" alt="CodeFactor">
<a href="https://www.codefactor.io/repository/github/thothom/cli">
<img src="https://www.codefactor.io/repository/github/thothom/cli/badge?style=for-the-badge" alt="CodeFactor">
</a>
<a href="https://coveralls.io/github/techmmunity-symbiosis/cli?branch=master">
<img src="https://img.shields.io/coveralls/github/techmmunity-symbiosis/cli/master?style=for-the-badge" alt="Coveralls">
<a href="https://coveralls.io/github/thothom/cli?branch=master">
<img src="https://img.shields.io/coveralls/github/thothom/cli/master?style=for-the-badge" alt="Coveralls">
</a>
<a href="https://github.com/techmmunity-symbiosis/cli/actions/workflows/coverage.yml">
<img src="https://img.shields.io/github/workflow/status/techmmunity-symbiosis/cli/tests?label=tests&logo=github&style=for-the-badge" alt="Tests">
<a href="https://github.com/thothom/cli/actions/workflows/coverage.yml">
<img src="https://img.shields.io/github/workflow/status/thothom/cli/tests?label=tests&logo=github&style=for-the-badge" alt="Tests">
</a>
<a href="https://www.npmjs.com/package/@techmmunity/symbiosis-cli">
<img src="https://img.shields.io/npm/v/@techmmunity/symbiosis-cli.svg?color=CC3534&style=for-the-badge" alt="Npm">
<a href="https://www.npmjs.com/package/@thothom/cli">
<img src="https://img.shields.io/npm/v/@thothom/cli.svg?color=CC3534&style=for-the-badge" alt="Npm">
</a>
<a href="https://www.npmjs.com/package/@techmmunity/symbiosis-cli">
<img src="https://img.shields.io/npm/dw/@techmmunity/symbiosis-cli.svg?style=for-the-badge" alt="Downloads">
<a href="https://www.npmjs.com/package/@thothom/cli">
<img src="https://img.shields.io/npm/dw/@thothom/cli.svg?style=for-the-badge" alt="Downloads">
</a>

<br>
<br>

</div>

This is the CLI for for [@techmmunity/symbiosis](https://github.com/techmmunity-symbiosis/symbiosis).
This is the CLI for for [@thothom/core](https://github.com/thothom/core).

## Installation

With yarn

```
yarn add @techmmunity/symbiosis-cli
yarn add @thothom/cli
```

With npm

```
npm i @techmmunity/symbiosis-cli
npm i @thothom/cli
```

## Usage

Please, check [the docs](https://symbiosis.techmmunity.com.br/docs/overview/cli) for more information.
Please, check [the docs](https://thothom.com/docs/overview/cli) for more information.
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"name": "@techmmunity/symbiosis-cli",
"version": "0.0.4",
"name": "@thothom/cli",
"version": "0.0.1",
"main": "index.js",
"types": "index.d.ts",
"license": "Apache-2.0",
"author": "Techmmunity",
"description": "CLI for @techmmunity/symbiosis",
"homepage": "https://symbiosis.techmmunity.com.br/",
"description": "CLI for @thothom/core",
"homepage": "https://thothom.com/",
"bin": {
"symb": "./cli/bin/index.js"
"thothom": "./cli/bin/index.js"
},
"bugs": {
"url": "https://github.com/techmmunity-symbiosis/cli/issues"
"url": "https://github.com/thothom/cli/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/techmmunity-symbiosis/cli.git"
"url": "git+https://github.com/thothom/cli.git"
},
"keywords": [
"orm",
Expand All @@ -25,10 +25,10 @@
"database",
"data-mapper",
"object-mapper",
"techmmunity-symbiosis"
"thothom"
],
"peerDependencies": {
"@techmmunity/symbiosis": "^0.0.30",
"@thothom/core": "^0.0.1",
"reflect-metadata": "^0.1.13",
"typescript": "^4.5.5"
},
Expand All @@ -39,7 +39,7 @@
},
"devDependencies": {
"@techmmunity/eslint-config": "^5.2.2",
"@techmmunity/symbiosis": "^0.0.30",
"@thothom/core": "^0.0.1",
"@types/jest": "^27.0.1",
"eslint": "^8.9.0",
"husky": "^7.0.4",
Expand Down
4 changes: 1 addition & 3 deletions src/cli/bin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ import { localBinExists } from "../utils/local-bin-exists";
import { loadLocalBinCommandLoader } from "../utils/local-binaries";

const bootstrap = () => {
const packageJsonPath = getRootPath(
"node_modules/@techmmunity/symbiosis-cli/package.json",
);
const packageJsonPath = getRootPath("node_modules/@thothom/cli/package.json");

program
.version(
Expand Down
2 changes: 1 addition & 1 deletion src/cli/commands/gen-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ import { getTemplate } from "../utils/get-template";
export const genConfig = () => {
const template = getTemplate("config");

writeFileSync(getRootPath("symbiosis.config.js"), template);
writeFileSync(getRootPath("thothom.config.js"), template);
};
8 changes: 4 additions & 4 deletions src/cli/commands/gen-migration/gen-migration.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable @typescript-eslint/naming-convention */

import { loadEntities, Logger } from "@techmmunity/symbiosis";
import { cleanObj, getRootPath, isEmptyObject } from "@techmmunity/utils";
import { loadEntities, Logger } from "@thothom/core";
import { existsSync, writeFileSync } from "fs";

import { MigrationHandler } from "../../../lib/migration-handler";
Expand All @@ -10,8 +10,8 @@ import { getColType } from "./helpers/get-col-type";

import { getConfigFile } from "../../utils/get-config-file";
import { getMigrationsPath } from "../../utils/get-migrations-path";
import { getSymbVersion } from "../../utils/get-symb-version";
import { getTemplate } from "../../utils/get-template";
import { getThothVersion } from "../../utils/get-thoth-version";

import type { Plugin } from "../types/plugin";

Expand All @@ -38,7 +38,7 @@ export const genMigrations = async () => {
});

const template = getTemplate("migration:generate");
const symbVersion = getSymbVersion();
const thothVersion = getThothVersion();

entities.forEach(entity => {
const entityMetadata = connection.entityManager.getEntityMetadata(entity);
Expand Down Expand Up @@ -120,7 +120,7 @@ export const genMigrations = async () => {
.replace(/\$\{CODE\}/g, code)
.replace(/\$\{DESCRIPTION\}/g, `${entityMetadata.name} Migration`)
.replace(/\$\{PLUGIN\}/g, plugin)
.replace(/\$\{SYMB_VERSION\}/g, symbVersion)
.replace(/\$\{THOTHOM_VERSION\}/g, thothVersion)
.replace(/\$\{MIGRATION_UP_LOGIC\}/g, up)
.replace(/\$\{MIGRATION_DOWN_LOGIC\}/g, down);

Expand Down
4 changes: 2 additions & 2 deletions src/cli/commands/gen-migration/helpers/get-col-type.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { MetadataUtil } from "@techmmunity/symbiosis";
import { MetadataUtil } from "@thothom/core";

import type { ColumnType } from "../../../../lib/types/query-runner";
import type { ColumnMetadata } from "@techmmunity/symbiosis/lib/entity-manager/types/column-metadata";
import type { ColumnMetadata } from "@thothom/core/lib/entity-manager/types/column-metadata";

export const getColType = (columnMetadata: ColumnMetadata): ColumnType => {
if (columnMetadata.databaseType) return columnMetadata.databaseType as any;
Expand Down
2 changes: 1 addition & 1 deletion src/cli/commands/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Logger } from "@techmmunity/symbiosis";
import { Logger } from "@thothom/core";
import chalk from "chalk";
import type { Command } from "commander";

Expand Down
6 changes: 3 additions & 3 deletions src/cli/commands/migration-create.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { writeFileSync } from "fs";

import { getMigrationsPath } from "../utils/get-migrations-path";
import { getSymbVersion } from "../utils/get-symb-version";
import { getTemplate } from "../utils/get-template";
import { getThothVersion } from "../utils/get-thoth-version";

interface Args {
description: string;
Expand All @@ -13,13 +13,13 @@ export const createMigration = ({ description }: Args) => {

const template = getTemplate("migration:create");
const code = Date.now().toString();
const symbVersion = getSymbVersion();
const thothVersion = getThothVersion();

const formattedTemplate = template
.replace(/\$\{CODE\}/g, code)
.replace(/\$\{DESCRIPTION\}/g, description)
.replace(/\$\{PLUGIN\}/g, "MANUAL")
.replace(/\$\{SYMB_VERSION\}/g, symbVersion);
.replace(/\$\{THOTHOM_VERSION\}/g, thothVersion);

writeFileSync(`${migrationsDirPath}/${code}.ts`, formattedTemplate);
};
2 changes: 1 addition & 1 deletion src/cli/commands/run-migrations.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable @typescript-eslint/naming-convention */

import { loadEntities, Logger } from "@techmmunity/symbiosis";
import { isEmptyArray, isPackageInstalled } from "@techmmunity/utils";
import { loadEntities, Logger } from "@thothom/core";
import { readdirSync } from "fs";

import type { BaseQueryRunner } from "../../lib/query-runner";
Expand Down
5 changes: 1 addition & 4 deletions src/cli/commands/types/plugin.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
/* eslint-disable @typescript-eslint/naming-convention */

import type {
BaseConnectionOptions,
BaseConnection,
} from "@techmmunity/symbiosis";
import type { BaseConnectionOptions, BaseConnection } from "@thothom/core";

import type { BaseQueryRunner, BaseSyncManager } from "../../..";

Expand Down
4 changes: 2 additions & 2 deletions src/cli/templates/config
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/**
* You can use this file to automatically connect with Techmmunity Symbiosis.
* You can use this file to automatically connect with ThothOM.
*
* We recommend that you use env vars to get your database credentials
* values, and commit this file, so it's easier to generate migrations.
*/

module.exports = {
plugin: "@techmmunity/symbiosis-dynamodb",
plugin: "@thothom/dynamodb",
connectionConfig: {
namingStrategy: {
entity: "snake_case",
Expand Down
4 changes: 2 additions & 2 deletions src/cli/templates/migration:create
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* ${DESCRIPTION}
*
* @plugin ${PLUGIN}
* @symbVersion ${SYMB_VERSION}
* @thothomVersion ${THOTHOM_VERSION}
*/
import { BaseMigration, BaseQueryRunner } from "@techmmunity/symbiosis-cli";
import { BaseMigration, BaseQueryRunner } from "@thothom/cli";

export class Migration implements BaseMigration {
public code = "${CODE}";
Expand Down
4 changes: 2 additions & 2 deletions src/cli/templates/migration:generate
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* ${DESCRIPTION}
*
* @plugin ${PLUGIN}
* @symbVersion ${SYMB_VERSION}
* @thothomVersion ${THOTHOM_VERSION}
*/
import { BaseMigration, BaseQueryRunner } from "@techmmunity/symbiosis-cli";
import { BaseMigration, BaseQueryRunner } from "@thothom/cli";

export class Migration implements BaseMigration {
public code = "${CODE}";
Expand Down
2 changes: 1 addition & 1 deletion src/cli/types/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { BaseConnectionOptions } from "@techmmunity/symbiosis";
import type { BaseConnectionOptions } from "@thothom/core";

export interface ConfigFile<Opts = BaseConnectionOptions> {
plugin: string;
Expand Down
31 changes: 0 additions & 31 deletions src/cli/utils/create-dot-symb-dir.ts

This file was deleted.

Loading

0 comments on commit efa64ab

Please sign in to comment.