Skip to content

Commit

Permalink
v3.3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniopresto committed Mar 14, 2024
1 parent 7368635 commit 7602bcd
Show file tree
Hide file tree
Showing 17 changed files with 62 additions and 68 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "powership",
"version": "3.3.12",
"version": "3.3.13",
"private": true,
"scripts": {
"pack": "run-s pack:*",
Expand Down
10 changes: 5 additions & 5 deletions packages/accounts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@powership/accounts",
"version": "3.3.12",
"version": "3.3.13",
"description": "Powership accounts",
"type": "module",
"main": "./out/index.cjs",
Expand Down Expand Up @@ -91,8 +91,8 @@
"peerDependencies": {
"scrypt-kdf": "*",
"jsonwebtoken": "*",
"@powership/schema": "3.3.12",
"@powership/utils": "3.3.12",
"@powership/schema": "3.3.13",
"@powership/utils": "3.3.13",
"dataloader": "*",
"plugin-hooks": "*",
"sift": "*",
Expand Down Expand Up @@ -134,7 +134,7 @@
"tsx": "*",
"ulid": "*",
"url-pattern": "*",
"@powership/transporter": "3.3.12",
"@powership/entity": "3.3.12"
"@powership/transporter": "3.3.13",
"@powership/entity": "3.3.13"
}
}
2 changes: 1 addition & 1 deletion packages/babel-plugins/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@powership/babel-plugins",
"version": "3.3.12",
"version": "3.3.13",
"main": "./out/index.js",
"sideEffects": false,
"typings": "./out/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions packages/boilerplate/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@powership/boilerplate",
"version": "3.3.12",
"version": "3.3.13",
"author": "antoniopresto <[email protected]>",
"sideEffects": false,
"type": "module",
Expand Down Expand Up @@ -61,7 +61,7 @@
"ts-jest": "*",
"typedoc": "*",
"typescript": "*",
"@powership/babel-plugins": "3.3.12",
"@powership/babel-plugins": "3.3.13",
"@babel/preset-typescript": "*",
"@babel/preset-env": "*",
"@babel/plugin-transform-typescript": "*",
Expand Down
6 changes: 3 additions & 3 deletions packages/deepstate/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@powership/deepstate",
"version": "3.3.12",
"version": "3.3.13",
"main": "out/index.cjs",
"module": "out/index.mjs",
"sideEffects": false,
Expand Down Expand Up @@ -119,7 +119,7 @@
"tsx": "*",
"ulid": "*",
"url-pattern": "*",
"@powership/utils": "3.3.12",
"@powership/schema": "3.3.12"
"@powership/utils": "3.3.13",
"@powership/schema": "3.3.13"
}
}
8 changes: 4 additions & 4 deletions packages/entity/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@powership/entity",
"version": "3.3.12",
"version": "3.3.13",
"type": "module",
"main": "./out/index.cjs",
"module": "./out/index.mjs",
Expand Down Expand Up @@ -137,8 +137,8 @@
"tsx": "*",
"ulid": "*",
"url-pattern": "*",
"@powership/utils": "3.3.12",
"@powership/schema": "3.3.12",
"@powership/transporter": "3.3.12"
"@powership/utils": "3.3.13",
"@powership/schema": "3.3.13",
"@powership/transporter": "3.3.13"
}
}
4 changes: 2 additions & 2 deletions packages/logstorm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "logstorm",
"version": "3.3.12",
"version": "3.3.13",
"typings": "out",
"author": "antoniopresto <[email protected]>",
"type": "module",
Expand Down Expand Up @@ -122,6 +122,6 @@
"tsx": "*",
"ulid": "*",
"url-pattern": "*",
"@powership/utils": "3.3.12"
"@powership/utils": "3.3.13"
}
}
8 changes: 4 additions & 4 deletions packages/mongo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@powership/mongo",
"version": "3.3.12",
"version": "3.3.13",
"type": "module",
"main": "./out/index.cjs",
"module": "./out/index.mjs",
Expand Down Expand Up @@ -129,9 +129,9 @@
"tsx": "*",
"ulid": "*",
"url-pattern": "*",
"@powership/utils": "3.3.12",
"@powership/schema": "3.3.12",
"@powership/transporter": "3.3.12",
"@powership/utils": "3.3.13",
"@powership/schema": "3.3.13",
"@powership/transporter": "3.3.13",
"mongodb": "*"
},
"files": [
Expand Down
10 changes: 5 additions & 5 deletions packages/plugin-engine/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "plugin-engine",
"version": "3.3.12",
"version": "3.3.13",
"type": "module",
"main": "./out/index.cjs",
"module": "./out/index.mjs",
Expand Down Expand Up @@ -96,9 +96,9 @@
},
"peerDependencies": {
"highlight.js": "*",
"@powership/schema": "3.3.12",
"@powership/transporter": "3.3.12",
"@powership/utils": "3.3.12",
"@powership/schema": "3.3.13",
"@powership/transporter": "3.3.13",
"@powership/utils": "3.3.13",
"dataloader": "*",
"plugin-hooks": "*",
"sift": "*",
Expand Down Expand Up @@ -140,6 +140,6 @@
"tsx": "*",
"ulid": "*",
"url-pattern": "*",
"@powership/entity": "3.3.12"
"@powership/entity": "3.3.13"
}
}
16 changes: 8 additions & 8 deletions packages/powership/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "powership",
"version": "3.3.12",
"version": "3.3.13",
"author": "antoniopresto <[email protected]>",
"type": "module",
"main": "./out/index.cjs",
Expand Down Expand Up @@ -105,11 +105,11 @@
"tsconfig": "./tsconfig.module.json"
},
"peerDependencies": {
"@powership/utils": "3.3.12",
"@powership/schema": "3.3.12",
"@powership/entity": "3.3.12",
"@powership/utils": "3.3.13",
"@powership/schema": "3.3.13",
"@powership/entity": "3.3.13",
"highlight.js": "*",
"@powership/transporter": "3.3.12",
"@powership/transporter": "3.3.13",
"dataloader": "*",
"plugin-hooks": "*",
"sift": "*",
Expand Down Expand Up @@ -151,12 +151,12 @@
"tsx": "*",
"ulid": "*",
"url-pattern": "*",
"plugin-engine": "3.3.12",
"plugin-engine": "3.3.13",
"body-parser": "*",
"graphql-playground-html": "*",
"http-errors": "*",
"http-status-codes": "*",
"logstorm": "3.3.12",
"@powership/server": "3.3.12"
"logstorm": "3.3.13",
"@powership/server": "3.3.13"
}
}
4 changes: 2 additions & 2 deletions packages/runmate/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "runmate",
"version": "3.3.12",
"version": "3.3.13",
"typings": "out",
"author": "antoniopresto <[email protected]>",
"license": "MIT",
Expand Down Expand Up @@ -138,7 +138,7 @@
"ts-toolbelt": "*",
"ulid": "*",
"url-pattern": "*",
"@powership/utils": "3.3.12",
"@powership/utils": "3.3.13",
"@types/vorpal": "*",
"@types/glob": "*"
}
Expand Down
4 changes: 2 additions & 2 deletions packages/schema/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@powership/schema",
"version": "3.3.12",
"version": "3.3.13",
"type": "module",
"main": "./out/index.cjs",
"module": "./out/index.mjs",
Expand Down Expand Up @@ -143,6 +143,6 @@
"tsx": "*",
"ulid": "*",
"url-pattern": "*",
"@powership/utils": "3.3.12"
"@powership/utils": "3.3.13"
}
}
8 changes: 4 additions & 4 deletions packages/server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@powership/server",
"version": "3.3.12",
"version": "3.3.13",
"type": "module",
"main": "./out/index.cjs",
"module": "./out/index.mjs",
Expand Down Expand Up @@ -114,7 +114,7 @@
"plugin-hooks": "*",
"url-pattern": "*",
"qs": "*",
"@powership/utils": "3.3.12",
"@powership/utils": "3.3.13",
"@types/dateformat": "*",
"@types/fs-extra": "*",
"@types/lodash": "*",
Expand Down Expand Up @@ -151,11 +151,11 @@
"ts-toolbelt": "*",
"tsx": "*",
"ulid": "*",
"logstorm": "3.3.12",
"logstorm": "3.3.13",
"http-status-codes": "*",
"http-errors": "*",
"graphql-playground-html": "*",
"@powership/schema": "3.3.12",
"@powership/schema": "3.3.13",
"body-parser": "*"
}
}
6 changes: 3 additions & 3 deletions packages/transporter/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@powership/transporter",
"version": "3.3.12",
"version": "3.3.13",
"type": "module",
"main": "./out/index.cjs",
"module": "./out/index.mjs",
Expand Down Expand Up @@ -139,7 +139,7 @@
"tsx": "*",
"ulid": "*",
"url-pattern": "*",
"@powership/utils": "3.3.12",
"@powership/schema": "3.3.12"
"@powership/utils": "3.3.13",
"@powership/schema": "3.3.13"
}
}
2 changes: 1 addition & 1 deletion packages/utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@powership/utils",
"version": "3.3.12",
"version": "3.3.13",
"typings": "out",
"author": "antoniopresto <[email protected]>",
"license": "MIT",
Expand Down
4 changes: 4 additions & 0 deletions packages/utils/src/hey.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ describe('hey', () => {
]);
});

test('blue', () => {
hey.blue('Hello!');
});

test('error', () => {
hey.error(new Error('foo'));
});
Expand Down
32 changes: 11 additions & 21 deletions packages/utils/src/hey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,26 +107,6 @@ export type HeyParams = readonly [
...values: any[]
];

const proxy = new Proxy(_hey, {
get(_receiver, key: any) {
if (key in styles) {
_hey[key] =
_hey[key] ||
((...args: any[]) => {
// @ts-ignore
const string = templateStringToText(...args);
return _hey(`<${key}>${string}</${key}>`, []);
});
}

return _hey[key];
},
set(_, key, value) {
_hey[key] = value;
return true;
},
});

export type Hey = {
(...args: HeyParams): string;
format(...args: HeyParams): string;
Expand All @@ -136,4 +116,14 @@ export type Hey = {
styles: Styles;
} & {};

export const hey = proxy as unknown as Hey;
Object.keys(styles).forEach((key) => {
Object.defineProperty(_hey, key, {
value: (...args: any[]) => {
// @ts-ignore
const string = `<${key}>${templateStringToText(...args)}</${key}>`;
return _hey(string);
},
});
});

export const hey = _hey as unknown as Hey;

0 comments on commit 7602bcd

Please sign in to comment.