Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update imports & packages based on the latest changes of nanolib #34

Merged
merged 5 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
"publish": "lerna publish from-package"
},
"devDependencies": {
"@alwatr/eslint-config": "^1.2.9",
"@alwatr/prettier-config": "^1.0.5",
"@alwatr/eslint-config": "^1.2.11",
"@alwatr/prettier-config": "^1.0.6",
"@lerna-lite/changed": "^3.9.3",
"@lerna-lite/cli": "^3.9.3",
"@lerna-lite/diff": "^3.9.3",
Expand Down
12 changes: 5 additions & 7 deletions packages/api-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,13 @@
"clean": "rm -rfv dist *.tsbuildinfo"
},
"dependencies": {
"@alwatr/logger": "^4.0.2",
"@alwatr/package-tracer": "^1.0.2",
"@alwatr/polyfill-has-own": "^1.1.2"
"@alwatr/nanolib": "^1.2.0"
},
"devDependencies": {
"@alwatr/nano-build": "^1.6.0",
"@alwatr/prettier-config": "^1.0.5",
"@alwatr/tsconfig-base": "^1.3.1",
"@alwatr/type-helper": "^2.0.1",
"@alwatr/nano-build": "^2.0.1",
"@alwatr/prettier-config": "^1.0.6",
"@alwatr/tsconfig-base": "^1.3.2",
"@alwatr/type-helper": "^2.0.2",
"@types/node": "^22.7.5",
"jest": "^29.7.0",
"typescript": "^5.6.3"
Expand Down
2 changes: 1 addition & 1 deletion packages/api-server/src/api-client-request.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {createLogger} from '@alwatr/logger';
import {createLogger} from '@alwatr/nanolib';

import {NanotronServerResponse} from './api-server-response.js';
import {HttpStatusCodes} from './const.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/api-server/src/api-server-response.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {createLogger} from '@alwatr/logger';
import {createLogger} from '@alwatr/nanolib';

import {type HttpStatusCode, HttpStatusCodes, HttpStatusMessages} from './const.js';

Expand Down
5 changes: 2 additions & 3 deletions packages/api-server/src/api-server.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {createServer} from 'node:http';

import {createLogger} from '@alwatr/logger';
import {packageTracer} from '@alwatr/package-tracer'
import {createLogger, packageTracer} from '@alwatr/nanolib';

import {NanotronClientRequest} from './api-client-request.js';
import {HttpStatusCodes, HttpStatusMessages} from './const.js';
Expand All @@ -10,7 +9,7 @@ import {NanotronUrl} from './url.js';
import type {DefineRouteOption, MatchType, NativeClientRequest, NativeServerResponse} from './type.js';
import type {Duplex} from 'node:stream';

packageTracer.add(__package_name__, __package_version__);
__dev_mode__: packageTracer.add(__package_name__, __package_version__);

/**
* Configuration options for the NanotronApiServer.
Expand Down
5 changes: 3 additions & 2 deletions packages/api-server/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export * from './api-server.js';
export * from './type.js';
export * from './const.js';

export type {NanotronClientRequest} from './api-client-request.js';
export type {NanotronServerResponse} from './api-server-response.js';
export type {NanotronUrl} from './url.js';
export * from './type.js';
export * from './const.js';
12 changes: 5 additions & 7 deletions packages/crypto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,13 @@
"clean": "rm -rfv dist *.tsbuildinfo"
},
"dependencies": {
"@alwatr/logger": "^4.0.2",
"@alwatr/package-tracer": "^1.0.2",
"@alwatr/parse-duration": "^1.1.2"
"@alwatr/nanolib": "^1.2.0"
},
"devDependencies": {
"@alwatr/nano-build": "^1.6.0",
"@alwatr/prettier-config": "^1.0.5",
"@alwatr/tsconfig-base": "^1.3.1",
"@alwatr/type-helper": "^2.0.1",
"@alwatr/nano-build": "^2.0.1",
"@alwatr/prettier-config": "^1.0.6",
"@alwatr/tsconfig-base": "^1.3.2",
"@alwatr/type-helper": "^2.0.2",
"@types/node": "^22.7.5",
"jest": "^29.7.0",
"typescript": "^5.6.3"
Expand Down
6 changes: 2 additions & 4 deletions packages/crypto/src/api.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {packageTracer} from '@alwatr/package-tracer';
import {packageTracer, type Duration} from '@alwatr/nanolib';

import {AlwatrHashGenerator} from './hash.js';
import {
Expand All @@ -9,9 +9,7 @@ import {
} from './pre-config.js';
import {AlwatrTokenGenerator, type TokenValidity} from './token.js';

import type {Duration} from '@alwatr/parse-duration';

packageTracer.add(__package_name__, __package_version__);
__dev_mode__: packageTracer.add(__package_name__, __package_version__);

/**
* Configuration options for the CryptoFactory.
Expand Down
2 changes: 1 addition & 1 deletion packages/crypto/src/token.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {createHmac} from 'node:crypto';

import {parseDuration, type Duration} from '@alwatr/parse-duration';
import {parseDuration, type Duration} from '@alwatr/nanolib';

import type {CryptoAlgorithm, CryptoEncoding} from './type.js';

Expand Down
30 changes: 7 additions & 23 deletions packages/nanotron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,31 +57,15 @@
"clean": "rm -rfv dist *.tsbuildinfo"
},
"dependencies": {
"@alwatr/async-queue": "^1.3.2",
"@alwatr/crypto": "^4.2.2",
"@alwatr/dedupe": "^1.1.2",
"@alwatr/deep-clone": "^1.1.2",
"@alwatr/delay": "^1.0.2",
"@alwatr/exit-hook": "^1.1.2",
"@alwatr/fetch": "^4.1.2",
"@alwatr/flat-string": "^1.1.2",
"@alwatr/flatomise": "^1.2.2",
"@alwatr/global-scope": "^1.1.24",
"@alwatr/is-number": "^1.1.2",
"@alwatr/local-storage": "^1.1.2",
"@alwatr/logger": "^4.0.2",
"@alwatr/nanotron-api-server": "workspace:^",
"@alwatr/node-fs": "^1.1.2",
"@alwatr/package-tracer": "^1.0.2",
"@alwatr/parse-duration": "^1.1.2",
"@alwatr/platform-info": "^1.2.2",
"@alwatr/polyfill-has-own": "^1.1.2"
"@alwatr/crypto": "workspace:^",
"@alwatr/nanolib": "^1.2.0",
"@alwatr/nanotron-api-server": "workspace:^"
},
"devDependencies": {
"@alwatr/nano-build": "^1.6.0",
"@alwatr/prettier-config": "^1.0.5",
"@alwatr/tsconfig-base": "^1.3.1",
"@alwatr/type-helper": "^2.0.1",
"@alwatr/nano-build": "^2.0.1",
"@alwatr/prettier-config": "^1.0.6",
"@alwatr/tsconfig-base": "^1.3.2",
"@alwatr/type-helper": "^2.0.2",
"@types/node": "^22.7.5",
"jest": "^29.7.0",
"typescript": "^5.6.3"
Expand Down
21 changes: 2 additions & 19 deletions packages/nanotron/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,6 @@
import {packageTracer} from '@alwatr/package-tracer';
import '@alwatr/polyfill-has-own';
import {packageTracer} from '@alwatr/nanolib';

export * from '@alwatr/nanotron-api-server';
export * from '@alwatr/crypto';

export * from '@alwatr/async-queue';
export * from '@alwatr/delay';
export * from '@alwatr/global-scope';
export * from '@alwatr/logger';
export * from '@alwatr/package-tracer';
export * from '@alwatr/dedupe';
export * from '@alwatr/flatomise';
export * from '@alwatr/is-number';
export * from '@alwatr/parse-duration';
export * from '@alwatr/deep-clone';
export * from '@alwatr/exit-hook';
export * from '@alwatr/flat-string';
export * from '@alwatr/local-storage';
export * from '@alwatr/node-fs';
export * from '@alwatr/platform-info';

packageTracer.add(__package_name__, __package_version__);
__dev_mode__: packageTracer.add(__package_name__, __package_version__);
2 changes: 1 addition & 1 deletion packages/nanotron/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"outDir": "dist",
"emitDeclarationOnly": true,
"composite": true,
"types": ["@alwatr/nano-build"]
"types": ["node", "@alwatr/nano-build", "@alwatr/type-helper"]
},
"include": ["src/**/*.ts"],
"references": [{"path": "../api-server"}, {"path": "../crypto"}],
Expand Down
Loading