FRONTEND-604: Id generator repair (#19)

* fix: id generator repair

* Publish

 - @rbkmoney/id-generator@0.1.2-pr.0

* fix: remove id-generator

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Denis Ezhov 2021-06-07 15:01:38 +03:00 committed by GitHub
parent 6ebf935472
commit 21de669220
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 2 additions and 210 deletions

63
package-lock.json generated
View File

@ -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,

View File

@ -1 +0,0 @@
lib

View File

@ -1 +0,0 @@
@rbkmoney:registry=https://npm.pkg.github.com/

View File

@ -1,3 +0,0 @@
package.json
package-lock.json
node_modules

View File

@ -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

View File

@ -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)

View File

@ -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"
}
}

View File

@ -1,9 +0,0 @@
import { NgModule } from '@angular/core';
import { IdGeneratorService } from './id-generator.service';
@NgModule({
providers: [IdGeneratorService]
})
export class IdGeneratorModule {
}

View File

@ -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());
});
});
});

View File

@ -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();
}
}

View File

@ -1,2 +0,0 @@
export * from './id-generator.module';
export * from './id-generator.service';

View File

@ -1 +0,0 @@
export * from './id-generator';

View File

@ -1,8 +0,0 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib"
},
"include": ["src/index.ts"]
}