diff --git a/package-lock.json b/package-lock.json index 4c62210..4fc1a10 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1842,10 +1842,6 @@ "resolved": "packages/eslint-plugin", "link": true }, - "node_modules/@rbkmoney/id-generator": { - "resolved": "packages/id-generator", - "link": true - }, "node_modules/@rbkmoney/partial-fetcher": { "resolved": "packages/partial-fetcher", "link": true @@ -2219,12 +2215,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/any-base": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/any-base/-/any-base-1.1.0.tgz", - "integrity": "sha512-uMgjozySS8adZZYePpaWs8cxB9/kdzmpX6SgJZ+wbz1K5eYk5QMYDVJaZKhxyIHUdnnJkfR7SVgStgH7LkGUyg==", - "peer": true - }, "node_modules/aproba": { "version": "2.0.0", "dev": true, @@ -8113,28 +8103,6 @@ "node": ">=4" } }, - "node_modules/short-uuid": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/short-uuid/-/short-uuid-4.1.0.tgz", - "integrity": "sha512-Zjerp00N5uUC7ET1mEjz77vY9h5zm6IQivtHxcbnoSIWyK6PD/dQnU5w916F8lzQIJjxBTEbCKsAikE64WxUxQ==", - "peer": true, - "dependencies": { - "any-base": "^1.1.0", - "uuid": "^8.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/short-uuid/node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "peer": true, - "bin": { - "uuid": "dist/bin/uuid" - } - }, "node_modules/shx": { "version": "0.3.3", "dev": true, @@ -9289,7 +9257,7 @@ }, "packages/eslint-plugin": { "name": "@rbkmoney/eslint-plugin", - "version": "0.1.1", + "version": "0.2.0", "dependencies": { "@angular-eslint/eslint-plugin": "^4.0.0", "@angular-eslint/eslint-plugin-template": "^4.0.0", @@ -9306,6 +9274,7 @@ "packages/id-generator": { "name": "@rbkmoney/id-generator", "version": "0.0.0", + "extraneous": true, "peerDependencies": { "rxjs": "^6.0.0", "short-uuid": "^4.1.0" @@ -10649,10 +10618,6 @@ "eslint-plugin-you-dont-need-lodash-underscore": "^6.11.0" } }, - "@rbkmoney/id-generator": { - "version": "file:packages/id-generator", - "requires": {} - }, "@rbkmoney/partial-fetcher": { "version": "file:packages/partial-fetcher", "requires": { @@ -10870,12 +10835,6 @@ "color-convert": "^2.0.1" } }, - "any-base": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/any-base/-/any-base-1.1.0.tgz", - "integrity": "sha512-uMgjozySS8adZZYePpaWs8cxB9/kdzmpX6SgJZ+wbz1K5eYk5QMYDVJaZKhxyIHUdnnJkfR7SVgStgH7LkGUyg==", - "peer": true - }, "aproba": { "version": "2.0.0", "dev": true @@ -14741,24 +14700,6 @@ "rechoir": "^0.6.2" } }, - "short-uuid": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/short-uuid/-/short-uuid-4.1.0.tgz", - "integrity": "sha512-Zjerp00N5uUC7ET1mEjz77vY9h5zm6IQivtHxcbnoSIWyK6PD/dQnU5w916F8lzQIJjxBTEbCKsAikE64WxUxQ==", - "peer": true, - "requires": { - "any-base": "^1.1.0", - "uuid": "^8.3.0" - }, - "dependencies": { - "uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "peer": true - } - } - }, "shx": { "version": "0.3.3", "dev": true, diff --git a/packages/id-generator/.gitignore b/packages/id-generator/.gitignore deleted file mode 100644 index 7951405..0000000 --- a/packages/id-generator/.gitignore +++ /dev/null @@ -1 +0,0 @@ -lib \ No newline at end of file diff --git a/packages/id-generator/.npmrc b/packages/id-generator/.npmrc deleted file mode 100644 index aad6dfc..0000000 --- a/packages/id-generator/.npmrc +++ /dev/null @@ -1 +0,0 @@ -@rbkmoney:registry=https://npm.pkg.github.com/ diff --git a/packages/id-generator/.prettierignore b/packages/id-generator/.prettierignore deleted file mode 100644 index e8625c1..0000000 --- a/packages/id-generator/.prettierignore +++ /dev/null @@ -1,3 +0,0 @@ -package.json -package-lock.json -node_modules diff --git a/packages/id-generator/CHANGELOG.md b/packages/id-generator/CHANGELOG.md deleted file mode 100644 index 70084cd..0000000 --- a/packages/id-generator/CHANGELOG.md +++ /dev/null @@ -1,16 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -## 0.1.1 (2021-04-29) - -**Note:** Version bump only for package @rbkmoney/id-generator - - - - - -# 0.1.0 (2021-04-28) - -**Note:** Version bump only for package @rbkmoney/id-generator diff --git a/packages/id-generator/README.md b/packages/id-generator/README.md deleted file mode 100644 index 9c7b5a2..0000000 --- a/packages/id-generator/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# ID Generator - -**The library for ID generation.** - -## Installation - -```sh -npm i --save @rbkmoney/id-generator -``` - -Full details in the [monorepo root README.md](https://github.com/rbkmoney/fe-core#installation) - -## Usage - -- Inject service to your service - -```typescript -import { IdGeneratorService } from '@rbkmoney/id-generator'; - -constructor(private idGenerator: IdGeneratorService) {} -``` - -- Call the methods you want - -```typescript -const uuid = this.idGenerator.uuid(); - -const shortUuid = this.idGenerator.shortUuid(); -``` - -## Contributing - -Full details in the [monorepo root README.md](https://github.com/rbkmoney/fe-core#contributing) diff --git a/packages/id-generator/package.json b/packages/id-generator/package.json deleted file mode 100644 index 83ab27f..0000000 --- a/packages/id-generator/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "@rbkmoney/id-generator", - "version": "0.1.1", - "description": "ID Generator", - "author": "rbkmoney", - "main": "lib/index", - "types": "lib/index", - "files": [ - "lib" - ], - "scripts": { - "build": "npm run clean & tsc -p tsconfig.json", - "clean": "shx rm -rf lib", - "test": "ts-node ../../node_modules/jasmine/bin/jasmine src/**/*.spec.ts --reporter=jasmine-console-reporter" - }, - "repository": { - "type": "git", - "url": "https://github.com/rbkmoney/fe-core" - }, - "publishConfig": { - "registry": "https://npm.pkg.github.com/@rbkmoney" - }, - "dependencies": { - "short-uuid": "^4.1.0" - }, - "peerDependencies": { - "@angular/core": "^11.0.0" - } -} diff --git a/packages/id-generator/src/id-generator/id-generator.module.ts b/packages/id-generator/src/id-generator/id-generator.module.ts deleted file mode 100644 index df51cf0..0000000 --- a/packages/id-generator/src/id-generator/id-generator.module.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { NgModule } from '@angular/core'; - -import { IdGeneratorService } from './id-generator.service'; - -@NgModule({ - providers: [IdGeneratorService] -}) -export class IdGeneratorModule { -} \ No newline at end of file diff --git a/packages/id-generator/src/id-generator/id-generator.service.spec.ts b/packages/id-generator/src/id-generator/id-generator.service.spec.ts deleted file mode 100644 index a45c9e2..0000000 --- a/packages/id-generator/src/id-generator/id-generator.service.spec.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { IdGeneratorService } from './id-generator.service'; - -describe('IdGeneratorService', () => { - let service: IdGeneratorService; - - beforeEach(() => { - service = new IdGeneratorService(); - }); - - it('should be created', () => { - expect(service).toBeTruthy(); - }); - - describe('generateUUID', () => { - it('should generate uuid', () => { - expect(service.uuid()).toBeTruthy(); - }); - - it('new generated uuid should be not like it was before', () => { - expect(service.uuid()).not.toBe(service.uuid()); - }); - }); - - describe('generateShortUUID', () => { - it('should generate short uuid', () => { - expect(service.shortUuid()).toBeTruthy(); - }); - - it('new generated short uuid should be not like it was before', () => { - expect(service.shortUuid()).not.toBe(service.shortUuid()); - }); - }); -}); diff --git a/packages/id-generator/src/id-generator/id-generator.service.ts b/packages/id-generator/src/id-generator/id-generator.service.ts deleted file mode 100644 index 4b73eef..0000000 --- a/packages/id-generator/src/id-generator/id-generator.service.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Injectable } from '@angular/core'; -import * as short from 'short-uuid'; - -@Injectable() -export class IdGeneratorService { - uuid(): string { - return short().uuid(); - } - - shortUuid(): string { - return short().generate(); - } -} diff --git a/packages/id-generator/src/id-generator/index.ts b/packages/id-generator/src/id-generator/index.ts deleted file mode 100644 index 04691b1..0000000 --- a/packages/id-generator/src/id-generator/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './id-generator.module'; -export * from './id-generator.service'; diff --git a/packages/id-generator/src/index.ts b/packages/id-generator/src/index.ts deleted file mode 100644 index 09f9cb1..0000000 --- a/packages/id-generator/src/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './id-generator'; diff --git a/packages/id-generator/tsconfig.json b/packages/id-generator/tsconfig.json deleted file mode 100644 index 8980f6a..0000000 --- a/packages/id-generator/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib" - }, - "include": ["src/index.ts"] -}