diff --git a/package.json b/package.json index 50f8f853..27cef911 100644 --- a/package.json +++ b/package.json @@ -172,27 +172,28 @@ "nth-check": ">=2.1.1", "postcss": ">=8.4.47", "follow-redirects": ">=1.15.9", - "@storm-stack/utilities": "1.39.0", - "@storm-stack/unique-identifier": "1.33.0", - "@storm-stack/date-time": "1.46.0", - "@storm-stack/errors": "1.40.0", - "@storm-stack/serialization": "1.46.0", - "@storm-stack/logging": "1.40.0", - "@storm-stack/file-system": "1.39.0", - "@storm-stack/cli": "1.40.0", - "@storm-stack/plugin-system": "1.23.0", - "@storm-stack/telemetry": "1.19.0", - "@storm-stack/server-cache": "0.17.0", - "@storm-stack/string-fns": "0.18.0", - "@storm-stack/types": "0.34.0", - "@storm-stack/hashing": "0.15.0", - "@storm-stack/server-result": "0.18.0", - "@storm-stack/hooks": "0.25.1", - "@storm-stack/env": "0.1.0", - "@storm-stack/build-plugin": "0.1.0", - "@storm-stack/build-nx": "1.3.0", - "@storm-stack/build-core": "0.0.1", - "@storm-stack/tools-config": "0.0.1" + "@storm-stack/utilities": "workspace:*", + "@storm-stack/unique-identifier": "workspace:*", + "@storm-stack/date-time": "workspace:*", + "@storm-stack/errors": "workspace:*", + "@storm-stack/serialization": "workspace:*", + "@storm-stack/logging": "workspace:*", + "@storm-stack/file-system": "workspace:*", + "@storm-stack/cli": "workspace:*", + "@storm-stack/plugin-system": "workspace:*", + "@storm-stack/telemetry": "workspace:*", + "@storm-stack/server-cache": "workspace:*", + "@storm-stack/string-fns": "workspace:*", + "@storm-stack/types": "workspace:*", + "@storm-stack/hashing": "workspace:*", + "@storm-stack/server-result": "workspace:*", + "@storm-stack/hooks": "workspace:*", + "@storm-stack/env": "workspace:*", + "@storm-stack/build-plugin": "workspace:*", + "@storm-stack/build-nx": "workspace:*", + "@storm-stack/build-core": "workspace:*", + "@storm-stack/tools-config": "workspace:*", + "@storm-stack/cli-helpers": "workspace:*" } }, "prettier": "@storm-software/prettier/config.json", diff --git a/packages/cli/CHANGELOG.md b/packages/base/cli/CHANGELOG.md similarity index 88% rename from packages/cli/CHANGELOG.md rename to packages/base/cli/CHANGELOG.md index 4c149dba..f1d58e6e 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/base/cli/CHANGELOG.md @@ -2,250 +2,258 @@ ### Features -- **logging:** Update the `initialize` method signature in the `StormLog` class ([7b11262](https://github.com/storm-software/storm-stack/commit/7b11262)) +- **logging:** Update the `initialize` method signature in the `StormLog` class + ([7b11262](https://github.com/storm-software/storm-stack/commit/7b11262)) ## 1.39.0 (2024-12-04) ### Features -- **cli:** Update CLI program function name ([9a8dc91](https://github.com/storm-software/storm-stack/commit/9a8dc91)) +- **cli:** Update CLI program function name + ([9a8dc91](https://github.com/storm-software/storm-stack/commit/9a8dc91)) ## 1.38.0 (2024-12-02) ### Features -- **monorepo:** Upgrade workflow actions to use the new base processes ([14d2f2f](https://github.com/storm-software/storm-stack/commit/14d2f2f)) +- **monorepo:** Upgrade workflow actions to use the new base processes + ([14d2f2f](https://github.com/storm-software/storm-stack/commit/14d2f2f)) ## 1.37.0 (2024-11-10) ### Features -- **date-time:** Resolve issue parsing ISO string in `StormDateTime` constructor ([c8032d6](https://github.com/storm-software/storm-stack/commit/c8032d6)) +- **date-time:** Resolve issue parsing ISO string in `StormDateTime` constructor + ([c8032d6](https://github.com/storm-software/storm-stack/commit/c8032d6)) ## 1.36.0 (2024-11-10) ### Features -- **cli:** Added `@antfu/install-pkg` to improve install ([26cf962](https://github.com/storm-software/storm-stack/commit/26cf962)) +- **cli:** Added `@antfu/install-pkg` to improve install + ([26cf962](https://github.com/storm-software/storm-stack/commit/26cf962)) ## 1.35.0 (2024-11-10) ### Features -- **cli:** Added the `execute` and `install` utility functions ([8b04259](https://github.com/storm-software/storm-stack/commit/8b04259)) +- **cli:** Added the `execute` and `install` utility functions + ([8b04259](https://github.com/storm-software/storm-stack/commit/8b04259)) ## 1.34.0 (2024-11-08) ### Features -- **monorepo:** Upgrade the workspace's Nx package versions ([075a024](https://github.com/storm-software/storm-stack/commit/075a024)) +- **monorepo:** Upgrade the workspace's Nx package versions + ([075a024](https://github.com/storm-software/storm-stack/commit/075a024)) ## 1.33.0 (2024-11-08) ### Features -- **types:** Regenerate packages with upgraded ops packages ([936026a](https://github.com/storm-software/storm-stack/commit/936026a)) +- **types:** Regenerate packages with upgraded ops packages + ([936026a](https://github.com/storm-software/storm-stack/commit/936026a)) ## 1.32.0 (2024-11-08) - ### Features -- **errors:** Added the `createFromData` helper function ([c15576d](https://github.com/storm-software/storm-stack/commit/c15576d)) +- **errors:** Added the `createFromData` helper function + ([c15576d](https://github.com/storm-software/storm-stack/commit/c15576d)) ## 1.31.0 (2024-11-07) - ### Features -- **date-time:** Added the `getMonthIndex` helper function ([8d979d2](https://github.com/storm-software/storm-stack/commit/8d979d2)) +- **date-time:** Added the `getMonthIndex` helper function + ([8d979d2](https://github.com/storm-software/storm-stack/commit/8d979d2)) ## 1.30.2 (2024-10-27) - ### Bug Fixes -- **date-time:** Update static function to no longer be constants ([f366ffe](https://github.com/storm-software/storm-stack/commit/f366ffe)) +- **date-time:** Update static function to no longer be constants + ([f366ffe](https://github.com/storm-software/storm-stack/commit/f366ffe)) ## 1.30.1 (2024-10-26) - ### Bug Fixes -- **hooks:** Resolve issue updating element reference in `useHook` hook ([340e2f4](https://github.com/storm-software/storm-stack/commit/340e2f4)) +- **hooks:** Resolve issue updating element reference in `useHook` hook + ([340e2f4](https://github.com/storm-software/storm-stack/commit/340e2f4)) ## 1.30.0 (2024-10-26) - ### Features -- **types:** Added the `isFileResult` type-checker and updated `status` field ([2fc6410](https://github.com/storm-software/storm-stack/commit/2fc6410)) +- **types:** Added the `isFileResult` type-checker and updated `status` field + ([2fc6410](https://github.com/storm-software/storm-stack/commit/2fc6410)) ## 1.29.2 (2024-10-24) - ### Bug Fixes -- **date-time:** Update the conditionals in validate functions ([f5f4e26](https://github.com/storm-software/storm-stack/commit/f5f4e26)) +- **date-time:** Update the conditionals in validate functions + ([f5f4e26](https://github.com/storm-software/storm-stack/commit/f5f4e26)) ## 1.29.1 (2024-10-24) - ### Bug Fixes -- **date-time:** Resolve issue with the date-time format functions ([f385b23](https://github.com/storm-software/storm-stack/commit/f385b23)) +- **date-time:** Resolve issue with the date-time format functions + ([f385b23](https://github.com/storm-software/storm-stack/commit/f385b23)) ## 1.29.0 (2024-10-24) - ### Features -- **hooks:** Added the `composeRefs` function and hook ([80a1379](https://github.com/storm-software/storm-stack/commit/80a1379)) +- **hooks:** Added the `composeRefs` function and hook + ([80a1379](https://github.com/storm-software/storm-stack/commit/80a1379)) ## 1.28.0 (2024-10-22) - ### Features -- **monorepo:** Use latest storm build tools in monorepo ([6bf00c5](https://github.com/storm-software/storm-stack/commit/6bf00c5)) +- **monorepo:** Use latest storm build tools in monorepo + ([6bf00c5](https://github.com/storm-software/storm-stack/commit/6bf00c5)) ## 1.27.2 (2024-10-20) - ### Bug Fixes -- **date-time:** Resolve issue with parsing ISO-8601 string ([a63273e](https://github.com/storm-software/storm-stack/commit/a63273e)) +- **date-time:** Resolve issue with parsing ISO-8601 string + ([a63273e](https://github.com/storm-software/storm-stack/commit/a63273e)) ## 1.27.1 (2024-10-20) - ### Bug Fixes -- **date-time:** Resolved issue with creating date-time in validation function ([2a3c1e8](https://github.com/storm-software/storm-stack/commit/2a3c1e8)) +- **date-time:** Resolved issue with creating date-time in validation function + ([2a3c1e8](https://github.com/storm-software/storm-stack/commit/2a3c1e8)) ## 1.27.0 (2024-10-18) - ### Features -- **date-time:** Provide time zone to the formatting function ([318ab55](https://github.com/storm-software/storm-stack/commit/318ab55)) +- **date-time:** Provide time zone to the formatting function + ([318ab55](https://github.com/storm-software/storm-stack/commit/318ab55)) ## 1.26.0 (2024-10-18) - ### Features -- **date-time:** Added new flags to formatting options for helper functions ([b702d6c](https://github.com/storm-software/storm-stack/commit/b702d6c)) - +- **date-time:** Added new flags to formatting options for helper functions + ([b702d6c](https://github.com/storm-software/storm-stack/commit/b702d6c)) ### Bug Fixes -- **serialization:** Resolved stack overflow issue with `StormParser` class ([f890df9](https://github.com/storm-software/storm-stack/commit/f890df9)) +- **serialization:** Resolved stack overflow issue with `StormParser` class + ([f890df9](https://github.com/storm-software/storm-stack/commit/f890df9)) ## 1.25.0 (2024-10-15) - ### Features -- **types:** Added the `index` and `status` properties to the `SelectOption` type ([7da9603](https://github.com/storm-software/storm-stack/commit/7da9603)) +- **types:** Added the `index` and `status` properties to the `SelectOption` + type ([7da9603](https://github.com/storm-software/storm-stack/commit/7da9603)) ## 1.24.0 (2024-10-14) - ### Features -- **types:** Added the `description` property to the `SelectOption` type ([94c33d2](https://github.com/storm-software/storm-stack/commit/94c33d2)) +- **types:** Added the `description` property to the `SelectOption` type + ([94c33d2](https://github.com/storm-software/storm-stack/commit/94c33d2)) ## 1.23.0 (2024-10-11) - ### Features -- **types:** Added the `help` and `success` ValidationDetail message types ([207bf67](https://github.com/storm-software/storm-stack/commit/207bf67)) +- **types:** Added the `help` and `success` ValidationDetail message types + ([207bf67](https://github.com/storm-software/storm-stack/commit/207bf67)) ## 1.22.0 (2024-10-10) - ### Features -- **utilities:** Added the `toPath` and `toDeepKey` functions ([1977f13](https://github.com/storm-software/storm-stack/commit/1977f13)) +- **utilities:** Added the `toPath` and `toDeepKey` functions + ([1977f13](https://github.com/storm-software/storm-stack/commit/1977f13)) ## 1.21.2 (2024-10-10) - ### Bug Fixes -- **monorepo:** Regenerate markup after token update ([a37ef2a](https://github.com/storm-software/storm-stack/commit/a37ef2a)) +- **monorepo:** Regenerate markup after token update + ([a37ef2a](https://github.com/storm-software/storm-stack/commit/a37ef2a)) ## 1.21.1 (2024-10-10) - ### Bug Fixes -- **types:** Added missing tags and regenerated markdown ([7ab98cc](https://github.com/storm-software/storm-stack/commit/7ab98cc)) +- **types:** Added missing tags and regenerated markdown + ([7ab98cc](https://github.com/storm-software/storm-stack/commit/7ab98cc)) ## 1.21.0 (2024-10-10) - ### Features -- **utilities:** Update the base Nx configuration ([99988e0](https://github.com/storm-software/storm-stack/commit/99988e0)) - +- **utilities:** Update the base Nx configuration + ([99988e0](https://github.com/storm-software/storm-stack/commit/99988e0)) ### Bug Fixes -- **monorepo:** Update the Nx configuration to include release process specifications ([df311f7](https://github.com/storm-software/storm-stack/commit/df311f7)) +- **monorepo:** Update the Nx configuration to include release process + specifications + ([df311f7](https://github.com/storm-software/storm-stack/commit/df311f7)) ## 1.20.4 (2024-10-10) - ### Bug Fixes -- **monorepo:** Regenerate the README file formatting ([b81153c](https://github.com/storm-software/storm-stack/commit/b81153c)) +- **monorepo:** Regenerate the README file formatting + ([b81153c](https://github.com/storm-software/storm-stack/commit/b81153c)) ## 1.20.3 (2024-10-09) - ### Bug Fixes -- **utilities:** Reformatting the README files ([723d68b](https://github.com/storm-software/storm-stack/commit/723d68b)) +- **utilities:** Reformatting the README files + ([723d68b](https://github.com/storm-software/storm-stack/commit/723d68b)) ## 1.20.2 (2024-10-08) - ### Bug Fixes -- **types:** Regenerate the monorepo markdown files ([2b5818e](https://github.com/storm-software/storm-stack/commit/2b5818e)) +- **types:** Regenerate the monorepo markdown files + ([2b5818e](https://github.com/storm-software/storm-stack/commit/2b5818e)) ## 1.20.1 (2024-10-08) - ### Bug Fixes -- **monorepo:** Resolve issue with markdown across entire monorepo ([ee6720c](https://github.com/storm-software/storm-stack/commit/ee6720c)) +- **monorepo:** Resolve issue with markdown across entire monorepo + ([ee6720c](https://github.com/storm-software/storm-stack/commit/ee6720c)) ## 1.20.0 (2024-10-08) - ### Features -- **utilities:** Added the flatten and unflatten utility functions and helper types ([702d44d](https://github.com/storm-software/storm-stack/commit/702d44d)) +- **utilities:** Added the flatten and unflatten utility functions and helper + types + ([702d44d](https://github.com/storm-software/storm-stack/commit/702d44d)) ## 1.19.1 (2024-09-15) - ### Bug Fixes -- **monorepo:** Resolve issues in git hook configurations ([f925f93](https://github.com/storm-software/storm-stack/commit/f925f93)) +- **monorepo:** Resolve issues in git hook configurations + ([f925f93](https://github.com/storm-software/storm-stack/commit/f925f93)) ## 1.19.0 (2024-09-14) - ### Features -- **file-system:** Added banner to source control ([0c7bafc](https://github.com/storm-software/storm-stack/commit/0c7bafc)) - - +- **file-system:** Added banner to source control + ([0c7bafc](https://github.com/storm-software/storm-stack/commit/0c7bafc)) ## 1.17.0 (2024-02-10) diff --git a/packages/cli/README.md b/packages/base/cli/README.md similarity index 91% rename from packages/cli/README.md rename to packages/base/cli/README.md index 81cbfe76..29231b27 100644 --- a/packages/cli/README.md +++ b/packages/base/cli/README.md @@ -21,7 +21,7 @@ This package is part of the ⚡Storm Stack monorepo. Storm Stack packages

💻 Visit stormsoftware.com to stay up to date with this developer


-[![Version](https://img.shields.io/badge/version-1.36.0-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/) [![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/) [![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/) [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/) ![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6) [![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/) ![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-stack/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6) +[![Version](https://img.shields.io/badge/version-1.36.0-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/) [![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/) [![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/) [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-base-cli/) ![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6) [![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/) ![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-stack/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6) > [!IMPORTANT] @@ -45,6 +45,7 @@ A collection of CLI utilities to assist in creating command line applications + ## Table of Contents - [Installing](#installing) @@ -70,14 +71,14 @@ A collection of CLI utilities to assist in creating command line applications Using [pnpm](http://pnpm.io): ```bash -pnpm add -D @storm-stack/cli +pnpm add -D @storm-stack/base-cli ```
Using npm ```bash -npm install -D @storm-stack/cli +npm install -D @storm-stack/base-cli ```
@@ -86,7 +87,7 @@ npm install -D @storm-stack/cli Using yarn ```bash -yarn add -D @storm-stack/cli +yarn add -D @storm-stack/base-cli ``` @@ -105,15 +106,15 @@ commands are available to assist in development. ### Building -Run `nx build cli` to build the library. +Run `nx build base-cli` to build the library. ### Running unit tests -Run `nx test cli` to execute the unit tests via [Jest](https://jestjs.io). +Run `nx test base-cli` to execute the unit tests via [Jest](https://jestjs.io). ### Linting -Run `nx lint cli` to run [ESLint](https://eslint.org/) on the package. +Run `nx lint base-cli` to run [ESLint](https://eslint.org/) on the package. @@ -197,7 +198,7 @@ Please try to create bug reports that are: Please adhere to this project's [code of conduct](.github/CODE_OF_CONDUCT.md). You can use -[markdownlint-cli](https://github.com/storm-software/storm-stack/markdownlint-cli) +[markdownlint-base-cli](https://github.com/storm-software/storm-stack/markdownlint-base-cli) to check for common markdown style inconsistency.
[ Back to top ▲ ]
@@ -221,7 +222,7 @@ Thanks goes to these wonderful people - All Contributors + All Contributors Add your contributions diff --git a/packages/hooks/jest.config.ts b/packages/base/cli/jest.config.ts similarity index 50% rename from packages/hooks/jest.config.ts rename to packages/base/cli/jest.config.ts index da2cbd88..9df8158b 100644 --- a/packages/hooks/jest.config.ts +++ b/packages/base/cli/jest.config.ts @@ -1,3 +1,3 @@ import { getJestConfig } from "@storm-software/testing-tools"; -export default getJestConfig("packages/hooks", true, "hooks"); +export default getJestConfig("packages/cli", true, "base-cli"); diff --git a/packages/cli/package.json b/packages/base/cli/package.json similarity index 100% rename from packages/cli/package.json rename to packages/base/cli/package.json diff --git a/packages/errors/project.json b/packages/base/cli/project.json similarity index 65% rename from packages/errors/project.json rename to packages/base/cli/project.json index 42f4d3bc..6ab32b74 100644 --- a/packages/errors/project.json +++ b/packages/base/cli/project.json @@ -1,8 +1,8 @@ { - "name": "errors", - "$schema": "../../node_modules/nx/schemas/project-schema.json", + "name": "base-cli", + "$schema": "../../../node_modules/nx/schemas/project-schema.json", "projectType": "library", - "sourceRoot": "packages/errors/src", + "sourceRoot": "packages/base/cli/src", "targets": { "build": { "cache": true, @@ -12,10 +12,10 @@ "defaultConfiguration": "production", "clean": true, "options": { - "type": "packages/errors/src/index.ts", - "outputPath": "dist/packages/errors", - "tsConfig": "packages/errors/tsconfig.json", - "project": "packages/errors/package.json" + "type": "packages/base/cli/src/index.ts", + "outputPath": "dist/packages/base/cli", + "tsConfig": "packages/base/cli/tsconfig.json", + "project": "packages/base/cli/package.json" }, "configurations": { "production": { diff --git a/packages/cli/src/index.ts b/packages/base/cli/src/index.ts similarity index 100% rename from packages/cli/src/index.ts rename to packages/base/cli/src/index.ts diff --git a/packages/cli/src/program/error-report.ts b/packages/base/cli/src/program/error-report.ts similarity index 100% rename from packages/cli/src/program/error-report.ts rename to packages/base/cli/src/program/error-report.ts diff --git a/packages/cli/src/program/index.ts b/packages/base/cli/src/program/index.ts similarity index 100% rename from packages/cli/src/program/index.ts rename to packages/base/cli/src/program/index.ts diff --git a/packages/cli/src/program/run-cli.ts b/packages/base/cli/src/program/run-cli.ts similarity index 100% rename from packages/cli/src/program/run-cli.ts rename to packages/base/cli/src/program/run-cli.ts diff --git a/packages/cli/src/program/shutdown.ts b/packages/base/cli/src/program/shutdown.ts similarity index 100% rename from packages/cli/src/program/shutdown.ts rename to packages/base/cli/src/program/shutdown.ts diff --git a/packages/cli/src/types.ts b/packages/base/cli/src/types.ts similarity index 100% rename from packages/cli/src/types.ts rename to packages/base/cli/src/types.ts diff --git a/packages/cli/src/utilities/index.ts b/packages/base/cli/src/utilities/index.ts similarity index 90% rename from packages/cli/src/utilities/index.ts rename to packages/base/cli/src/utilities/index.ts index 8775d4c1..52113052 100644 --- a/packages/cli/src/utilities/index.ts +++ b/packages/base/cli/src/utilities/index.ts @@ -16,10 +16,7 @@ -------------------------------------------------------------------*/ export * from "./cli-link"; -export * from "./create-cli-options"; export * from "./execute"; export * from "./execute-command"; export * from "./install"; -export * from "./is-ci"; -export * from "./is-interactive"; export * from "./write-banner"; diff --git a/packages/cli/tsconfig.json b/packages/base/cli/tsconfig.json similarity index 70% rename from packages/cli/tsconfig.json rename to packages/base/cli/tsconfig.json index e11da2ce..99e5c9c6 100644 --- a/packages/cli/tsconfig.json +++ b/packages/base/cli/tsconfig.json @@ -1,7 +1,7 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { - "outDir": "../../dist/out-tsc", + "outDir": "../../../dist/out-tsc", "strict": false }, "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.js", "src/**/*.jsx"], diff --git a/packages/env/tsconfig.spec.json b/packages/base/cli/tsconfig.spec.json similarity index 83% rename from packages/env/tsconfig.spec.json rename to packages/base/cli/tsconfig.spec.json index d41aea47..f8bfbb68 100644 --- a/packages/env/tsconfig.spec.json +++ b/packages/base/cli/tsconfig.spec.json @@ -1,7 +1,7 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "outDir": "../../dist/out-tsc", + "outDir": "../../../dist/out-tsc", "types": ["jest", "node"] }, "include": [ diff --git a/packages/date-time/CHANGELOG.md b/packages/base/date-time/CHANGELOG.md similarity index 86% rename from packages/date-time/CHANGELOG.md rename to packages/base/date-time/CHANGELOG.md index 04499c55..a8b8e14d 100644 --- a/packages/date-time/CHANGELOG.md +++ b/packages/base/date-time/CHANGELOG.md @@ -2,310 +2,321 @@ ### Features -- **monorepo:** Upgrade workflow actions to use the new base processes ([14d2f2f](https://github.com/storm-software/storm-stack/commit/14d2f2f)) +- **monorepo:** Upgrade workflow actions to use the new base processes + ([14d2f2f](https://github.com/storm-software/storm-stack/commit/14d2f2f)) ## 1.45.0 (2024-11-10) ### Features -- **date-time:** Resolve issue parsing ISO string in `StormDateTime` constructor ([c8032d6](https://github.com/storm-software/storm-stack/commit/c8032d6)) +- **date-time:** Resolve issue parsing ISO string in `StormDateTime` constructor + ([c8032d6](https://github.com/storm-software/storm-stack/commit/c8032d6)) ## 1.44.0 (2024-11-10) ### Features -- **cli:** Added `@antfu/install-pkg` to improve install ([26cf962](https://github.com/storm-software/storm-stack/commit/26cf962)) +- **cli:** Added `@antfu/install-pkg` to improve install + ([26cf962](https://github.com/storm-software/storm-stack/commit/26cf962)) ## 1.43.0 (2024-11-10) ### Features -- **cli:** Added the `execute` and `install` utility functions ([8b04259](https://github.com/storm-software/storm-stack/commit/8b04259)) +- **cli:** Added the `execute` and `install` utility functions + ([8b04259](https://github.com/storm-software/storm-stack/commit/8b04259)) ## 1.42.0 (2024-11-08) ### Features -- **monorepo:** Upgrade the workspace's Nx package versions ([075a024](https://github.com/storm-software/storm-stack/commit/075a024)) +- **monorepo:** Upgrade the workspace's Nx package versions + ([075a024](https://github.com/storm-software/storm-stack/commit/075a024)) ## 1.41.0 (2024-11-08) ### Features -- **types:** Regenerate packages with upgraded ops packages ([936026a](https://github.com/storm-software/storm-stack/commit/936026a)) +- **types:** Regenerate packages with upgraded ops packages + ([936026a](https://github.com/storm-software/storm-stack/commit/936026a)) ## 1.40.0 (2024-11-08) - ### Features -- **errors:** Added the `createFromData` helper function ([c15576d](https://github.com/storm-software/storm-stack/commit/c15576d)) +- **errors:** Added the `createFromData` helper function + ([c15576d](https://github.com/storm-software/storm-stack/commit/c15576d)) ## 1.39.0 (2024-11-07) - ### Features -- **date-time:** Added the `getMonthIndex` helper function ([8d979d2](https://github.com/storm-software/storm-stack/commit/8d979d2)) +- **date-time:** Added the `getMonthIndex` helper function + ([8d979d2](https://github.com/storm-software/storm-stack/commit/8d979d2)) ## 1.38.2 (2024-10-31) - ### Bug Fixes -- **date-time:** Resolve issue with incorrectly exporting classes ([140d576](https://github.com/storm-software/storm-stack/commit/140d576)) +- **date-time:** Resolve issue with incorrectly exporting classes + ([140d576](https://github.com/storm-software/storm-stack/commit/140d576)) ## 1.38.1 (2024-10-27) - ### Bug Fixes -- **date-time:** Update static function to no longer be constants ([f366ffe](https://github.com/storm-software/storm-stack/commit/f366ffe)) +- **date-time:** Update static function to no longer be constants + ([f366ffe](https://github.com/storm-software/storm-stack/commit/f366ffe)) ## 1.38.0 (2024-10-27) - ### Features -- **date-time:** Added separate create helper functions for date-time classes ([569673f](https://github.com/storm-software/storm-stack/commit/569673f)) +- **date-time:** Added separate create helper functions for date-time classes + ([569673f](https://github.com/storm-software/storm-stack/commit/569673f)) ## 1.37.1 (2024-10-26) - ### Bug Fixes -- **hooks:** Resolve issue updating element reference in `useHook` hook ([340e2f4](https://github.com/storm-software/storm-stack/commit/340e2f4)) +- **hooks:** Resolve issue updating element reference in `useHook` hook + ([340e2f4](https://github.com/storm-software/storm-stack/commit/340e2f4)) ## 1.37.0 (2024-10-26) - ### Features -- **hooks:** Added the `useHover`, `useIdle`, and `useNetworkState` hooks ([b52aa2f](https://github.com/storm-software/storm-stack/commit/b52aa2f)) +- **hooks:** Added the `useHover`, `useIdle`, and `useNetworkState` hooks + ([b52aa2f](https://github.com/storm-software/storm-stack/commit/b52aa2f)) ## 1.36.0 (2024-10-26) - ### Features -- **types:** Added the `isFileResult` type-checker and updated `status` field ([2fc6410](https://github.com/storm-software/storm-stack/commit/2fc6410)) +- **types:** Added the `isFileResult` type-checker and updated `status` field + ([2fc6410](https://github.com/storm-software/storm-stack/commit/2fc6410)) ## 1.35.0 (2024-10-26) - ### Features -- **types:** Added the `FileResult` shared type definition ([f9d07c6](https://github.com/storm-software/storm-stack/commit/f9d07c6)) +- **types:** Added the `FileResult` shared type definition + ([f9d07c6](https://github.com/storm-software/storm-stack/commit/f9d07c6)) ## 1.34.3 (2024-10-24) - ### Bug Fixes -- **date-time:** Update the conditionals in validate functions ([f5f4e26](https://github.com/storm-software/storm-stack/commit/f5f4e26)) +- **date-time:** Update the conditionals in validate functions + ([f5f4e26](https://github.com/storm-software/storm-stack/commit/f5f4e26)) ## 1.34.2 (2024-10-24) - ### Bug Fixes -- **date-time:** Resolve issue with null date-time validations ([3eaf348](https://github.com/storm-software/storm-stack/commit/3eaf348)) +- **date-time:** Resolve issue with null date-time validations + ([3eaf348](https://github.com/storm-software/storm-stack/commit/3eaf348)) ## 1.34.1 (2024-10-24) - ### Bug Fixes -- **date-time:** Resolve issue with the date-time format functions ([f385b23](https://github.com/storm-software/storm-stack/commit/f385b23)) +- **date-time:** Resolve issue with the date-time format functions + ([f385b23](https://github.com/storm-software/storm-stack/commit/f385b23)) ## 1.34.0 (2024-10-24) - ### Features -- **hooks:** Added `useBattery`, `useClickAway`, and `useCopyToClipboard` hooks ([556db4d](https://github.com/storm-software/storm-stack/commit/556db4d)) +- **hooks:** Added `useBattery`, `useClickAway`, and `useCopyToClipboard` hooks + ([556db4d](https://github.com/storm-software/storm-stack/commit/556db4d)) ## 1.33.0 (2024-10-24) - ### Features -- **hooks:** Added the `composeRefs` function and hook ([80a1379](https://github.com/storm-software/storm-stack/commit/80a1379)) - +- **hooks:** Added the `composeRefs` function and hook + ([80a1379](https://github.com/storm-software/storm-stack/commit/80a1379)) ### Bug Fixes -- **date-time:** Resolved issue with formatting date-time values ([bbddb1a](https://github.com/storm-software/storm-stack/commit/bbddb1a)) +- **date-time:** Resolved issue with formatting date-time values + ([bbddb1a](https://github.com/storm-software/storm-stack/commit/bbddb1a)) ## 1.32.0 (2024-10-22) - ### Features -- **types:** Add type parameters and the `icon` property to the `SelectOption` type ([c0ae1d6](https://github.com/storm-software/storm-stack/commit/c0ae1d6)) +- **types:** Add type parameters and the `icon` property to the `SelectOption` + type ([c0ae1d6](https://github.com/storm-software/storm-stack/commit/c0ae1d6)) ## 1.31.0 (2024-10-22) - ### Features -- **monorepo:** Use latest storm build tools in monorepo ([6bf00c5](https://github.com/storm-software/storm-stack/commit/6bf00c5)) +- **monorepo:** Use latest storm build tools in monorepo + ([6bf00c5](https://github.com/storm-software/storm-stack/commit/6bf00c5)) ## 1.30.0 (2024-10-20) - ### Features -- **serialization:** Added the `parseCookie` and `serializeCookie` helper functions ([0b695ef](https://github.com/storm-software/storm-stack/commit/0b695ef)) +- **serialization:** Added the `parseCookie` and `serializeCookie` helper + functions + ([0b695ef](https://github.com/storm-software/storm-stack/commit/0b695ef)) ## 1.29.3 (2024-10-20) - ### Bug Fixes -- **date-time:** Resolve issue with parsing ISO-8601 string ([a63273e](https://github.com/storm-software/storm-stack/commit/a63273e)) +- **date-time:** Resolve issue with parsing ISO-8601 string + ([a63273e](https://github.com/storm-software/storm-stack/commit/a63273e)) ## 1.29.2 (2024-10-20) - ### Bug Fixes -- **date-time:** Resolve issue with call to validation prior to construction ([d020d67](https://github.com/storm-software/storm-stack/commit/d020d67)) +- **date-time:** Resolve issue with call to validation prior to construction + ([d020d67](https://github.com/storm-software/storm-stack/commit/d020d67)) ## 1.29.1 (2024-10-20) - ### Bug Fixes -- **date-time:** Resolved issue with creating date-time in validation function ([2a3c1e8](https://github.com/storm-software/storm-stack/commit/2a3c1e8)) +- **date-time:** Resolved issue with creating date-time in validation function + ([2a3c1e8](https://github.com/storm-software/storm-stack/commit/2a3c1e8)) ## 1.29.0 (2024-10-20) - ### Features -- **date-time:** Added the day of the month validation to date classes ([734d0c8](https://github.com/storm-software/storm-stack/commit/734d0c8)) +- **date-time:** Added the day of the month validation to date classes + ([734d0c8](https://github.com/storm-software/storm-stack/commit/734d0c8)) ## 1.28.0 (2024-10-18) - ### Features -- **date-time:** Using Tempo to format Date objects ([3b50a18](https://github.com/storm-software/storm-stack/commit/3b50a18)) +- **date-time:** Using Tempo to format Date objects + ([3b50a18](https://github.com/storm-software/storm-stack/commit/3b50a18)) -- **date-time:** Provide time zone to the formatting function ([318ab55](https://github.com/storm-software/storm-stack/commit/318ab55)) +- **date-time:** Provide time zone to the formatting function + ([318ab55](https://github.com/storm-software/storm-stack/commit/318ab55)) ## 1.27.0 (2024-10-18) - ### Features -- **date-time:** Added the `getDefaultTimeZone` function to the `StormDateTime` class ([f2fac83](https://github.com/storm-software/storm-stack/commit/f2fac83)) +- **date-time:** Added the `getDefaultTimeZone` function to the `StormDateTime` + class + ([f2fac83](https://github.com/storm-software/storm-stack/commit/f2fac83)) ## 1.26.0 (2024-10-18) - ### Features -- **date-time:** Added the static validate method to the `StormDateTime` utility classes ([3169747](https://github.com/storm-software/storm-stack/commit/3169747)) +- **date-time:** Added the static validate method to the `StormDateTime` utility + classes + ([3169747](https://github.com/storm-software/storm-stack/commit/3169747)) ## 1.25.0 (2024-10-18) - ### Features -- **date-time:** Added `returnEmptyIfNotSet` and `returnEmptyIfInvalid` options to `formatDate` ([79cbf52](https://github.com/storm-software/storm-stack/commit/79cbf52)) - -- **date-time:** Added new flags to formatting options for helper functions ([b702d6c](https://github.com/storm-software/storm-stack/commit/b702d6c)) +- **date-time:** Added `returnEmptyIfNotSet` and `returnEmptyIfInvalid` options + to `formatDate` + ([79cbf52](https://github.com/storm-software/storm-stack/commit/79cbf52)) +- **date-time:** Added new flags to formatting options for helper functions + ([b702d6c](https://github.com/storm-software/storm-stack/commit/b702d6c)) ### Bug Fixes -- **serialization:** Resolved stack overflow issue with `StormParser` class ([f890df9](https://github.com/storm-software/storm-stack/commit/f890df9)) +- **serialization:** Resolved stack overflow issue with `StormParser` class + ([f890df9](https://github.com/storm-software/storm-stack/commit/f890df9)) ## 1.24.0 (2024-10-15) - ### Features -- **types:** Added the `index` and `status` properties to the `SelectOption` type ([7da9603](https://github.com/storm-software/storm-stack/commit/7da9603)) +- **types:** Added the `index` and `status` properties to the `SelectOption` + type ([7da9603](https://github.com/storm-software/storm-stack/commit/7da9603)) ## 1.23.0 (2024-10-14) - ### Features -- **types:** Added the `description` property to the `SelectOption` type ([94c33d2](https://github.com/storm-software/storm-stack/commit/94c33d2)) +- **types:** Added the `description` property to the `SelectOption` type + ([94c33d2](https://github.com/storm-software/storm-stack/commit/94c33d2)) ## 1.22.0 (2024-10-11) - ### Features -- **types:** Added the `help` and `success` ValidationDetail message types ([207bf67](https://github.com/storm-software/storm-stack/commit/207bf67)) +- **types:** Added the `help` and `success` ValidationDetail message types + ([207bf67](https://github.com/storm-software/storm-stack/commit/207bf67)) ## 1.21.0 (2024-10-10) - ### Features -- **utilities:** Added the `toPath` and `toDeepKey` functions ([1977f13](https://github.com/storm-software/storm-stack/commit/1977f13)) +- **utilities:** Added the `toPath` and `toDeepKey` functions + ([1977f13](https://github.com/storm-software/storm-stack/commit/1977f13)) ## 1.20.2 (2024-10-10) - ### Bug Fixes -- **monorepo:** Regenerate markup after token update ([a37ef2a](https://github.com/storm-software/storm-stack/commit/a37ef2a)) +- **monorepo:** Regenerate markup after token update + ([a37ef2a](https://github.com/storm-software/storm-stack/commit/a37ef2a)) ## 1.20.1 (2024-10-10) - ### Bug Fixes -- **types:** Added missing tags and regenerated markdown ([7ab98cc](https://github.com/storm-software/storm-stack/commit/7ab98cc)) +- **types:** Added missing tags and regenerated markdown + ([7ab98cc](https://github.com/storm-software/storm-stack/commit/7ab98cc)) ## 1.20.0 (2024-10-10) - ### Features -- **utilities:** Update the base Nx configuration ([99988e0](https://github.com/storm-software/storm-stack/commit/99988e0)) - +- **utilities:** Update the base Nx configuration + ([99988e0](https://github.com/storm-software/storm-stack/commit/99988e0)) ### Bug Fixes -- **monorepo:** Update the Nx configuration to include release process specifications ([df311f7](https://github.com/storm-software/storm-stack/commit/df311f7)) +- **monorepo:** Update the Nx configuration to include release process + specifications + ([df311f7](https://github.com/storm-software/storm-stack/commit/df311f7)) ## 1.19.4 (2024-10-10) - ### Bug Fixes -- **monorepo:** Regenerate the README file formatting ([b81153c](https://github.com/storm-software/storm-stack/commit/b81153c)) +- **monorepo:** Regenerate the README file formatting + ([b81153c](https://github.com/storm-software/storm-stack/commit/b81153c)) ## 1.19.3 (2024-10-09) - ### Bug Fixes -- **utilities:** Reformatting the README files ([723d68b](https://github.com/storm-software/storm-stack/commit/723d68b)) +- **utilities:** Reformatting the README files + ([723d68b](https://github.com/storm-software/storm-stack/commit/723d68b)) ## 1.19.2 (2024-10-08) - ### Bug Fixes -- **types:** Regenerate the monorepo markdown files ([2b5818e](https://github.com/storm-software/storm-stack/commit/2b5818e)) +- **types:** Regenerate the monorepo markdown files + ([2b5818e](https://github.com/storm-software/storm-stack/commit/2b5818e)) ## 1.19.1 (2024-10-08) - ### Bug Fixes -- **monorepo:** Resolve issue with markdown across entire monorepo ([ee6720c](https://github.com/storm-software/storm-stack/commit/ee6720c)) - - +- **monorepo:** Resolve issue with markdown across entire monorepo + ([ee6720c](https://github.com/storm-software/storm-stack/commit/ee6720c)) ## 1.18.0 (2024-02-10) diff --git a/packages/date-time/README.md b/packages/base/date-time/README.md similarity index 97% rename from packages/date-time/README.md rename to packages/base/date-time/README.md index eadc2096..99ad53bf 100644 --- a/packages/date-time/README.md +++ b/packages/base/date-time/README.md @@ -48,6 +48,7 @@ environment. + ## Table of Contents - [Installing](#installing) @@ -73,14 +74,14 @@ environment. Using [pnpm](http://pnpm.io): ```bash -pnpm add -D @storm-stack/date-time +pnpm add -D @storm-stack/base-date-time ```
Using npm ```bash -npm install -D @storm-stack/date-time +npm install -D @storm-stack/base-date-time ```
@@ -89,7 +90,7 @@ npm install -D @storm-stack/date-time Using yarn ```bash -yarn add -D @storm-stack/date-time +yarn add -D @storm-stack/base-date-time ``` @@ -108,15 +109,17 @@ commands are available to assist in development. ### Building -Run `nx build date-time` to build the library. +Run `nx build base-date-time` to build the library. ### Running unit tests -Run `nx test date-time` to execute the unit tests via [Jest](https://jestjs.io). +Run `nx test base-date-time` to execute the unit tests via +[Jest](https://jestjs.io). ### Linting -Run `nx lint date-time` to run [ESLint](https://eslint.org/) on the package. +Run `nx lint base-date-time` to run [ESLint](https://eslint.org/) on the +package. diff --git a/packages/date-time/package.json b/packages/base/date-time/package.json similarity index 100% rename from packages/date-time/package.json rename to packages/base/date-time/package.json diff --git a/packages/base/date-time/project.json b/packages/base/date-time/project.json new file mode 100644 index 00000000..f8f2fc57 --- /dev/null +++ b/packages/base/date-time/project.json @@ -0,0 +1,35 @@ +{ + "name": "base-date-time", + "$schema": "../../../node_modules/nx/schemas/project-schema.json", + "projectType": "library", + "sourceRoot": "packages/base/date-time/src", + "targets": { + "build": { + "cache": true, + "executor": "@storm-software/workspace-tools:unbuild", + "inputs": ["typescript", "^production"], + "outputs": ["{options.outputPath}"], + "defaultConfiguration": "production", + "clean": true, + "options": { + "type": "packages/base/date-time/src/index.ts", + "outputPath": "dist/packages/base/date-time", + "tsConfig": "packages/base/date-time/tsconfig.json", + "project": "packages/base/date-time/package.json" + }, + "configurations": { + "production": { + "sourceMap": false, + "verbose": false + }, + "development": { + "sourceMap": true, + "verbose": true + } + } + }, + "nx-release-publish": { + "executor": "@storm-software/workspace-tools:npm-publish" + } + } +} diff --git a/packages/date-time/src/constants.ts b/packages/base/date-time/src/constants.ts similarity index 100% rename from packages/date-time/src/constants.ts rename to packages/base/date-time/src/constants.ts diff --git a/packages/date-time/src/errors.ts b/packages/base/date-time/src/errors.ts similarity index 100% rename from packages/date-time/src/errors.ts rename to packages/base/date-time/src/errors.ts diff --git a/packages/date-time/src/index.ts b/packages/base/date-time/src/index.ts similarity index 100% rename from packages/date-time/src/index.ts rename to packages/base/date-time/src/index.ts diff --git a/packages/date-time/src/storm-date-time.ts b/packages/base/date-time/src/storm-date-time.ts similarity index 100% rename from packages/date-time/src/storm-date-time.ts rename to packages/base/date-time/src/storm-date-time.ts diff --git a/packages/date-time/src/storm-date.ts b/packages/base/date-time/src/storm-date.ts similarity index 100% rename from packages/date-time/src/storm-date.ts rename to packages/base/date-time/src/storm-date.ts diff --git a/packages/date-time/src/storm-time.ts b/packages/base/date-time/src/storm-time.ts similarity index 100% rename from packages/date-time/src/storm-time.ts rename to packages/base/date-time/src/storm-time.ts diff --git a/packages/date-time/src/utilities/format-date-time-iso.ts b/packages/base/date-time/src/utilities/format-date-time-iso.ts similarity index 100% rename from packages/date-time/src/utilities/format-date-time-iso.ts rename to packages/base/date-time/src/utilities/format-date-time-iso.ts diff --git a/packages/date-time/src/utilities/format-date-time.ts b/packages/base/date-time/src/utilities/format-date-time.ts similarity index 100% rename from packages/date-time/src/utilities/format-date-time.ts rename to packages/base/date-time/src/utilities/format-date-time.ts diff --git a/packages/date-time/src/utilities/format-date.ts b/packages/base/date-time/src/utilities/format-date.ts similarity index 100% rename from packages/date-time/src/utilities/format-date.ts rename to packages/base/date-time/src/utilities/format-date.ts diff --git a/packages/date-time/src/utilities/format-since.ts b/packages/base/date-time/src/utilities/format-since.ts similarity index 100% rename from packages/date-time/src/utilities/format-since.ts rename to packages/base/date-time/src/utilities/format-since.ts diff --git a/packages/date-time/src/utilities/format-time.ts b/packages/base/date-time/src/utilities/format-time.ts similarity index 100% rename from packages/date-time/src/utilities/format-time.ts rename to packages/base/date-time/src/utilities/format-time.ts diff --git a/packages/date-time/src/utilities/index.ts b/packages/base/date-time/src/utilities/index.ts similarity index 100% rename from packages/date-time/src/utilities/index.ts rename to packages/base/date-time/src/utilities/index.ts diff --git a/packages/date-time/src/utilities/is-date-time.ts b/packages/base/date-time/src/utilities/is-date-time.ts similarity index 100% rename from packages/date-time/src/utilities/is-date-time.ts rename to packages/base/date-time/src/utilities/is-date-time.ts diff --git a/packages/date-time/src/utilities/is-instant.ts b/packages/base/date-time/src/utilities/is-instant.ts similarity index 100% rename from packages/date-time/src/utilities/is-instant.ts rename to packages/base/date-time/src/utilities/is-instant.ts diff --git a/packages/date-time/src/utilities/validate-date-time.ts b/packages/base/date-time/src/utilities/validate-date-time.ts similarity index 100% rename from packages/date-time/src/utilities/validate-date-time.ts rename to packages/base/date-time/src/utilities/validate-date-time.ts diff --git a/packages/date-time/src/utilities/validate-date.ts b/packages/base/date-time/src/utilities/validate-date.ts similarity index 100% rename from packages/date-time/src/utilities/validate-date.ts rename to packages/base/date-time/src/utilities/validate-date.ts diff --git a/packages/date-time/src/utilities/validate-day-of-month.ts b/packages/base/date-time/src/utilities/validate-day-of-month.ts similarity index 100% rename from packages/date-time/src/utilities/validate-day-of-month.ts rename to packages/base/date-time/src/utilities/validate-day-of-month.ts diff --git a/packages/date-time/src/utilities/validate-time.ts b/packages/base/date-time/src/utilities/validate-time.ts similarity index 100% rename from packages/date-time/src/utilities/validate-time.ts rename to packages/base/date-time/src/utilities/validate-time.ts diff --git a/packages/plugin-system/tsconfig.json b/packages/base/date-time/tsconfig.json similarity index 68% rename from packages/plugin-system/tsconfig.json rename to packages/base/date-time/tsconfig.json index f1f337a7..40928c21 100644 --- a/packages/plugin-system/tsconfig.json +++ b/packages/base/date-time/tsconfig.json @@ -1,7 +1,7 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { - "outDir": "../../dist/out-tsc" + "outDir": "../../../dist/out-tsc" }, "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.js", "src/**/*.jsx"], "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"] diff --git a/packages/cli/tsconfig.spec.json b/packages/base/date-time/tsconfig.spec.json similarity index 83% rename from packages/cli/tsconfig.spec.json rename to packages/base/date-time/tsconfig.spec.json index d41aea47..f8bfbb68 100644 --- a/packages/cli/tsconfig.spec.json +++ b/packages/base/date-time/tsconfig.spec.json @@ -1,7 +1,7 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "outDir": "../../dist/out-tsc", + "outDir": "../../../dist/out-tsc", "types": ["jest", "node"] }, "include": [ diff --git a/packages/base/env/CHANGELOG.md b/packages/base/env/CHANGELOG.md new file mode 100644 index 00000000..f0455769 --- /dev/null +++ b/packages/base/env/CHANGELOG.md @@ -0,0 +1,6 @@ +## 0.1.0 (2024-12-20) + +### Features + +- **env:** Initial check-in for the `@storm-stack/env` package + ([5a367cd](https://github.com/storm-software/storm-stack/commit/5a367cd)) diff --git a/packages/env/README.md b/packages/base/env/README.md similarity index 70% rename from packages/env/README.md rename to packages/base/env/README.md index 90de4109..87577666 100644 --- a/packages/env/README.md +++ b/packages/base/env/README.md @@ -3,7 +3,7 @@ # Storm Stack - Environment -A package used by Storm Software to manage environment variables, +A package used by Storm Software to manage base-environment variables, configurations, and secrets @@ -14,14 +14,14 @@ configurations, and secrets Using [pnpm](http://pnpm.io): ```bash -pnpm add -D @storm-stack/env +pnpm add -D @storm-stack/base-env ```
Using npm ```bash -npm install -D @storm-stack/env +npm install -D @storm-stack/base-env ```
@@ -30,7 +30,7 @@ npm install -D @storm-stack/env Using yarn ```bash -yarn add -D @storm-stack/env +yarn add -D @storm-stack/base-env ``` @@ -49,15 +49,15 @@ commands are available to assist in development. ### Building -Run `nx build env` to build the library. +Run `nx build base-env` to build the library. ### Running unit tests -Run `nx test env` to execute the unit tests via [Jest](https://jestjs.io). +Run `nx test base-env` to execute the unit tests via [Jest](https://jestjs.io). ### Linting -Run `nx lint env` to run [ESLint](https://eslint.org/) on the package. +Run `nx lint base-env` to run [ESLint](https://eslint.org/) on the package. diff --git a/packages/cli/jest.config.ts b/packages/base/env/jest.config.ts similarity index 50% rename from packages/cli/jest.config.ts rename to packages/base/env/jest.config.ts index 9cefcf86..e1254975 100644 --- a/packages/cli/jest.config.ts +++ b/packages/base/env/jest.config.ts @@ -1,3 +1,3 @@ import { getJestConfig } from "@storm-software/testing-tools"; -export default getJestConfig("packages/cli", true, "cli"); +export default getJestConfig("packages/env", true, "base-env"); diff --git a/packages/env/package.json b/packages/base/env/package.json similarity index 100% rename from packages/env/package.json rename to packages/base/env/package.json diff --git a/packages/env/project.json b/packages/base/env/project.json similarity index 62% rename from packages/env/project.json rename to packages/base/env/project.json index 49b251c5..4fbc89a1 100644 --- a/packages/env/project.json +++ b/packages/base/env/project.json @@ -1,22 +1,23 @@ { - "name": "env", - "$schema": "../../node_modules/nx/schemas/project-schema.json", + "name": "base-env", + "$schema": "../../../node_modules/nx/schemas/project-schema.json", "projectType": "library", - "sourceRoot": "packages/env/src", + "sourceRoot": "packages/base/env/src", + "tags": ["platform:neutral"], "targets": { "build": { "executor": "@storm-software/workspace-tools:unbuild", "outputs": ["{options.outputPath}"], "options": { - "entry": "packages/env/src/index.ts", - "outputPath": "dist/packages/env", - "tsConfig": "packages/env/tsconfig.json", - "project": "packages/env/package.json", + "entry": "packages/base/env/src/index.ts", + "outputPath": "dist/packages/base/env", + "tsConfig": "packages/base/env/tsconfig.json", + "project": "packages/base/env/package.json", "defaultConfiguration": "production", "platform": "neutral", "assets": [ { - "input": "packages/env", + "input": "packages/base/env", "glob": "*.md", "output": "/" }, @@ -38,6 +39,5 @@ } } } - }, - "tags": ["platform:neutral"] + } } diff --git a/packages/env/src/index.ts b/packages/base/env/src/index.ts similarity index 100% rename from packages/env/src/index.ts rename to packages/base/env/src/index.ts diff --git a/packages/env/src/types.ts b/packages/base/env/src/types.ts similarity index 100% rename from packages/env/src/types.ts rename to packages/base/env/src/types.ts diff --git a/packages/env/src/utilities/get-workspace-config.ts b/packages/base/env/src/utilities/get-workspace-config.ts similarity index 100% rename from packages/env/src/utilities/get-workspace-config.ts rename to packages/base/env/src/utilities/get-workspace-config.ts diff --git a/packages/env/src/utilities/index.ts b/packages/base/env/src/utilities/index.ts similarity index 100% rename from packages/env/src/utilities/index.ts rename to packages/base/env/src/utilities/index.ts diff --git a/packages/env/tsconfig.json b/packages/base/env/tsconfig.json similarity index 72% rename from packages/env/tsconfig.json rename to packages/base/env/tsconfig.json index d3928740..078ce2b3 100644 --- a/packages/env/tsconfig.json +++ b/packages/base/env/tsconfig.json @@ -1,7 +1,7 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { - "outDir": "../../dist/out-tsc", + "outDir": "../../../dist/out-tsc", "noEmit": true }, "files": [], diff --git a/packages/errors/tsconfig.spec.json b/packages/base/env/tsconfig.spec.json similarity index 83% rename from packages/errors/tsconfig.spec.json rename to packages/base/env/tsconfig.spec.json index d41aea47..f8bfbb68 100644 --- a/packages/errors/tsconfig.spec.json +++ b/packages/base/env/tsconfig.spec.json @@ -1,7 +1,7 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "outDir": "../../dist/out-tsc", + "outDir": "../../../dist/out-tsc", "types": ["jest", "node"] }, "include": [ diff --git a/packages/logging/CHANGELOG.md b/packages/base/logging/CHANGELOG.md similarity index 90% rename from packages/logging/CHANGELOG.md rename to packages/base/logging/CHANGELOG.md index fdb7e503..5fef274a 100644 --- a/packages/logging/CHANGELOG.md +++ b/packages/base/logging/CHANGELOG.md @@ -2,228 +2,236 @@ ### Features -- **logging:** Update the `initialize` method signature in the `StormLog` class ([7b11262](https://github.com/storm-software/storm-stack/commit/7b11262)) +- **logging:** Update the `initialize` method signature in the `StormLog` class + ([7b11262](https://github.com/storm-software/storm-stack/commit/7b11262)) ## 1.39.0 (2024-12-02) ### Features -- **monorepo:** Upgrade workflow actions to use the new base processes ([14d2f2f](https://github.com/storm-software/storm-stack/commit/14d2f2f)) +- **monorepo:** Upgrade workflow actions to use the new base processes + ([14d2f2f](https://github.com/storm-software/storm-stack/commit/14d2f2f)) ## 1.38.0 (2024-11-10) ### Features -- **date-time:** Resolve issue parsing ISO string in `StormDateTime` constructor ([c8032d6](https://github.com/storm-software/storm-stack/commit/c8032d6)) +- **date-time:** Resolve issue parsing ISO string in `StormDateTime` constructor + ([c8032d6](https://github.com/storm-software/storm-stack/commit/c8032d6)) ## 1.37.0 (2024-11-10) ### Features -- **cli:** Added `@antfu/install-pkg` to improve install ([26cf962](https://github.com/storm-software/storm-stack/commit/26cf962)) +- **cli:** Added `@antfu/install-pkg` to improve install + ([26cf962](https://github.com/storm-software/storm-stack/commit/26cf962)) ## 1.36.0 (2024-11-10) ### Features -- **cli:** Added the `execute` and `install` utility functions ([8b04259](https://github.com/storm-software/storm-stack/commit/8b04259)) +- **cli:** Added the `execute` and `install` utility functions + ([8b04259](https://github.com/storm-software/storm-stack/commit/8b04259)) ## 1.35.0 (2024-11-08) ### Features -- **monorepo:** Upgrade the workspace's Nx package versions ([075a024](https://github.com/storm-software/storm-stack/commit/075a024)) +- **monorepo:** Upgrade the workspace's Nx package versions + ([075a024](https://github.com/storm-software/storm-stack/commit/075a024)) ## 1.34.0 (2024-11-08) ### Features -- **types:** Regenerate packages with upgraded ops packages ([936026a](https://github.com/storm-software/storm-stack/commit/936026a)) +- **types:** Regenerate packages with upgraded ops packages + ([936026a](https://github.com/storm-software/storm-stack/commit/936026a)) ## 1.33.0 (2024-11-08) - ### Features -- **errors:** Added the `createFromData` helper function ([c15576d](https://github.com/storm-software/storm-stack/commit/c15576d)) +- **errors:** Added the `createFromData` helper function + ([c15576d](https://github.com/storm-software/storm-stack/commit/c15576d)) ## 1.32.0 (2024-11-07) - ### Features -- **date-time:** Added the `getMonthIndex` helper function ([8d979d2](https://github.com/storm-software/storm-stack/commit/8d979d2)) +- **date-time:** Added the `getMonthIndex` helper function + ([8d979d2](https://github.com/storm-software/storm-stack/commit/8d979d2)) ## 1.31.2 (2024-10-27) - ### Bug Fixes -- **date-time:** Update static function to no longer be constants ([f366ffe](https://github.com/storm-software/storm-stack/commit/f366ffe)) +- **date-time:** Update static function to no longer be constants + ([f366ffe](https://github.com/storm-software/storm-stack/commit/f366ffe)) ## 1.31.1 (2024-10-26) - ### Bug Fixes -- **hooks:** Resolve issue updating element reference in `useHook` hook ([340e2f4](https://github.com/storm-software/storm-stack/commit/340e2f4)) +- **hooks:** Resolve issue updating element reference in `useHook` hook + ([340e2f4](https://github.com/storm-software/storm-stack/commit/340e2f4)) ## 1.31.0 (2024-10-26) - ### Features -- **types:** Added the `isFileResult` type-checker and updated `status` field ([2fc6410](https://github.com/storm-software/storm-stack/commit/2fc6410)) +- **types:** Added the `isFileResult` type-checker and updated `status` field + ([2fc6410](https://github.com/storm-software/storm-stack/commit/2fc6410)) ## 1.30.2 (2024-10-24) - ### Bug Fixes -- **date-time:** Update the conditionals in validate functions ([f5f4e26](https://github.com/storm-software/storm-stack/commit/f5f4e26)) +- **date-time:** Update the conditionals in validate functions + ([f5f4e26](https://github.com/storm-software/storm-stack/commit/f5f4e26)) ## 1.30.1 (2024-10-24) - ### Bug Fixes -- **date-time:** Resolve issue with the date-time format functions ([f385b23](https://github.com/storm-software/storm-stack/commit/f385b23)) +- **date-time:** Resolve issue with the date-time format functions + ([f385b23](https://github.com/storm-software/storm-stack/commit/f385b23)) ## 1.30.0 (2024-10-24) - ### Features -- **hooks:** Added the `composeRefs` function and hook ([80a1379](https://github.com/storm-software/storm-stack/commit/80a1379)) +- **hooks:** Added the `composeRefs` function and hook + ([80a1379](https://github.com/storm-software/storm-stack/commit/80a1379)) ## 1.29.0 (2024-10-22) - ### Features -- **monorepo:** Use latest storm build tools in monorepo ([6bf00c5](https://github.com/storm-software/storm-stack/commit/6bf00c5)) +- **monorepo:** Use latest storm build tools in monorepo + ([6bf00c5](https://github.com/storm-software/storm-stack/commit/6bf00c5)) ## 1.28.2 (2024-10-20) - ### Bug Fixes -- **date-time:** Resolve issue with parsing ISO-8601 string ([a63273e](https://github.com/storm-software/storm-stack/commit/a63273e)) +- **date-time:** Resolve issue with parsing ISO-8601 string + ([a63273e](https://github.com/storm-software/storm-stack/commit/a63273e)) ## 1.28.1 (2024-10-20) - ### Bug Fixes -- **date-time:** Resolved issue with creating date-time in validation function ([2a3c1e8](https://github.com/storm-software/storm-stack/commit/2a3c1e8)) +- **date-time:** Resolved issue with creating date-time in validation function + ([2a3c1e8](https://github.com/storm-software/storm-stack/commit/2a3c1e8)) ## 1.28.0 (2024-10-18) - ### Features -- **date-time:** Provide time zone to the formatting function ([318ab55](https://github.com/storm-software/storm-stack/commit/318ab55)) +- **date-time:** Provide time zone to the formatting function + ([318ab55](https://github.com/storm-software/storm-stack/commit/318ab55)) ## 1.27.0 (2024-10-18) - ### Features -- **date-time:** Added new flags to formatting options for helper functions ([b702d6c](https://github.com/storm-software/storm-stack/commit/b702d6c)) - +- **date-time:** Added new flags to formatting options for helper functions + ([b702d6c](https://github.com/storm-software/storm-stack/commit/b702d6c)) ### Bug Fixes -- **serialization:** Resolved stack overflow issue with `StormParser` class ([f890df9](https://github.com/storm-software/storm-stack/commit/f890df9)) +- **serialization:** Resolved stack overflow issue with `StormParser` class + ([f890df9](https://github.com/storm-software/storm-stack/commit/f890df9)) ## 1.26.0 (2024-10-15) - ### Features -- **types:** Added the `index` and `status` properties to the `SelectOption` type ([7da9603](https://github.com/storm-software/storm-stack/commit/7da9603)) +- **types:** Added the `index` and `status` properties to the `SelectOption` + type ([7da9603](https://github.com/storm-software/storm-stack/commit/7da9603)) ## 1.25.0 (2024-10-14) - ### Features -- **types:** Added the `description` property to the `SelectOption` type ([94c33d2](https://github.com/storm-software/storm-stack/commit/94c33d2)) +- **types:** Added the `description` property to the `SelectOption` type + ([94c33d2](https://github.com/storm-software/storm-stack/commit/94c33d2)) ## 1.24.0 (2024-10-11) - ### Features -- **types:** Added the `help` and `success` ValidationDetail message types ([207bf67](https://github.com/storm-software/storm-stack/commit/207bf67)) +- **types:** Added the `help` and `success` ValidationDetail message types + ([207bf67](https://github.com/storm-software/storm-stack/commit/207bf67)) ## 1.23.0 (2024-10-10) - ### Features -- **utilities:** Added the `toPath` and `toDeepKey` functions ([1977f13](https://github.com/storm-software/storm-stack/commit/1977f13)) +- **utilities:** Added the `toPath` and `toDeepKey` functions + ([1977f13](https://github.com/storm-software/storm-stack/commit/1977f13)) ## 1.22.2 (2024-10-10) - ### Bug Fixes -- **monorepo:** Regenerate markup after token update ([a37ef2a](https://github.com/storm-software/storm-stack/commit/a37ef2a)) +- **monorepo:** Regenerate markup after token update + ([a37ef2a](https://github.com/storm-software/storm-stack/commit/a37ef2a)) ## 1.22.1 (2024-10-10) - ### Bug Fixes -- **types:** Added missing tags and regenerated markdown ([7ab98cc](https://github.com/storm-software/storm-stack/commit/7ab98cc)) +- **types:** Added missing tags and regenerated markdown + ([7ab98cc](https://github.com/storm-software/storm-stack/commit/7ab98cc)) ## 1.22.0 (2024-10-10) - ### Features -- **utilities:** Update the base Nx configuration ([99988e0](https://github.com/storm-software/storm-stack/commit/99988e0)) - +- **utilities:** Update the base Nx configuration + ([99988e0](https://github.com/storm-software/storm-stack/commit/99988e0)) ### Bug Fixes -- **monorepo:** Update the Nx configuration to include release process specifications ([df311f7](https://github.com/storm-software/storm-stack/commit/df311f7)) +- **monorepo:** Update the Nx configuration to include release process + specifications + ([df311f7](https://github.com/storm-software/storm-stack/commit/df311f7)) ## 1.21.4 (2024-10-10) - ### Bug Fixes -- **monorepo:** Regenerate the README file formatting ([b81153c](https://github.com/storm-software/storm-stack/commit/b81153c)) +- **monorepo:** Regenerate the README file formatting + ([b81153c](https://github.com/storm-software/storm-stack/commit/b81153c)) ## 1.21.3 (2024-10-09) - ### Bug Fixes -- **utilities:** Reformatting the README files ([723d68b](https://github.com/storm-software/storm-stack/commit/723d68b)) +- **utilities:** Reformatting the README files + ([723d68b](https://github.com/storm-software/storm-stack/commit/723d68b)) ## 1.21.2 (2024-10-08) - ### Bug Fixes -- **types:** Regenerate the monorepo markdown files ([2b5818e](https://github.com/storm-software/storm-stack/commit/2b5818e)) +- **types:** Regenerate the monorepo markdown files + ([2b5818e](https://github.com/storm-software/storm-stack/commit/2b5818e)) ## 1.21.1 (2024-10-08) - ### Bug Fixes -- **monorepo:** Resolve issue with markdown across entire monorepo ([ee6720c](https://github.com/storm-software/storm-stack/commit/ee6720c)) +- **monorepo:** Resolve issue with markdown across entire monorepo + ([ee6720c](https://github.com/storm-software/storm-stack/commit/ee6720c)) ## 1.21.0 (2024-09-13) - ### Features -- **telemetry:** Added Open Telemetry support ([6ca1c8d](https://github.com/storm-software/storm-stack/commit/6ca1c8d)) +- **telemetry:** Added Open Telemetry support + ([6ca1c8d](https://github.com/storm-software/storm-stack/commit/6ca1c8d)) ## 1.20.0 (2024-02-10) diff --git a/packages/logging/README.md b/packages/base/logging/README.md similarity index 95% rename from packages/logging/README.md rename to packages/base/logging/README.md index 4ef02804..6fdfbaae 100644 --- a/packages/logging/README.md +++ b/packages/base/logging/README.md @@ -41,12 +41,13 @@ This package is part of the ⚡Storm Stack monorepo. Storm Stack packages # Storm Logging Package -📓 This package provides a logging service for the Storm stack. Included is base -logger functionality and a console logger utility used by the Storm CLI tools -and for local development. +📓 This package provides a base-logging service for the Storm stack. Included is +base logger functionality and a console logger utility used by the Storm CLI +tools and for local development. + ## Table of Contents - [Installing](#installing) @@ -72,14 +73,14 @@ and for local development. Using [pnpm](http://pnpm.io): ```bash -pnpm add -D @storm-stack/logging +pnpm add -D @storm-stack/base-logging ```
Using npm ```bash -npm install -D @storm-stack/logging +npm install -D @storm-stack/base-logging ```
@@ -88,7 +89,7 @@ npm install -D @storm-stack/logging Using yarn ```bash -yarn add -D @storm-stack/logging +yarn add -D @storm-stack/base-logging ``` @@ -107,15 +108,16 @@ commands are available to assist in development. ### Building -Run `nx build logging` to build the library. +Run `nx build base-logging` to build the library. ### Running unit tests -Run `nx test logging` to execute the unit tests via [Jest](https://jestjs.io). +Run `nx test base-logging` to execute the unit tests via +[Jest](https://jestjs.io). ### Linting -Run `nx lint logging` to run [ESLint](https://eslint.org/) on the package. +Run `nx lint base-logging` to run [ESLint](https://eslint.org/) on the package. diff --git a/packages/base/logging/jest.config.ts b/packages/base/logging/jest.config.ts new file mode 100644 index 00000000..2c5aa3f7 --- /dev/null +++ b/packages/base/logging/jest.config.ts @@ -0,0 +1,3 @@ +import { getJestConfig } from "@storm-software/testing-tools"; + +export default getJestConfig("packages/logging", true, "base-logging"); diff --git a/packages/logging/package.json b/packages/base/logging/package.json similarity index 100% rename from packages/logging/package.json rename to packages/base/logging/package.json diff --git a/packages/logging/project.json b/packages/base/logging/project.json similarity index 66% rename from packages/logging/project.json rename to packages/base/logging/project.json index 00d058f8..59c7ea62 100644 --- a/packages/logging/project.json +++ b/packages/base/logging/project.json @@ -1,8 +1,8 @@ { - "name": "logging", - "$schema": "../../node_modules/nx/schemas/project-schema.json", + "name": "base-logging", + "$schema": "../../../node_modules/nx/schemas/project-schema.json", "projectType": "library", - "sourceRoot": "packages/logging/src", + "sourceRoot": "packages/base/logging/src", "tags": ["scope:package", "type:lib", "lang:ts"], "targets": { "build": { @@ -13,10 +13,10 @@ "defaultConfiguration": "production", "clean": true, "options": { - "type": "packages/logging/src/index.ts", - "outputPath": "dist/packages/logging", - "tsConfig": "packages/logging/tsconfig.json", - "project": "packages/logging/package.json" + "type": "packages/base/logging/src/index.ts", + "outputPath": "dist/packages/base/logging", + "tsConfig": "packages/base/logging/tsconfig.json", + "project": "packages/base/logging/package.json" }, "configurations": { "production": { diff --git a/packages/logging/src/composition/index.ts b/packages/base/logging/src/composition/index.ts similarity index 100% rename from packages/logging/src/composition/index.ts rename to packages/base/logging/src/composition/index.ts diff --git a/packages/logging/src/composition/logger-wrapper.ts b/packages/base/logging/src/composition/logger-wrapper.ts similarity index 100% rename from packages/logging/src/composition/logger-wrapper.ts rename to packages/base/logging/src/composition/logger-wrapper.ts diff --git a/packages/logging/src/errors.ts b/packages/base/logging/src/errors.ts similarity index 100% rename from packages/logging/src/errors.ts rename to packages/base/logging/src/errors.ts diff --git a/packages/logging/src/index.ts b/packages/base/logging/src/index.ts similarity index 100% rename from packages/logging/src/index.ts rename to packages/base/logging/src/index.ts diff --git a/packages/logging/src/storm-log.ts b/packages/base/logging/src/storm-log.ts similarity index 100% rename from packages/logging/src/storm-log.ts rename to packages/base/logging/src/storm-log.ts diff --git a/packages/logging/src/types.ts b/packages/base/logging/src/types.ts similarity index 100% rename from packages/logging/src/types.ts rename to packages/base/logging/src/types.ts diff --git a/packages/logging/src/utilities/get-log-level.ts b/packages/base/logging/src/utilities/get-log-level.ts similarity index 100% rename from packages/logging/src/utilities/get-log-level.ts rename to packages/base/logging/src/utilities/get-log-level.ts diff --git a/packages/logging/src/utilities/get-pino-options.ts b/packages/base/logging/src/utilities/get-pino-options.ts similarity index 100% rename from packages/logging/src/utilities/get-pino-options.ts rename to packages/base/logging/src/utilities/get-pino-options.ts diff --git a/packages/logging/src/utilities/index.ts b/packages/base/logging/src/utilities/index.ts similarity index 100% rename from packages/logging/src/utilities/index.ts rename to packages/base/logging/src/utilities/index.ts diff --git a/packages/logging/src/utilities/log-serializer.ts b/packages/base/logging/src/utilities/log-serializer.ts similarity index 100% rename from packages/logging/src/utilities/log-serializer.ts rename to packages/base/logging/src/utilities/log-serializer.ts diff --git a/packages/logging/tsconfig.json b/packages/base/logging/tsconfig.json similarity index 70% rename from packages/logging/tsconfig.json rename to packages/base/logging/tsconfig.json index 1366d091..81dd9d1f 100644 --- a/packages/logging/tsconfig.json +++ b/packages/base/logging/tsconfig.json @@ -1,7 +1,7 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { - "outDir": "../../dist/out-tsc", + "outDir": "../../../dist/out-tsc", "noEmit": true }, "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.js", "src/**/*.jsx"], diff --git a/packages/date-time/tsconfig.spec.json b/packages/base/logging/tsconfig.spec.json similarity index 83% rename from packages/date-time/tsconfig.spec.json rename to packages/base/logging/tsconfig.spec.json index d41aea47..f8bfbb68 100644 --- a/packages/date-time/tsconfig.spec.json +++ b/packages/base/logging/tsconfig.spec.json @@ -1,7 +1,7 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "outDir": "../../dist/out-tsc", + "outDir": "../../../dist/out-tsc", "types": ["jest", "node"] }, "include": [ diff --git a/packages/plugin-system/CHANGELOG.md b/packages/base/plugin-system/CHANGELOG.md similarity index 88% rename from packages/plugin-system/CHANGELOG.md rename to packages/base/plugin-system/CHANGELOG.md index ff2484cf..83e1cb4e 100644 --- a/packages/plugin-system/CHANGELOG.md +++ b/packages/base/plugin-system/CHANGELOG.md @@ -2,192 +2,194 @@ ### Features -- **date-time:** Resolve issue parsing ISO string in `StormDateTime` constructor ([c8032d6](https://github.com/storm-software/storm-stack/commit/c8032d6)) +- **date-time:** Resolve issue parsing ISO string in `StormDateTime` constructor + ([c8032d6](https://github.com/storm-software/storm-stack/commit/c8032d6)) ## 1.22.0 (2024-11-10) ### Features -- **cli:** Added the `execute` and `install` utility functions ([8b04259](https://github.com/storm-software/storm-stack/commit/8b04259)) +- **cli:** Added the `execute` and `install` utility functions + ([8b04259](https://github.com/storm-software/storm-stack/commit/8b04259)) ## 1.21.0 (2024-11-08) ### Features -- **types:** Regenerate packages with upgraded ops packages ([936026a](https://github.com/storm-software/storm-stack/commit/936026a)) +- **types:** Regenerate packages with upgraded ops packages + ([936026a](https://github.com/storm-software/storm-stack/commit/936026a)) ## 1.20.0 (2024-11-07) - ### Features -- **date-time:** Added the `getMonthIndex` helper function ([8d979d2](https://github.com/storm-software/storm-stack/commit/8d979d2)) +- **date-time:** Added the `getMonthIndex` helper function + ([8d979d2](https://github.com/storm-software/storm-stack/commit/8d979d2)) ## 1.19.2 (2024-10-27) - ### Bug Fixes -- **date-time:** Update static function to no longer be constants ([f366ffe](https://github.com/storm-software/storm-stack/commit/f366ffe)) +- **date-time:** Update static function to no longer be constants + ([f366ffe](https://github.com/storm-software/storm-stack/commit/f366ffe)) ## 1.19.1 (2024-10-26) - ### Bug Fixes -- **hooks:** Resolve issue updating element reference in `useHook` hook ([340e2f4](https://github.com/storm-software/storm-stack/commit/340e2f4)) +- **hooks:** Resolve issue updating element reference in `useHook` hook + ([340e2f4](https://github.com/storm-software/storm-stack/commit/340e2f4)) ## 1.19.0 (2024-10-26) - ### Features -- **types:** Added the `isFileResult` type-checker and updated `status` field ([2fc6410](https://github.com/storm-software/storm-stack/commit/2fc6410)) +- **types:** Added the `isFileResult` type-checker and updated `status` field + ([2fc6410](https://github.com/storm-software/storm-stack/commit/2fc6410)) ## 1.18.2 (2024-10-24) - ### Bug Fixes -- **date-time:** Update the conditionals in validate functions ([f5f4e26](https://github.com/storm-software/storm-stack/commit/f5f4e26)) +- **date-time:** Update the conditionals in validate functions + ([f5f4e26](https://github.com/storm-software/storm-stack/commit/f5f4e26)) ## 1.18.1 (2024-10-24) - ### Bug Fixes -- **date-time:** Resolve issue with the date-time format functions ([f385b23](https://github.com/storm-software/storm-stack/commit/f385b23)) +- **date-time:** Resolve issue with the date-time format functions + ([f385b23](https://github.com/storm-software/storm-stack/commit/f385b23)) ## 1.18.0 (2024-10-24) - ### Features -- **hooks:** Added the `composeRefs` function and hook ([80a1379](https://github.com/storm-software/storm-stack/commit/80a1379)) +- **hooks:** Added the `composeRefs` function and hook + ([80a1379](https://github.com/storm-software/storm-stack/commit/80a1379)) ## 1.17.0 (2024-10-22) - ### Features -- **monorepo:** Use latest storm build tools in monorepo ([6bf00c5](https://github.com/storm-software/storm-stack/commit/6bf00c5)) +- **monorepo:** Use latest storm build tools in monorepo + ([6bf00c5](https://github.com/storm-software/storm-stack/commit/6bf00c5)) ## 1.16.2 (2024-10-20) - ### Bug Fixes -- **date-time:** Resolve issue with parsing ISO-8601 string ([a63273e](https://github.com/storm-software/storm-stack/commit/a63273e)) +- **date-time:** Resolve issue with parsing ISO-8601 string + ([a63273e](https://github.com/storm-software/storm-stack/commit/a63273e)) ## 1.16.1 (2024-10-20) - ### Bug Fixes -- **date-time:** Resolved issue with creating date-time in validation function ([2a3c1e8](https://github.com/storm-software/storm-stack/commit/2a3c1e8)) +- **date-time:** Resolved issue with creating date-time in validation function + ([2a3c1e8](https://github.com/storm-software/storm-stack/commit/2a3c1e8)) ## 1.16.0 (2024-10-18) - ### Features -- **date-time:** Provide time zone to the formatting function ([318ab55](https://github.com/storm-software/storm-stack/commit/318ab55)) +- **date-time:** Provide time zone to the formatting function + ([318ab55](https://github.com/storm-software/storm-stack/commit/318ab55)) ## 1.15.0 (2024-10-18) - ### Features -- **date-time:** Added new flags to formatting options for helper functions ([b702d6c](https://github.com/storm-software/storm-stack/commit/b702d6c)) - +- **date-time:** Added new flags to formatting options for helper functions + ([b702d6c](https://github.com/storm-software/storm-stack/commit/b702d6c)) ### Bug Fixes -- **serialization:** Resolved stack overflow issue with `StormParser` class ([f890df9](https://github.com/storm-software/storm-stack/commit/f890df9)) +- **serialization:** Resolved stack overflow issue with `StormParser` class + ([f890df9](https://github.com/storm-software/storm-stack/commit/f890df9)) ## 1.14.0 (2024-10-15) - ### Features -- **types:** Added the `index` and `status` properties to the `SelectOption` type ([7da9603](https://github.com/storm-software/storm-stack/commit/7da9603)) +- **types:** Added the `index` and `status` properties to the `SelectOption` + type ([7da9603](https://github.com/storm-software/storm-stack/commit/7da9603)) ## 1.13.0 (2024-10-14) - ### Features -- **types:** Added the `description` property to the `SelectOption` type ([94c33d2](https://github.com/storm-software/storm-stack/commit/94c33d2)) +- **types:** Added the `description` property to the `SelectOption` type + ([94c33d2](https://github.com/storm-software/storm-stack/commit/94c33d2)) ## 1.12.0 (2024-10-11) - ### Features -- **types:** Added the `help` and `success` ValidationDetail message types ([207bf67](https://github.com/storm-software/storm-stack/commit/207bf67)) +- **types:** Added the `help` and `success` ValidationDetail message types + ([207bf67](https://github.com/storm-software/storm-stack/commit/207bf67)) ## 1.11.0 (2024-10-10) - ### Features -- **utilities:** Added the `toPath` and `toDeepKey` functions ([1977f13](https://github.com/storm-software/storm-stack/commit/1977f13)) +- **utilities:** Added the `toPath` and `toDeepKey` functions + ([1977f13](https://github.com/storm-software/storm-stack/commit/1977f13)) ## 1.10.2 (2024-10-10) - ### Bug Fixes -- **monorepo:** Regenerate markup after token update ([a37ef2a](https://github.com/storm-software/storm-stack/commit/a37ef2a)) +- **monorepo:** Regenerate markup after token update + ([a37ef2a](https://github.com/storm-software/storm-stack/commit/a37ef2a)) ## 1.10.1 (2024-10-10) - ### Bug Fixes -- **types:** Added missing tags and regenerated markdown ([7ab98cc](https://github.com/storm-software/storm-stack/commit/7ab98cc)) +- **types:** Added missing tags and regenerated markdown + ([7ab98cc](https://github.com/storm-software/storm-stack/commit/7ab98cc)) ## 1.10.0 (2024-10-10) - ### Features -- **utilities:** Update the base Nx configuration ([99988e0](https://github.com/storm-software/storm-stack/commit/99988e0)) - +- **utilities:** Update the base Nx configuration + ([99988e0](https://github.com/storm-software/storm-stack/commit/99988e0)) ### Bug Fixes -- **monorepo:** Update the Nx configuration to include release process specifications ([df311f7](https://github.com/storm-software/storm-stack/commit/df311f7)) +- **monorepo:** Update the Nx configuration to include release process + specifications + ([df311f7](https://github.com/storm-software/storm-stack/commit/df311f7)) ## 1.9.4 (2024-10-10) - ### Bug Fixes -- **monorepo:** Regenerate the README file formatting ([b81153c](https://github.com/storm-software/storm-stack/commit/b81153c)) +- **monorepo:** Regenerate the README file formatting + ([b81153c](https://github.com/storm-software/storm-stack/commit/b81153c)) ## 1.9.3 (2024-10-09) - ### Bug Fixes -- **utilities:** Reformatting the README files ([723d68b](https://github.com/storm-software/storm-stack/commit/723d68b)) +- **utilities:** Reformatting the README files + ([723d68b](https://github.com/storm-software/storm-stack/commit/723d68b)) ## 1.9.2 (2024-10-08) - ### Bug Fixes -- **types:** Regenerate the monorepo markdown files ([2b5818e](https://github.com/storm-software/storm-stack/commit/2b5818e)) +- **types:** Regenerate the monorepo markdown files + ([2b5818e](https://github.com/storm-software/storm-stack/commit/2b5818e)) ## 1.9.1 (2024-10-08) - ### Bug Fixes -- **monorepo:** Resolve issue with markdown across entire monorepo ([ee6720c](https://github.com/storm-software/storm-stack/commit/ee6720c)) - - +- **monorepo:** Resolve issue with markdown across entire monorepo + ([ee6720c](https://github.com/storm-software/storm-stack/commit/ee6720c)) ## 1.8.0 (2024-02-10) diff --git a/packages/plugin-system/README.md b/packages/base/plugin-system/README.md similarity index 97% rename from packages/plugin-system/README.md rename to packages/base/plugin-system/README.md index 052d31ac..ec4a1efc 100644 --- a/packages/plugin-system/README.md +++ b/packages/base/plugin-system/README.md @@ -46,6 +46,7 @@ application + ## Table of Contents - [Installing](#installing) @@ -71,14 +72,14 @@ application Using [pnpm](http://pnpm.io): ```bash -pnpm add -D @storm-stack/plugin-system +pnpm add -D @storm-stack/base-plugin-system ```
Using npm ```bash -npm install -D @storm-stack/plugin-system +npm install -D @storm-stack/base-plugin-system ```
@@ -87,7 +88,7 @@ npm install -D @storm-stack/plugin-system Using yarn ```bash -yarn add -D @storm-stack/plugin-system +yarn add -D @storm-stack/base-plugin-system ``` @@ -106,16 +107,17 @@ commands are available to assist in development. ### Building -Run `nx build plugin-system` to build the library. +Run `nx build base-plugin-system` to build the library. ### Running unit tests -Run `nx test plugin-system` to execute the unit tests via +Run `nx test base-plugin-system` to execute the unit tests via [Jest](https://jestjs.io). ### Linting -Run `nx lint plugin-system` to run [ESLint](https://eslint.org/) on the package. +Run `nx lint base-plugin-system` to run [ESLint](https://eslint.org/) on the +package. diff --git a/packages/base/plugin-system/jest.config.ts b/packages/base/plugin-system/jest.config.ts new file mode 100644 index 00000000..7da842a7 --- /dev/null +++ b/packages/base/plugin-system/jest.config.ts @@ -0,0 +1,7 @@ +import { getJestConfig } from "@storm-software/testing-tools"; + +export default getJestConfig( + "packages/plugin-system", + true, + "base-plugin-system" +); diff --git a/packages/plugin-system/package.json b/packages/base/plugin-system/package.json similarity index 100% rename from packages/plugin-system/package.json rename to packages/base/plugin-system/package.json diff --git a/packages/plugin-system/project.json b/packages/base/plugin-system/project.json similarity index 63% rename from packages/plugin-system/project.json rename to packages/base/plugin-system/project.json index 0266b6c0..25c6e5b0 100644 --- a/packages/plugin-system/project.json +++ b/packages/base/plugin-system/project.json @@ -1,8 +1,8 @@ { - "name": "plugin-system", - "$schema": "../../node_modules/nx/schemas/project-schema.json", + "name": "base-plugin-system", + "$schema": "../../../node_modules/nx/schemas/project-schema.json", "projectType": "library", - "sourceRoot": "packages/plugin-system/src", + "sourceRoot": "packages/base/plugin-system/src", "targets": { "build": { "cache": true, @@ -13,10 +13,10 @@ "clean": true, "external": ["pnpapi"], "options": { - "type": "packages/plugin-system/src/index.ts", - "outputPath": "dist/packages/plugin-system", - "tsConfig": "packages/plugin-system/tsconfig.json", - "project": "packages/plugin-system/package.json" + "type": "packages/base/plugin-system/src/index.ts", + "outputPath": "dist/packages/base/plugin-system", + "tsConfig": "packages/base/plugin-system/tsconfig.json", + "project": "packages/base/plugin-system/package.json" }, "configurations": { "production": { diff --git a/packages/plugin-system/src/errors.ts b/packages/base/plugin-system/src/errors.ts similarity index 100% rename from packages/plugin-system/src/errors.ts rename to packages/base/plugin-system/src/errors.ts diff --git a/packages/plugin-system/src/index.ts b/packages/base/plugin-system/src/index.ts similarity index 100% rename from packages/plugin-system/src/index.ts rename to packages/base/plugin-system/src/index.ts diff --git a/packages/plugin-system/src/loader/index.ts b/packages/base/plugin-system/src/loader/index.ts similarity index 100% rename from packages/plugin-system/src/loader/index.ts rename to packages/base/plugin-system/src/loader/index.ts diff --git a/packages/plugin-system/src/loader/plugin-loader.ts b/packages/base/plugin-system/src/loader/plugin-loader.ts similarity index 100% rename from packages/plugin-system/src/loader/plugin-loader.ts rename to packages/base/plugin-system/src/loader/plugin-loader.ts diff --git a/packages/plugin-system/src/manager/index.ts b/packages/base/plugin-system/src/manager/index.ts similarity index 100% rename from packages/plugin-system/src/manager/index.ts rename to packages/base/plugin-system/src/manager/index.ts diff --git a/packages/plugin-system/src/manager/plugin-manager.ts b/packages/base/plugin-system/src/manager/plugin-manager.ts similarity index 100% rename from packages/plugin-system/src/manager/plugin-manager.ts rename to packages/base/plugin-system/src/manager/plugin-manager.ts diff --git a/packages/plugin-system/src/types.ts b/packages/base/plugin-system/src/types.ts similarity index 100% rename from packages/plugin-system/src/types.ts rename to packages/base/plugin-system/src/types.ts diff --git a/packages/plugin-system/src/utilities/create-resolver.ts b/packages/base/plugin-system/src/utilities/create-resolver.ts similarity index 100% rename from packages/plugin-system/src/utilities/create-resolver.ts rename to packages/base/plugin-system/src/utilities/create-resolver.ts diff --git a/packages/plugin-system/src/utilities/index.ts b/packages/base/plugin-system/src/utilities/index.ts similarity index 100% rename from packages/plugin-system/src/utilities/index.ts rename to packages/base/plugin-system/src/utilities/index.ts diff --git a/packages/plugin-system/src/utilities/run.ts b/packages/base/plugin-system/src/utilities/run.ts similarity index 100% rename from packages/plugin-system/src/utilities/run.ts rename to packages/base/plugin-system/src/utilities/run.ts diff --git a/packages/file-system/tsconfig.json b/packages/base/plugin-system/tsconfig.json similarity index 68% rename from packages/file-system/tsconfig.json rename to packages/base/plugin-system/tsconfig.json index f1f337a7..40928c21 100644 --- a/packages/file-system/tsconfig.json +++ b/packages/base/plugin-system/tsconfig.json @@ -1,7 +1,7 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { - "outDir": "../../dist/out-tsc" + "outDir": "../../../dist/out-tsc" }, "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.js", "src/**/*.jsx"], "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"] diff --git a/packages/base/plugin-system/tsconfig.spec.json b/packages/base/plugin-system/tsconfig.spec.json new file mode 100644 index 00000000..f8bfbb68 --- /dev/null +++ b/packages/base/plugin-system/tsconfig.spec.json @@ -0,0 +1,13 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../dist/out-tsc", + "types": ["jest", "node"] + }, + "include": [ + "jest.config.ts", + "src/**/*.test.ts", + "src/**/*.spec.ts", + "src/**/*.d.ts" + ] +} diff --git a/packages/base/server-cache/CHANGELOG.md b/packages/base/server-cache/CHANGELOG.md new file mode 100644 index 00000000..04bd107b --- /dev/null +++ b/packages/base/server-cache/CHANGELOG.md @@ -0,0 +1,214 @@ +## 0.17.0 (2024-12-18) + +### Features + +- **logging:** Update the `initialize` method signature in the `StormLog` class + ([7b11262](https://github.com/storm-software/storm-stack/commit/7b11262)) + +## 0.16.0 (2024-11-10) + +### Features + +- **date-time:** Resolve issue parsing ISO string in `StormDateTime` constructor + ([c8032d6](https://github.com/storm-software/storm-stack/commit/c8032d6)) + +## 0.15.0 (2024-11-10) + +### Features + +- **cli:** Added the `execute` and `install` utility functions + ([8b04259](https://github.com/storm-software/storm-stack/commit/8b04259)) + +## 0.14.0 (2024-11-08) + +### Features + +- **types:** Regenerate packages with upgraded ops packages + ([936026a](https://github.com/storm-software/storm-stack/commit/936026a)) + +## 0.13.0 (2024-11-07) + +### Features + +- **date-time:** Added the `getMonthIndex` helper function + ([8d979d2](https://github.com/storm-software/storm-stack/commit/8d979d2)) + +## 0.12.2 (2024-10-27) + +### Bug Fixes + +- **date-time:** Update static function to no longer be constants + ([f366ffe](https://github.com/storm-software/storm-stack/commit/f366ffe)) + +## 0.12.1 (2024-10-26) + +### Bug Fixes + +- **hooks:** Resolve issue updating element reference in `useHook` hook + ([340e2f4](https://github.com/storm-software/storm-stack/commit/340e2f4)) + +## 0.12.0 (2024-10-26) + +### Features + +- **types:** Added the `isFileResult` type-checker and updated `status` field + ([2fc6410](https://github.com/storm-software/storm-stack/commit/2fc6410)) + +## 0.11.2 (2024-10-24) + +### Bug Fixes + +- **date-time:** Update the conditionals in validate functions + ([f5f4e26](https://github.com/storm-software/storm-stack/commit/f5f4e26)) + +## 0.11.1 (2024-10-24) + +### Bug Fixes + +- **date-time:** Resolve issue with the date-time format functions + ([f385b23](https://github.com/storm-software/storm-stack/commit/f385b23)) + +## 0.11.0 (2024-10-24) + +### Features + +- **hooks:** Added the `composeRefs` function and hook + ([80a1379](https://github.com/storm-software/storm-stack/commit/80a1379)) + +## 0.10.0 (2024-10-22) + +### Features + +- **monorepo:** Use latest storm build tools in monorepo + ([6bf00c5](https://github.com/storm-software/storm-stack/commit/6bf00c5)) + +## 0.9.2 (2024-10-20) + +### Bug Fixes + +- **date-time:** Resolve issue with parsing ISO-8601 string + ([a63273e](https://github.com/storm-software/storm-stack/commit/a63273e)) + +## 0.9.1 (2024-10-20) + +### Bug Fixes + +- **date-time:** Resolved issue with creating date-time in validation function + ([2a3c1e8](https://github.com/storm-software/storm-stack/commit/2a3c1e8)) + +## 0.9.0 (2024-10-18) + +### Features + +- **date-time:** Provide time zone to the formatting function + ([318ab55](https://github.com/storm-software/storm-stack/commit/318ab55)) + +## 0.8.0 (2024-10-18) + +### Features + +- **date-time:** Added new flags to formatting options for helper functions + ([b702d6c](https://github.com/storm-software/storm-stack/commit/b702d6c)) + +### Bug Fixes + +- **serialization:** Resolved stack overflow issue with `StormParser` class + ([f890df9](https://github.com/storm-software/storm-stack/commit/f890df9)) + +## 0.7.0 (2024-10-15) + +### Features + +- **types:** Added the `index` and `status` properties to the `SelectOption` + type ([7da9603](https://github.com/storm-software/storm-stack/commit/7da9603)) + +## 0.6.0 (2024-10-14) + +### Features + +- **types:** Added the `description` property to the `SelectOption` type + ([94c33d2](https://github.com/storm-software/storm-stack/commit/94c33d2)) + +## 0.5.0 (2024-10-11) + +### Features + +- **types:** Added the `help` and `success` ValidationDetail message types + ([207bf67](https://github.com/storm-software/storm-stack/commit/207bf67)) + +## 0.4.0 (2024-10-10) + +### Features + +- **utilities:** Added the `toPath` and `toDeepKey` functions + ([1977f13](https://github.com/storm-software/storm-stack/commit/1977f13)) + +## 0.3.2 (2024-10-10) + +### Bug Fixes + +- **monorepo:** Regenerate markup after token update + ([a37ef2a](https://github.com/storm-software/storm-stack/commit/a37ef2a)) + +## 0.3.1 (2024-10-10) + +### Bug Fixes + +- **types:** Added missing tags and regenerated markdown + ([7ab98cc](https://github.com/storm-software/storm-stack/commit/7ab98cc)) + +## 0.3.0 (2024-10-10) + +### Features + +- **utilities:** Update the base Nx configuration + ([99988e0](https://github.com/storm-software/storm-stack/commit/99988e0)) + +### Bug Fixes + +- **monorepo:** Update the Nx configuration to include release process + specifications + ([df311f7](https://github.com/storm-software/storm-stack/commit/df311f7)) + +## 0.2.4 (2024-10-10) + +### Bug Fixes + +- **monorepo:** Regenerate the README file formatting + ([b81153c](https://github.com/storm-software/storm-stack/commit/b81153c)) + +## 0.2.3 (2024-10-09) + +### Bug Fixes + +- **utilities:** Reformatting the README files + ([723d68b](https://github.com/storm-software/storm-stack/commit/723d68b)) + +## 0.2.2 (2024-10-08) + +### Bug Fixes + +- **types:** Regenerate the monorepo markdown files + ([2b5818e](https://github.com/storm-software/storm-stack/commit/2b5818e)) + +## 0.2.1 (2024-10-08) + +### Bug Fixes + +- **monorepo:** Resolve issue with markdown across entire monorepo + ([ee6720c](https://github.com/storm-software/storm-stack/commit/ee6720c)) + +## 0.1.0 (2024-02-10) + +### 🚀 Features + +- **server-cache:** Added base package to support various types of caching on + the server + ([8be6e04](https://github.com/storm-software/storm-stack/commit/8be6e04)) + +- **server-cache:** Added the caching access/modify methods + ([36d8540](https://github.com/storm-software/storm-stack/commit/36d8540)) + +### ❤️ Thank You + +- Patrick Sullivan diff --git a/packages/server-cache/README.md b/packages/base/server-cache/README.md similarity index 97% rename from packages/server-cache/README.md rename to packages/base/server-cache/README.md index d7e052a2..c260ac8d 100644 --- a/packages/server-cache/README.md +++ b/packages/base/server-cache/README.md @@ -39,13 +39,14 @@ This package is part of the ⚡Storm Stack monorepo. Storm Stack packages -# server-cache +# base-server-cache A Storm-Stack patch to handle server-side caching with the [bentocache](https://bentocache.dev/docs/introduction) library. + ## Table of Contents - [Installing](#installing) @@ -71,14 +72,14 @@ A Storm-Stack patch to handle server-side caching with the Using [pnpm](http://pnpm.io): ```bash -pnpm add -D @storm-stack/server-cache +pnpm add -D @storm-stack/base-server-cache ```
Using npm ```bash -npm install -D @storm-stack/server-cache +npm install -D @storm-stack/base-server-cache ```
@@ -87,7 +88,7 @@ npm install -D @storm-stack/server-cache Using yarn ```bash -yarn add -D @storm-stack/server-cache +yarn add -D @storm-stack/base-server-cache ``` @@ -106,16 +107,17 @@ commands are available to assist in development. ### Building -Run `nx build server-cache` to build the library. +Run `nx build base-server-cache` to build the library. ### Running unit tests -Run `nx test server-cache` to execute the unit tests via +Run `nx test base-server-cache` to execute the unit tests via [Jest](https://jestjs.io). ### Linting -Run `nx lint server-cache` to run [ESLint](https://eslint.org/) on the package. +Run `nx lint base-server-cache` to run [ESLint](https://eslint.org/) on the +package. diff --git a/packages/base/server-cache/jest.config.ts b/packages/base/server-cache/jest.config.ts new file mode 100644 index 00000000..0782299a --- /dev/null +++ b/packages/base/server-cache/jest.config.ts @@ -0,0 +1,7 @@ +import { getJestConfig } from "@storm-software/testing-tools"; + +export default getJestConfig( + "packages/server-cache", + true, + "base-server-cache" +); diff --git a/packages/server-cache/package.json b/packages/base/server-cache/package.json similarity index 100% rename from packages/server-cache/package.json rename to packages/base/server-cache/package.json diff --git a/packages/server-cache/project.json b/packages/base/server-cache/project.json similarity index 63% rename from packages/server-cache/project.json rename to packages/base/server-cache/project.json index 70cd58d5..4e6a1cc1 100644 --- a/packages/server-cache/project.json +++ b/packages/base/server-cache/project.json @@ -1,8 +1,8 @@ { - "name": "server-cache", - "$schema": "../../node_modules/nx/schemas/project-schema.json", + "name": "base-server-cache", + "$schema": "../../../node_modules/nx/schemas/project-schema.json", "projectType": "library", - "sourceRoot": "packages/server-cache/src", + "sourceRoot": "packages/base/server-cache/src", "targets": { "build": { "cache": true, @@ -13,10 +13,10 @@ "clean": true, "platform": "node", "options": { - "type": "packages/server-cache/src/index.ts", - "outputPath": "dist/packages/server-cache", - "tsConfig": "packages/server-cache/tsconfig.json", - "project": "packages/server-cache/package.json" + "type": "packages/base/server-cache/src/index.ts", + "outputPath": "dist/packages/base/server-cache", + "tsConfig": "packages/base/server-cache/tsconfig.json", + "project": "packages/base/server-cache/package.json" }, "configurations": { "production": { diff --git a/packages/server-cache/src/index.ts b/packages/base/server-cache/src/index.ts similarity index 100% rename from packages/server-cache/src/index.ts rename to packages/base/server-cache/src/index.ts diff --git a/packages/server-cache/src/notification-bus/index.ts b/packages/base/server-cache/src/notification-bus/index.ts similarity index 100% rename from packages/server-cache/src/notification-bus/index.ts rename to packages/base/server-cache/src/notification-bus/index.ts diff --git a/packages/server-cache/src/notification-bus/notification-bus-driver.ts b/packages/base/server-cache/src/notification-bus/notification-bus-driver.ts similarity index 100% rename from packages/server-cache/src/notification-bus/notification-bus-driver.ts rename to packages/base/server-cache/src/notification-bus/notification-bus-driver.ts diff --git a/packages/server-cache/src/notification-bus/notification-bus.ts b/packages/base/server-cache/src/notification-bus/notification-bus.ts similarity index 100% rename from packages/server-cache/src/notification-bus/notification-bus.ts rename to packages/base/server-cache/src/notification-bus/notification-bus.ts diff --git a/packages/server-cache/src/storm-cache.ts b/packages/base/server-cache/src/storm-cache.ts similarity index 100% rename from packages/server-cache/src/storm-cache.ts rename to packages/base/server-cache/src/storm-cache.ts diff --git a/packages/hashing/tsconfig.json b/packages/base/server-cache/tsconfig.json similarity index 66% rename from packages/hashing/tsconfig.json rename to packages/base/server-cache/tsconfig.json index 60c8d2ec..91ab82fc 100644 --- a/packages/hashing/tsconfig.json +++ b/packages/base/server-cache/tsconfig.json @@ -1,7 +1,7 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { - "outDir": "../../dist/out-tsc" + "outDir": "../../../dist/out-tsc" }, "include": ["src/**/*.ts", "src/**/*.js", "bin/**/*"], "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"] diff --git a/packages/base/server-cache/tsconfig.spec.json b/packages/base/server-cache/tsconfig.spec.json new file mode 100644 index 00000000..f8bfbb68 --- /dev/null +++ b/packages/base/server-cache/tsconfig.spec.json @@ -0,0 +1,13 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../dist/out-tsc", + "types": ["jest", "node"] + }, + "include": [ + "jest.config.ts", + "src/**/*.test.ts", + "src/**/*.spec.ts", + "src/**/*.d.ts" + ] +} diff --git a/packages/base/server-result/CHANGELOG.md b/packages/base/server-result/CHANGELOG.md new file mode 100644 index 00000000..ac58251f --- /dev/null +++ b/packages/base/server-result/CHANGELOG.md @@ -0,0 +1,229 @@ +## 0.18.0 (2024-12-18) + +### Features + +- **logging:** Update the `initialize` method signature in the `StormLog` class + ([7b11262](https://github.com/storm-software/storm-stack/commit/7b11262)) + +## 0.17.0 (2024-11-10) + +### Features + +- **date-time:** Resolve issue parsing ISO string in `StormDateTime` constructor + ([c8032d6](https://github.com/storm-software/storm-stack/commit/c8032d6)) + +## 0.16.0 (2024-11-10) + +### Features + +- **cli:** Added the `execute` and `install` utility functions + ([8b04259](https://github.com/storm-software/storm-stack/commit/8b04259)) + +## 0.15.0 (2024-11-08) + +### Features + +- **types:** Regenerate packages with upgraded ops packages + ([936026a](https://github.com/storm-software/storm-stack/commit/936026a)) + +## 0.14.0 (2024-11-07) + +### Features + +- **date-time:** Added the `getMonthIndex` helper function + ([8d979d2](https://github.com/storm-software/storm-stack/commit/8d979d2)) + +## 0.13.2 (2024-10-27) + +### Bug Fixes + +- **date-time:** Update static function to no longer be constants + ([f366ffe](https://github.com/storm-software/storm-stack/commit/f366ffe)) + +## 0.13.1 (2024-10-26) + +### Bug Fixes + +- **hooks:** Resolve issue updating element reference in `useHook` hook + ([340e2f4](https://github.com/storm-software/storm-stack/commit/340e2f4)) + +## 0.13.0 (2024-10-26) + +### Features + +- **types:** Added the `isFileResult` type-checker and updated `status` field + ([2fc6410](https://github.com/storm-software/storm-stack/commit/2fc6410)) + +## 0.12.2 (2024-10-24) + +### Bug Fixes + +- **date-time:** Update the conditionals in validate functions + ([f5f4e26](https://github.com/storm-software/storm-stack/commit/f5f4e26)) + +## 0.12.1 (2024-10-24) + +### Bug Fixes + +- **date-time:** Resolve issue with the date-time format functions + ([f385b23](https://github.com/storm-software/storm-stack/commit/f385b23)) + +## 0.12.0 (2024-10-24) + +### Features + +- **hooks:** Added the `composeRefs` function and hook + ([80a1379](https://github.com/storm-software/storm-stack/commit/80a1379)) + +## 0.11.0 (2024-10-22) + +### Features + +- **monorepo:** Use latest storm build tools in monorepo + ([6bf00c5](https://github.com/storm-software/storm-stack/commit/6bf00c5)) + +## 0.10.2 (2024-10-20) + +### Bug Fixes + +- **date-time:** Resolve issue with parsing ISO-8601 string + ([a63273e](https://github.com/storm-software/storm-stack/commit/a63273e)) + +## 0.10.1 (2024-10-20) + +### Bug Fixes + +- **date-time:** Resolved issue with creating date-time in validation function + ([2a3c1e8](https://github.com/storm-software/storm-stack/commit/2a3c1e8)) + +## 0.10.0 (2024-10-18) + +### Features + +- **date-time:** Provide time zone to the formatting function + ([318ab55](https://github.com/storm-software/storm-stack/commit/318ab55)) + +## 0.9.0 (2024-10-18) + +### Features + +- **date-time:** Added new flags to formatting options for helper functions + ([b702d6c](https://github.com/storm-software/storm-stack/commit/b702d6c)) + +### Bug Fixes + +- **serialization:** Resolved stack overflow issue with `StormParser` class + ([f890df9](https://github.com/storm-software/storm-stack/commit/f890df9)) + +## 0.8.0 (2024-10-15) + +### Features + +- **types:** Added the `index` and `status` properties to the `SelectOption` + type ([7da9603](https://github.com/storm-software/storm-stack/commit/7da9603)) + +## 0.7.0 (2024-10-14) + +### Features + +- **types:** Added the `description` property to the `SelectOption` type + ([94c33d2](https://github.com/storm-software/storm-stack/commit/94c33d2)) + +## 0.6.0 (2024-10-11) + +### Features + +- **types:** Added the `help` and `success` ValidationDetail message types + ([207bf67](https://github.com/storm-software/storm-stack/commit/207bf67)) + +## 0.5.0 (2024-10-10) + +### Features + +- **utilities:** Added the `toPath` and `toDeepKey` functions + ([1977f13](https://github.com/storm-software/storm-stack/commit/1977f13)) + +## 0.4.2 (2024-10-10) + +### Bug Fixes + +- **monorepo:** Regenerate markup after token update + ([a37ef2a](https://github.com/storm-software/storm-stack/commit/a37ef2a)) + +## 0.4.1 (2024-10-10) + +### Bug Fixes + +- **types:** Added missing tags and regenerated markdown + ([7ab98cc](https://github.com/storm-software/storm-stack/commit/7ab98cc)) + +## 0.4.0 (2024-10-10) + +### Features + +- **utilities:** Update the base Nx configuration + ([99988e0](https://github.com/storm-software/storm-stack/commit/99988e0)) + +### Bug Fixes + +- **monorepo:** Update the Nx configuration to include release process + specifications + ([df311f7](https://github.com/storm-software/storm-stack/commit/df311f7)) + +## 0.3.4 (2024-10-10) + +### Bug Fixes + +- **monorepo:** Regenerate the README file formatting + ([b81153c](https://github.com/storm-software/storm-stack/commit/b81153c)) + +## 0.3.3 (2024-10-09) + +### Bug Fixes + +- **utilities:** Reformatting the README files + ([723d68b](https://github.com/storm-software/storm-stack/commit/723d68b)) + +## 0.3.2 (2024-10-08) + +### Bug Fixes + +- **types:** Regenerate the monorepo markdown files + ([2b5818e](https://github.com/storm-software/storm-stack/commit/2b5818e)) + +## 0.3.1 (2024-10-08) + +### Bug Fixes + +- **monorepo:** Resolve issue with markdown across entire monorepo + ([ee6720c](https://github.com/storm-software/storm-stack/commit/ee6720c)) + +## 0.3.0 (2024-10-08) + +### Features + +- **utilities:** Added the flatten and unflatten utility functions and helper + types + ([702d44d](https://github.com/storm-software/storm-stack/commit/702d44d)) + +- **errors:** Added the `ErrorType` concept to separate error data behavior + ([cfffb39](https://github.com/storm-software/storm-stack/commit/cfffb39)) + +## 0.2.1 (2024-09-15) + +### Bug Fixes + +- **monorepo:** Resolve issues in git hook configurations + ([f925f93](https://github.com/storm-software/storm-stack/commit/f925f93)) + +## 0.2.0 (2024-09-13) + +### Features + +- **telemetry:** Added sentry telemetry functionality + ([a29cc50](https://github.com/storm-software/storm-stack/commit/a29cc50)) + +### Continuous Integration + +- **monorepo:** Added updated action parameter names + ([e82025a](https://github.com/storm-software/storm-stack/commit/e82025a)) diff --git a/packages/server-result/README.md b/packages/base/server-result/README.md similarity index 97% rename from packages/server-result/README.md rename to packages/base/server-result/README.md index ef98b36c..e6916564 100644 --- a/packages/server-result/README.md +++ b/packages/base/server-result/README.md @@ -39,12 +39,13 @@ This package is part of the ⚡Storm Stack monorepo. Storm Stack packages -# server-result +# base-server-result A package containing the ServerResult definition + ## Table of Contents - [Installing](#installing) @@ -70,14 +71,14 @@ A package containing the ServerResult definition Using [pnpm](http://pnpm.io): ```bash -pnpm add -D @storm-stack/server-result +pnpm add -D @storm-stack/base-server-result ```
Using npm ```bash -npm install -D @storm-stack/server-result +npm install -D @storm-stack/base-server-result ```
@@ -86,7 +87,7 @@ npm install -D @storm-stack/server-result Using yarn ```bash -yarn add -D @storm-stack/server-result +yarn add -D @storm-stack/base-server-result ``` @@ -105,16 +106,17 @@ commands are available to assist in development. ### Building -Run `nx build server-result` to build the library. +Run `nx build base-server-result` to build the library. ### Running unit tests -Run `nx test server-result` to execute the unit tests via +Run `nx test base-server-result` to execute the unit tests via [Jest](https://jestjs.io). ### Linting -Run `nx lint server-result` to run [ESLint](https://eslint.org/) on the package. +Run `nx lint base-server-result` to run [ESLint](https://eslint.org/) on the +package. diff --git a/packages/base/server-result/jest.config.ts b/packages/base/server-result/jest.config.ts new file mode 100644 index 00000000..c624ca22 --- /dev/null +++ b/packages/base/server-result/jest.config.ts @@ -0,0 +1,7 @@ +import { getJestConfig } from "@storm-software/testing-tools"; + +export default getJestConfig( + "packages/server-result", + true, + "base-server-result" +); diff --git a/packages/server-result/package.json b/packages/base/server-result/package.json similarity index 100% rename from packages/server-result/package.json rename to packages/base/server-result/package.json diff --git a/packages/base/server-result/project.json b/packages/base/server-result/project.json new file mode 100644 index 00000000..1f19239b --- /dev/null +++ b/packages/base/server-result/project.json @@ -0,0 +1,35 @@ +{ + "name": "base-server-result", + "$schema": "../../../node_modules/nx/schemas/project-schema.json", + "projectType": "library", + "sourceRoot": "packages/base/server-result/src", + "targets": { + "build": { + "cache": true, + "executor": "@storm-software/workspace-tools:unbuild", + "inputs": ["typescript", "^production"], + "outputs": ["{options.outputPath}"], + "defaultConfiguration": "production", + "clean": true, + "options": { + "type": "packages/base/server-result/src/index.ts", + "outputPath": "dist/packages/base/server-result", + "tsConfig": "packages/base/server-result/tsconfig.json", + "project": "packages/base/server-result/package.json" + }, + "configurations": { + "production": { + "sourceMap": false, + "verbose": false + }, + "development": { + "sourceMap": true, + "verbose": true + } + } + }, + "nx-release-publish": { + "executor": "@storm-software/workspace-tools:npm-publish" + } + } +} diff --git a/packages/server-result/src/index.ts b/packages/base/server-result/src/index.ts similarity index 100% rename from packages/server-result/src/index.ts rename to packages/base/server-result/src/index.ts diff --git a/packages/server-result/src/server-result.ts b/packages/base/server-result/src/server-result.ts similarity index 100% rename from packages/server-result/src/server-result.ts rename to packages/base/server-result/src/server-result.ts diff --git a/packages/server-result/src/types.ts b/packages/base/server-result/src/types.ts similarity index 100% rename from packages/server-result/src/types.ts rename to packages/base/server-result/src/types.ts diff --git a/packages/server-result/src/utilities/create-server-result.ts b/packages/base/server-result/src/utilities/create-server-result.ts similarity index 100% rename from packages/server-result/src/utilities/create-server-result.ts rename to packages/base/server-result/src/utilities/create-server-result.ts diff --git a/packages/server-result/src/utilities/index.ts b/packages/base/server-result/src/utilities/index.ts similarity index 100% rename from packages/server-result/src/utilities/index.ts rename to packages/base/server-result/src/utilities/index.ts diff --git a/packages/string-fns/tsconfig.json b/packages/base/server-result/tsconfig.json similarity index 66% rename from packages/string-fns/tsconfig.json rename to packages/base/server-result/tsconfig.json index 60c8d2ec..91ab82fc 100644 --- a/packages/string-fns/tsconfig.json +++ b/packages/base/server-result/tsconfig.json @@ -1,7 +1,7 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { - "outDir": "../../dist/out-tsc" + "outDir": "../../../dist/out-tsc" }, "include": ["src/**/*.ts", "src/**/*.js", "bin/**/*"], "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"] diff --git a/packages/base/server-result/tsconfig.spec.json b/packages/base/server-result/tsconfig.spec.json new file mode 100644 index 00000000..f8bfbb68 --- /dev/null +++ b/packages/base/server-result/tsconfig.spec.json @@ -0,0 +1,13 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../dist/out-tsc", + "types": ["jest", "node"] + }, + "include": [ + "jest.config.ts", + "src/**/*.test.ts", + "src/**/*.spec.ts", + "src/**/*.d.ts" + ] +} diff --git a/packages/telemetry/CHANGELOG.md b/packages/base/telemetry/CHANGELOG.md similarity index 68% rename from packages/telemetry/CHANGELOG.md rename to packages/base/telemetry/CHANGELOG.md index f7e9bcda..31baa7f2 100644 --- a/packages/telemetry/CHANGELOG.md +++ b/packages/base/telemetry/CHANGELOG.md @@ -2,218 +2,227 @@ ### Features -- **env:** Initial check-in for the `@storm-stack/env` package ([5a367cd](https://github.com/storm-software/storm-stack/commit/5a367cd)) +- **env:** Initial check-in for the `@storm-stack/env` package + ([5a367cd](https://github.com/storm-software/storm-stack/commit/5a367cd)) ## 1.18.0 (2024-12-18) ### Features -- **logging:** Update the `initialize` method signature in the `StormLog` class ([7b11262](https://github.com/storm-software/storm-stack/commit/7b11262)) +- **logging:** Update the `initialize` method signature in the `StormLog` class + ([7b11262](https://github.com/storm-software/storm-stack/commit/7b11262)) ## 1.17.0 (2024-11-10) ### Features -- **date-time:** Resolve issue parsing ISO string in `StormDateTime` constructor ([c8032d6](https://github.com/storm-software/storm-stack/commit/c8032d6)) +- **date-time:** Resolve issue parsing ISO string in `StormDateTime` constructor + ([c8032d6](https://github.com/storm-software/storm-stack/commit/c8032d6)) ## 1.16.0 (2024-11-10) ### Features -- **cli:** Added the `execute` and `install` utility functions ([8b04259](https://github.com/storm-software/storm-stack/commit/8b04259)) +- **cli:** Added the `execute` and `install` utility functions + ([8b04259](https://github.com/storm-software/storm-stack/commit/8b04259)) ## 1.15.0 (2024-11-08) ### Features -- **types:** Regenerate packages with upgraded ops packages ([936026a](https://github.com/storm-software/storm-stack/commit/936026a)) +- **types:** Regenerate packages with upgraded ops packages + ([936026a](https://github.com/storm-software/storm-stack/commit/936026a)) ## 1.14.0 (2024-11-07) - ### Features -- **date-time:** Added the `getMonthIndex` helper function ([8d979d2](https://github.com/storm-software/storm-stack/commit/8d979d2)) +- **date-time:** Added the `getMonthIndex` helper function + ([8d979d2](https://github.com/storm-software/storm-stack/commit/8d979d2)) ## 1.13.2 (2024-10-27) - ### Bug Fixes -- **date-time:** Update static function to no longer be constants ([f366ffe](https://github.com/storm-software/storm-stack/commit/f366ffe)) +- **date-time:** Update static function to no longer be constants + ([f366ffe](https://github.com/storm-software/storm-stack/commit/f366ffe)) ## 1.13.1 (2024-10-26) - ### Bug Fixes -- **hooks:** Resolve issue updating element reference in `useHook` hook ([340e2f4](https://github.com/storm-software/storm-stack/commit/340e2f4)) +- **hooks:** Resolve issue updating element reference in `useHook` hook + ([340e2f4](https://github.com/storm-software/storm-stack/commit/340e2f4)) ## 1.13.0 (2024-10-26) - ### Features -- **types:** Added the `isFileResult` type-checker and updated `status` field ([2fc6410](https://github.com/storm-software/storm-stack/commit/2fc6410)) +- **types:** Added the `isFileResult` type-checker and updated `status` field + ([2fc6410](https://github.com/storm-software/storm-stack/commit/2fc6410)) ## 1.12.2 (2024-10-24) - ### Bug Fixes -- **date-time:** Update the conditionals in validate functions ([f5f4e26](https://github.com/storm-software/storm-stack/commit/f5f4e26)) +- **date-time:** Update the conditionals in validate functions + ([f5f4e26](https://github.com/storm-software/storm-stack/commit/f5f4e26)) ## 1.12.1 (2024-10-24) - ### Bug Fixes -- **date-time:** Resolve issue with the date-time format functions ([f385b23](https://github.com/storm-software/storm-stack/commit/f385b23)) +- **date-time:** Resolve issue with the date-time format functions + ([f385b23](https://github.com/storm-software/storm-stack/commit/f385b23)) ## 1.12.0 (2024-10-24) - ### Features -- **hooks:** Added the `composeRefs` function and hook ([80a1379](https://github.com/storm-software/storm-stack/commit/80a1379)) +- **hooks:** Added the `composeRefs` function and hook + ([80a1379](https://github.com/storm-software/storm-stack/commit/80a1379)) ## 1.11.0 (2024-10-22) - ### Features -- **monorepo:** Use latest storm build tools in monorepo ([6bf00c5](https://github.com/storm-software/storm-stack/commit/6bf00c5)) +- **monorepo:** Use latest storm build tools in monorepo + ([6bf00c5](https://github.com/storm-software/storm-stack/commit/6bf00c5)) ## 1.10.2 (2024-10-20) - ### Bug Fixes -- **date-time:** Resolve issue with parsing ISO-8601 string ([a63273e](https://github.com/storm-software/storm-stack/commit/a63273e)) +- **date-time:** Resolve issue with parsing ISO-8601 string + ([a63273e](https://github.com/storm-software/storm-stack/commit/a63273e)) ## 1.10.1 (2024-10-20) - ### Bug Fixes -- **date-time:** Resolved issue with creating date-time in validation function ([2a3c1e8](https://github.com/storm-software/storm-stack/commit/2a3c1e8)) +- **date-time:** Resolved issue with creating date-time in validation function + ([2a3c1e8](https://github.com/storm-software/storm-stack/commit/2a3c1e8)) ## 1.10.0 (2024-10-18) - ### Features -- **date-time:** Provide time zone to the formatting function ([318ab55](https://github.com/storm-software/storm-stack/commit/318ab55)) +- **date-time:** Provide time zone to the formatting function + ([318ab55](https://github.com/storm-software/storm-stack/commit/318ab55)) ## 1.9.0 (2024-10-18) - ### Features -- **date-time:** Added `returnEmptyIfNotSet` and `returnEmptyIfInvalid` options to `formatDate` ([79cbf52](https://github.com/storm-software/storm-stack/commit/79cbf52)) - -- **date-time:** Added new flags to formatting options for helper functions ([b702d6c](https://github.com/storm-software/storm-stack/commit/b702d6c)) +- **date-time:** Added `returnEmptyIfNotSet` and `returnEmptyIfInvalid` options + to `formatDate` + ([79cbf52](https://github.com/storm-software/storm-stack/commit/79cbf52)) +- **date-time:** Added new flags to formatting options for helper functions + ([b702d6c](https://github.com/storm-software/storm-stack/commit/b702d6c)) ### Bug Fixes -- **serialization:** Resolved stack overflow issue with `StormParser` class ([f890df9](https://github.com/storm-software/storm-stack/commit/f890df9)) +- **serialization:** Resolved stack overflow issue with `StormParser` class + ([f890df9](https://github.com/storm-software/storm-stack/commit/f890df9)) ## 1.8.0 (2024-10-15) - ### Features -- **types:** Added the `index` and `status` properties to the `SelectOption` type ([7da9603](https://github.com/storm-software/storm-stack/commit/7da9603)) +- **types:** Added the `index` and `status` properties to the `SelectOption` + type ([7da9603](https://github.com/storm-software/storm-stack/commit/7da9603)) ## 1.7.0 (2024-10-14) - ### Features -- **types:** Added the `description` property to the `SelectOption` type ([94c33d2](https://github.com/storm-software/storm-stack/commit/94c33d2)) +- **types:** Added the `description` property to the `SelectOption` type + ([94c33d2](https://github.com/storm-software/storm-stack/commit/94c33d2)) ## 1.6.0 (2024-10-11) - ### Features -- **types:** Added the `help` and `success` ValidationDetail message types ([207bf67](https://github.com/storm-software/storm-stack/commit/207bf67)) +- **types:** Added the `help` and `success` ValidationDetail message types + ([207bf67](https://github.com/storm-software/storm-stack/commit/207bf67)) ## 1.5.0 (2024-10-10) - ### Features -- **utilities:** Added the `toPath` and `toDeepKey` functions ([1977f13](https://github.com/storm-software/storm-stack/commit/1977f13)) +- **utilities:** Added the `toPath` and `toDeepKey` functions + ([1977f13](https://github.com/storm-software/storm-stack/commit/1977f13)) ## 1.4.2 (2024-10-10) - ### Bug Fixes -- **monorepo:** Regenerate markup after token update ([a37ef2a](https://github.com/storm-software/storm-stack/commit/a37ef2a)) +- **monorepo:** Regenerate markup after token update + ([a37ef2a](https://github.com/storm-software/storm-stack/commit/a37ef2a)) ## 1.4.1 (2024-10-10) - ### Bug Fixes -- **types:** Added missing tags and regenerated markdown ([7ab98cc](https://github.com/storm-software/storm-stack/commit/7ab98cc)) +- **types:** Added missing tags and regenerated markdown + ([7ab98cc](https://github.com/storm-software/storm-stack/commit/7ab98cc)) ## 1.4.0 (2024-10-10) - ### Features -- **utilities:** Update the base Nx configuration ([99988e0](https://github.com/storm-software/storm-stack/commit/99988e0)) - +- **utilities:** Update the base Nx configuration + ([99988e0](https://github.com/storm-software/storm-stack/commit/99988e0)) ### Bug Fixes -- **monorepo:** Update the Nx configuration to include release process specifications ([df311f7](https://github.com/storm-software/storm-stack/commit/df311f7)) +- **monorepo:** Update the Nx configuration to include release process + specifications + ([df311f7](https://github.com/storm-software/storm-stack/commit/df311f7)) ## 1.3.4 (2024-10-10) - ### Bug Fixes -- **monorepo:** Regenerate the README file formatting ([b81153c](https://github.com/storm-software/storm-stack/commit/b81153c)) +- **monorepo:** Regenerate the README file formatting + ([b81153c](https://github.com/storm-software/storm-stack/commit/b81153c)) ## 1.3.3 (2024-10-09) - ### Bug Fixes -- **utilities:** Reformatting the README files ([723d68b](https://github.com/storm-software/storm-stack/commit/723d68b)) +- **utilities:** Reformatting the README files + ([723d68b](https://github.com/storm-software/storm-stack/commit/723d68b)) ## 1.3.2 (2024-10-08) - ### Bug Fixes -- **types:** Regenerate the monorepo markdown files ([2b5818e](https://github.com/storm-software/storm-stack/commit/2b5818e)) +- **types:** Regenerate the monorepo markdown files + ([2b5818e](https://github.com/storm-software/storm-stack/commit/2b5818e)) ## 1.3.1 (2024-10-08) - ### Bug Fixes -- **monorepo:** Resolve issue with markdown across entire monorepo ([ee6720c](https://github.com/storm-software/storm-stack/commit/ee6720c)) +- **monorepo:** Resolve issue with markdown across entire monorepo + ([ee6720c](https://github.com/storm-software/storm-stack/commit/ee6720c)) ## 1.3.0 (2024-10-08) - ### Features -- **utilities:** Added the flatten and unflatten utility functions and helper types ([702d44d](https://github.com/storm-software/storm-stack/commit/702d44d)) +- **utilities:** Added the flatten and unflatten utility functions and helper + types + ([702d44d](https://github.com/storm-software/storm-stack/commit/702d44d)) ## 1.2.1 (2024-09-15) - ### Bug Fixes -- **monorepo:** Resolve issues in git hook configurations ([f925f93](https://github.com/storm-software/storm-stack/commit/f925f93)) +- **monorepo:** Resolve issues in git hook configurations + ([f925f93](https://github.com/storm-software/storm-stack/commit/f925f93)) ## 1.2.0 (2024-02-10) diff --git a/packages/telemetry/README.md b/packages/base/telemetry/README.md similarity index 97% rename from packages/telemetry/README.md rename to packages/base/telemetry/README.md index 94f4752e..02c9f1b8 100644 --- a/packages/telemetry/README.md +++ b/packages/base/telemetry/README.md @@ -41,11 +41,12 @@ This package is part of the ⚡Storm Stack monorepo. Storm Stack packages # Storm-Stack Telemetry Library -A Storm-Stack library used to drive server logging and handling telemetry +A Storm-Stack library used to drive server logging and handling base-telemetry processing in a NodeJS environment + ## Table of Contents - [Installing](#installing) @@ -71,14 +72,14 @@ processing in a NodeJS environment Using [pnpm](http://pnpm.io): ```bash -pnpm add -D @storm-stack/telemetry +pnpm add -D @storm-stack/base-telemetry ```
Using npm ```bash -npm install -D @storm-stack/telemetry +npm install -D @storm-stack/base-telemetry ```
@@ -87,7 +88,7 @@ npm install -D @storm-stack/telemetry Using yarn ```bash -yarn add -D @storm-stack/telemetry +yarn add -D @storm-stack/base-telemetry ``` @@ -106,15 +107,17 @@ commands are available to assist in development. ### Building -Run `nx build telemetry` to build the library. +Run `nx build base-telemetry` to build the library. ### Running unit tests -Run `nx test telemetry` to execute the unit tests via [Jest](https://jestjs.io). +Run `nx test base-telemetry` to execute the unit tests via +[Jest](https://jestjs.io). ### Linting -Run `nx lint telemetry` to run [ESLint](https://eslint.org/) on the package. +Run `nx lint base-telemetry` to run [ESLint](https://eslint.org/) on the +package. diff --git a/packages/base/telemetry/jest.config.ts b/packages/base/telemetry/jest.config.ts new file mode 100644 index 00000000..3ad8d393 --- /dev/null +++ b/packages/base/telemetry/jest.config.ts @@ -0,0 +1,3 @@ +import { getJestConfig } from "@storm-software/testing-tools"; + +export default getJestConfig("backend/telemetry", true, "base-telemetry"); diff --git a/packages/telemetry/package.json b/packages/base/telemetry/package.json similarity index 100% rename from packages/telemetry/package.json rename to packages/base/telemetry/package.json diff --git a/packages/base/telemetry/project.json b/packages/base/telemetry/project.json new file mode 100644 index 00000000..2d1925b7 --- /dev/null +++ b/packages/base/telemetry/project.json @@ -0,0 +1,35 @@ +{ + "name": "base-telemetry", + "$schema": "../../../node_modules/nx/schemas/project-schema.json", + "projectType": "library", + "sourceRoot": "packages/base/telemetry/src", + "targets": { + "build": { + "cache": true, + "executor": "@storm-software/workspace-tools:unbuild", + "inputs": ["typescript", "^production"], + "outputs": ["{options.outputPath}"], + "defaultConfiguration": "production", + "clean": true, + "options": { + "type": "packages/base/telemetry/src/index.ts", + "outputPath": "dist/packages/base/telemetry", + "tsConfig": "packages/base/telemetry/tsconfig.json", + "project": "packages/base/telemetry/package.json" + }, + "configurations": { + "production": { + "sourceMap": false, + "verbose": false + }, + "development": { + "sourceMap": true, + "verbose": true + } + } + }, + "nx-release-publish": { + "executor": "@storm-software/workspace-tools:npm-publish" + } + } +} diff --git a/packages/telemetry/src/errors.ts b/packages/base/telemetry/src/errors.ts similarity index 100% rename from packages/telemetry/src/errors.ts rename to packages/base/telemetry/src/errors.ts diff --git a/packages/telemetry/src/index.ts b/packages/base/telemetry/src/index.ts similarity index 100% rename from packages/telemetry/src/index.ts rename to packages/base/telemetry/src/index.ts diff --git a/packages/telemetry/src/logging/create-file-stream-logs.ts b/packages/base/telemetry/src/logging/create-file-stream-logs.ts similarity index 100% rename from packages/telemetry/src/logging/create-file-stream-logs.ts rename to packages/base/telemetry/src/logging/create-file-stream-logs.ts diff --git a/packages/telemetry/src/logging/get-pino-logger.ts b/packages/base/telemetry/src/logging/get-pino-logger.ts similarity index 100% rename from packages/telemetry/src/logging/get-pino-logger.ts rename to packages/base/telemetry/src/logging/get-pino-logger.ts diff --git a/packages/telemetry/src/logging/index.ts b/packages/base/telemetry/src/logging/index.ts similarity index 100% rename from packages/telemetry/src/logging/index.ts rename to packages/base/telemetry/src/logging/index.ts diff --git a/packages/telemetry/src/otel/index.ts b/packages/base/telemetry/src/otel/index.ts similarity index 100% rename from packages/telemetry/src/otel/index.ts rename to packages/base/telemetry/src/otel/index.ts diff --git a/packages/telemetry/src/otel/init.ts b/packages/base/telemetry/src/otel/init.ts similarity index 100% rename from packages/telemetry/src/otel/init.ts rename to packages/base/telemetry/src/otel/init.ts diff --git a/packages/telemetry/src/schema.ts b/packages/base/telemetry/src/schema.ts similarity index 100% rename from packages/telemetry/src/schema.ts rename to packages/base/telemetry/src/schema.ts diff --git a/packages/telemetry/src/sentry/index.ts b/packages/base/telemetry/src/sentry/index.ts similarity index 100% rename from packages/telemetry/src/sentry/index.ts rename to packages/base/telemetry/src/sentry/index.ts diff --git a/packages/telemetry/src/sentry/init.ts b/packages/base/telemetry/src/sentry/init.ts similarity index 100% rename from packages/telemetry/src/sentry/init.ts rename to packages/base/telemetry/src/sentry/init.ts diff --git a/packages/telemetry/src/storm-trace.ts b/packages/base/telemetry/src/storm-trace.ts similarity index 100% rename from packages/telemetry/src/storm-trace.ts rename to packages/base/telemetry/src/storm-trace.ts diff --git a/packages/telemetry/src/types.ts b/packages/base/telemetry/src/types.ts similarity index 100% rename from packages/telemetry/src/types.ts rename to packages/base/telemetry/src/types.ts diff --git a/packages/date-time/tsconfig.json b/packages/base/telemetry/tsconfig.json similarity index 68% rename from packages/date-time/tsconfig.json rename to packages/base/telemetry/tsconfig.json index f1f337a7..40928c21 100644 --- a/packages/date-time/tsconfig.json +++ b/packages/base/telemetry/tsconfig.json @@ -1,7 +1,7 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { - "outDir": "../../dist/out-tsc" + "outDir": "../../../dist/out-tsc" }, "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.js", "src/**/*.jsx"], "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"] diff --git a/packages/base/telemetry/tsconfig.spec.json b/packages/base/telemetry/tsconfig.spec.json new file mode 100644 index 00000000..f8bfbb68 --- /dev/null +++ b/packages/base/telemetry/tsconfig.spec.json @@ -0,0 +1,13 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../dist/out-tsc", + "types": ["jest", "node"] + }, + "include": [ + "jest.config.ts", + "src/**/*.test.ts", + "src/**/*.spec.ts", + "src/**/*.d.ts" + ] +} diff --git a/packages/cli/src/utilities/write-banner.ts b/packages/cli/src/utilities/write-banner.ts deleted file mode 100644 index 9b1d4f51..00000000 --- a/packages/cli/src/utilities/write-banner.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { titleCase } from "@storm-stack/string-fns/title-case"; -import chalk from "chalk"; -import { text } from "figlet"; -import { CLITitle } from "../types"; - -export const writeBanner = ( - bannerOpts: CLITitle, - byOpts: CLITitle, - color?: string -) => { - if (bannerOpts?.hide !== true) { - text( - titleCase(bannerOpts?.name ?? "Storm CLI")!, - bannerOpts?.options ?? { - font: bannerOpts?.font ?? "Larry 3D" - }, - (err, data) => { - if (err) { - return; - } - - console.log(chalk.hex(color || "#FFF")(data)); - } - ); - - if (byOpts?.hide !== true) { - text( - `by ${titleCase(byOpts?.name ?? "Storm")}`, - byOpts?.options ?? { font: byOpts?.font ?? "Doom" }, - (err, data) => { - if (err) { - return; - } - console.log(chalk.hex(color || "#adbac7")(data)); - } - ); - } - } -}; diff --git a/packages/env/CHANGELOG.md b/packages/env/CHANGELOG.md deleted file mode 100644 index 559ae3d5..00000000 --- a/packages/env/CHANGELOG.md +++ /dev/null @@ -1,5 +0,0 @@ -## 0.1.0 (2024-12-20) - -### Features - -- **env:** Initial check-in for the `@storm-stack/env` package ([5a367cd](https://github.com/storm-software/storm-stack/commit/5a367cd)) \ No newline at end of file diff --git a/packages/env/jest.config.ts b/packages/env/jest.config.ts deleted file mode 100644 index 9c745d67..00000000 --- a/packages/env/jest.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { getJestConfig } from '@storm-software/testing-tools'; - -export default getJestConfig('packages/env', true, 'env'); diff --git a/packages/file-system/jest.config.ts b/packages/file-system/jest.config.ts deleted file mode 100644 index d7d9af20..00000000 --- a/packages/file-system/jest.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { getJestConfig } from "@storm-software/testing-tools"; - -export default getJestConfig("packages/file-system", true, "file-system"); diff --git a/packages/file-system/src/package-management/package-fns.ts b/packages/file-system/src/package-management/package-fns.ts deleted file mode 100644 index 2c31ea02..00000000 --- a/packages/file-system/src/package-management/package-fns.ts +++ /dev/null @@ -1,137 +0,0 @@ -/*------------------------------------------------------------------- - - ⚡ Storm Software - Storm Stack - - This code was released as part of the Storm Stack project. Storm Stack - is maintained by Storm Software under the Apache-2.0 License, and is - free for commercial and private use. For more information, please visit - our licensing page. - - Website: https://stormsoftware.com - Repository: https://github.com/storm-software/storm-stack - Documentation: https://stormsoftware.com/projects/storm-stack/docs - Contact: https://stormsoftware.com/contact - License: https://stormsoftware.com/projects/storm-stack/license - - -------------------------------------------------------------------*/ - -import { execute } from "@storm-stack/cli"; -import { basename, resolve } from "node:path"; -import { exists } from "../files/exists"; -import { joinPaths } from "../files/join-paths"; - -export type PackageManagers = "npm" | "yarn" | "pnpm" | "bun"; -export const PackageManagers = { - NPM: "npm" as PackageManagers, - YARN: "yarn" as PackageManagers, - PNPM: "pnpm" as PackageManagers, - BUN: "bun" as PackageManagers -}; - -function findUp(names: string[], cwd: string): string | undefined { - let dir = cwd; - - while (true) { - const target = names.find(name => exists(joinPaths(dir, name))); - if (target) return target; - - const up = resolve(dir, ".."); - if (up === dir) return undefined; // it'll fail anyway - dir = up; - } -} - -function getPackageManager(projectPath = "."): PackageManagers { - const lockFile = findUp( - ["yarn.lock", "pnpm-lock.yaml", "package-lock.json", "bun.lockb"], - projectPath - ); - - if (!lockFile) { - // default use pnpm - return "pnpm"; - } - - switch (basename(lockFile)) { - case "yarn.lock": { - return "yarn"; - } - case "pnpm-lock.yaml": { - return "pnpm"; - } - case "bun.lockb": { - return "bun"; - } - default: { - return "npm"; - } - } -} - -export function installPackage( - pkg: string, - dev: boolean, - pkgManager: PackageManagers | undefined = undefined, - tag = "latest", - projectPath = ".", - exactVersion = true -) { - const manager = pkgManager ?? getPackageManager(projectPath); - // eslint-disable-next-line no-console - console.log(`Installing package "${pkg}@${tag}" with ${manager}`); - - switch (manager) { - case "yarn": { - execute( - `yarn --cwd "${projectPath}" add ${exactVersion ? "--exact" : ""} ${pkg}@${tag} ${ - dev ? " --dev" : "" - }` - ); - break; - } - - case "pnpm": { - execute( - `pnpm add -C "${projectPath}" ${exactVersion ? "--save-exact" : ""} ${ - dev ? " --save-dev" : "" - } ${pkg}@${tag}` - ); - break; - } - - case "bun": { - execute( - `bun add ${exactVersion ? "--exact" : ""} ${dev ? " --dev" : ""} ${pkg}@${tag}`, - { - cwd: projectPath - } - ); - break; - } - - default: { - execute( - `npm install --prefix "${projectPath}" ${exactVersion ? "--save-exact" : ""} ${ - dev ? " --save-dev" : "" - } ${pkg}@${tag}` - ); - break; - } - } -} - -export function ensurePackage( - pkg: string, - dev: boolean, - pkgManager: PackageManagers | undefined = undefined, - tag = "latest", - projectPath = ".", - exactVersion = false -) { - const resolvePath = resolve(projectPath); - try { - require.resolve(pkg, { paths: [resolvePath] }); - } catch { - installPackage(pkg, dev, pkgManager, tag, resolvePath, exactVersion); - } -} diff --git a/packages/file-system/tsconfig.spec.json b/packages/file-system/tsconfig.spec.json deleted file mode 100644 index d41aea47..00000000 --- a/packages/file-system/tsconfig.spec.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../dist/out-tsc", - "types": ["jest", "node"] - }, - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.spec.ts", - "src/**/*.d.ts" - ] -} diff --git a/packages/hashing/CHANGELOG.md b/packages/hashing/CHANGELOG.md deleted file mode 100644 index 9bc26b4e..00000000 --- a/packages/hashing/CHANGELOG.md +++ /dev/null @@ -1,188 +0,0 @@ -## 0.15.0 (2024-11-10) - -### Features - -- **date-time:** Resolve issue parsing ISO string in `StormDateTime` constructor ([c8032d6](https://github.com/storm-software/storm-stack/commit/c8032d6)) - -## 0.14.0 (2024-11-10) - -### Features - -- **cli:** Added the `execute` and `install` utility functions ([8b04259](https://github.com/storm-software/storm-stack/commit/8b04259)) - -## 0.13.0 (2024-11-08) - -### Features - -- **types:** Regenerate packages with upgraded ops packages ([936026a](https://github.com/storm-software/storm-stack/commit/936026a)) - -## 0.12.0 (2024-11-07) - - -### Features - -- **date-time:** Added the `getMonthIndex` helper function ([8d979d2](https://github.com/storm-software/storm-stack/commit/8d979d2)) - -## 0.11.2 (2024-10-27) - - -### Bug Fixes - -- **date-time:** Update static function to no longer be constants ([f366ffe](https://github.com/storm-software/storm-stack/commit/f366ffe)) - -## 0.11.1 (2024-10-26) - - -### Bug Fixes - -- **hooks:** Resolve issue updating element reference in `useHook` hook ([340e2f4](https://github.com/storm-software/storm-stack/commit/340e2f4)) - -## 0.11.0 (2024-10-26) - - -### Features - -- **types:** Added the `isFileResult` type-checker and updated `status` field ([2fc6410](https://github.com/storm-software/storm-stack/commit/2fc6410)) - -## 0.10.2 (2024-10-24) - - -### Bug Fixes - -- **date-time:** Update the conditionals in validate functions ([f5f4e26](https://github.com/storm-software/storm-stack/commit/f5f4e26)) - -## 0.10.1 (2024-10-24) - - -### Bug Fixes - -- **date-time:** Resolve issue with the date-time format functions ([f385b23](https://github.com/storm-software/storm-stack/commit/f385b23)) - -## 0.10.0 (2024-10-24) - - -### Features - -- **hooks:** Added the `composeRefs` function and hook ([80a1379](https://github.com/storm-software/storm-stack/commit/80a1379)) - -## 0.9.0 (2024-10-22) - - -### Features - -- **monorepo:** Use latest storm build tools in monorepo ([6bf00c5](https://github.com/storm-software/storm-stack/commit/6bf00c5)) - -## 0.8.2 (2024-10-20) - - -### Bug Fixes - -- **date-time:** Resolve issue with parsing ISO-8601 string ([a63273e](https://github.com/storm-software/storm-stack/commit/a63273e)) - -## 0.8.1 (2024-10-20) - - -### Bug Fixes - -- **date-time:** Resolved issue with creating date-time in validation function ([2a3c1e8](https://github.com/storm-software/storm-stack/commit/2a3c1e8)) - -## 0.8.0 (2024-10-18) - - -### Features - -- **date-time:** Provide time zone to the formatting function ([318ab55](https://github.com/storm-software/storm-stack/commit/318ab55)) - -## 0.7.0 (2024-10-18) - - -### Features - -- **date-time:** Added new flags to formatting options for helper functions ([b702d6c](https://github.com/storm-software/storm-stack/commit/b702d6c)) - - -### Bug Fixes - -- **serialization:** Resolved stack overflow issue with `StormParser` class ([f890df9](https://github.com/storm-software/storm-stack/commit/f890df9)) - -## 0.6.0 (2024-10-15) - - -### Features - -- **types:** Added the `index` and `status` properties to the `SelectOption` type ([7da9603](https://github.com/storm-software/storm-stack/commit/7da9603)) - -## 0.5.0 (2024-10-14) - - -### Features - -- **types:** Added the `description` property to the `SelectOption` type ([94c33d2](https://github.com/storm-software/storm-stack/commit/94c33d2)) - -## 0.4.0 (2024-10-11) - - -### Features - -- **types:** Added the `help` and `success` ValidationDetail message types ([207bf67](https://github.com/storm-software/storm-stack/commit/207bf67)) - -## 0.3.0 (2024-10-10) - - -### Features - -- **utilities:** Added the `toPath` and `toDeepKey` functions ([1977f13](https://github.com/storm-software/storm-stack/commit/1977f13)) - -## 0.2.2 (2024-10-10) - - -### Bug Fixes - -- **monorepo:** Regenerate markup after token update ([a37ef2a](https://github.com/storm-software/storm-stack/commit/a37ef2a)) - -## 0.2.1 (2024-10-10) - - -### Bug Fixes - -- **types:** Added missing tags and regenerated markdown ([7ab98cc](https://github.com/storm-software/storm-stack/commit/7ab98cc)) - -## 0.2.0 (2024-10-10) - - -### Features - -- **utilities:** Update the base Nx configuration ([99988e0](https://github.com/storm-software/storm-stack/commit/99988e0)) - - -### Bug Fixes - -- **monorepo:** Update the Nx configuration to include release process specifications ([df311f7](https://github.com/storm-software/storm-stack/commit/df311f7)) - -## 0.1.4 (2024-10-10) - - -### Bug Fixes - -- **monorepo:** Regenerate the README file formatting ([b81153c](https://github.com/storm-software/storm-stack/commit/b81153c)) - -## 0.1.3 (2024-10-09) - - -### Bug Fixes - -- **utilities:** Reformatting the README files ([723d68b](https://github.com/storm-software/storm-stack/commit/723d68b)) - -## 0.1.2 (2024-10-08) - - -### Bug Fixes - -- **types:** Regenerate the monorepo markdown files ([2b5818e](https://github.com/storm-software/storm-stack/commit/2b5818e)) - -## 0.1.1 (2024-10-08) - - -### Bug Fixes - -- **monorepo:** Resolve issue with markdown across entire monorepo ([ee6720c](https://github.com/storm-software/storm-stack/commit/ee6720c)) \ No newline at end of file diff --git a/packages/hashing/jest.config.ts b/packages/hashing/jest.config.ts deleted file mode 100644 index 23b558c8..00000000 --- a/packages/hashing/jest.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { getJestConfig } from "@storm-software/testing-tools"; - -export default getJestConfig("packages/hashing", true, "hashing"); diff --git a/packages/hashing/project.json b/packages/hashing/project.json deleted file mode 100644 index 9cc4cbd7..00000000 --- a/packages/hashing/project.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "hashing", - "$schema": "../../node_modules/nx/schemas/project-schema.json", - "projectType": "library", - "sourceRoot": "packages/hashing/src", - "targets": { - "build": { - "cache": true, - "executor": "@storm-software/workspace-tools:unbuild", - "inputs": ["typescript", "^production"], - "outputs": ["{options.outputPath}"], - "defaultConfiguration": "production", - "clean": true, - "options": { - "type": "packages/hashing/src/index.ts", - "outputPath": "dist/packages/hashing", - "tsConfig": "packages/hashing/tsconfig.json", - "project": "packages/hashing/package.json" - }, - "configurations": { - "production": { - "sourceMap": false, - "verbose": false - }, - "development": { - "sourceMap": true, - "verbose": true - } - } - }, - "nx-release-publish": { - "executor": "@storm-software/workspace-tools:npm-publish" - } - } -} diff --git a/packages/hashing/tsconfig.spec.json b/packages/hashing/tsconfig.spec.json deleted file mode 100644 index d41aea47..00000000 --- a/packages/hashing/tsconfig.spec.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../dist/out-tsc", - "types": ["jest", "node"] - }, - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.spec.ts", - "src/**/*.d.ts" - ] -} diff --git a/packages/hooks/CHANGELOG.md b/packages/hooks/CHANGELOG.md deleted file mode 100644 index b048656b..00000000 --- a/packages/hooks/CHANGELOG.md +++ /dev/null @@ -1,297 +0,0 @@ -## 0.25.1 (2024-12-04) - -### Bug Fixes - -- **monorepo:** Resolved issue with missing env values in CI workflow action ([d0c6d6b](https://github.com/storm-software/storm-stack/commit/d0c6d6b)) - -## 0.25.0 (2024-12-04) - -### Features - -- **cli:** Update CLI program function name ([9a8dc91](https://github.com/storm-software/storm-stack/commit/9a8dc91)) - -## 0.24.2 (2024-12-04) - -### Bug Fixes - -- **monorepo:** Resolve issue with external workflow execution ([8c13959](https://github.com/storm-software/storm-stack/commit/8c13959)) - -## 0.24.1 (2024-12-04) - -### Bug Fixes - -- **hooks:** Ensure a consistent typing in `useComposeRefs` hook ([3537a18](https://github.com/storm-software/storm-stack/commit/3537a18)) - -## 0.24.0 (2024-12-03) - -### Features - -- **hooks:** Added the `useMemoStable` and `useCallbackStable` hooks ([4629ec3](https://github.com/storm-software/storm-stack/commit/4629ec3)) - -## 0.23.0 (2024-12-02) - -### Features - -- **monorepo:** Upgrade workflow actions to use the new base processes ([14d2f2f](https://github.com/storm-software/storm-stack/commit/14d2f2f)) - -## 0.22.0 (2024-11-10) - -### Features - -- **date-time:** Resolve issue parsing ISO string in `StormDateTime` constructor ([c8032d6](https://github.com/storm-software/storm-stack/commit/c8032d6)) - -## 0.21.0 (2024-11-10) - -### Features - -- **cli:** Added `@antfu/install-pkg` to improve install ([26cf962](https://github.com/storm-software/storm-stack/commit/26cf962)) - -## 0.20.0 (2024-11-10) - -### Features - -- **cli:** Added the `execute` and `install` utility functions ([8b04259](https://github.com/storm-software/storm-stack/commit/8b04259)) - -## 0.19.0 (2024-11-08) - -### Features - -- **monorepo:** Upgrade the workspace's Nx package versions ([075a024](https://github.com/storm-software/storm-stack/commit/075a024)) - -## 0.18.0 (2024-11-08) - -### Features - -- **types:** Regenerate packages with upgraded ops packages ([936026a](https://github.com/storm-software/storm-stack/commit/936026a)) - -## 0.17.0 (2024-11-08) - - -### Features - -- **errors:** Added the `createFromData` helper function ([c15576d](https://github.com/storm-software/storm-stack/commit/c15576d)) - -## 0.16.0 (2024-11-07) - - -### Features - -- **date-time:** Added the `getMonthIndex` helper function ([8d979d2](https://github.com/storm-software/storm-stack/commit/8d979d2)) - -## 0.15.2 (2024-10-31) - - -### Bug Fixes - -- **date-time:** Resolve issue with incorrectly exporting classes ([140d576](https://github.com/storm-software/storm-stack/commit/140d576)) - -## 0.15.1 (2024-10-27) - - -### Bug Fixes - -- **date-time:** Update static function to no longer be constants ([f366ffe](https://github.com/storm-software/storm-stack/commit/f366ffe)) - -## 0.15.0 (2024-10-27) - - -### Features - -- **date-time:** Added separate create helper functions for date-time classes ([569673f](https://github.com/storm-software/storm-stack/commit/569673f)) - -## 0.14.1 (2024-10-26) - - -### Bug Fixes - -- **hooks:** Resolve issue updating element reference in `useHook` hook ([340e2f4](https://github.com/storm-software/storm-stack/commit/340e2f4)) - -## 0.14.0 (2024-10-26) - - -### Features - -- **hooks:** Added the `useHover`, `useIdle`, and `useNetworkState` hooks ([b52aa2f](https://github.com/storm-software/storm-stack/commit/b52aa2f)) - -## 0.13.0 (2024-10-26) - - -### Features - -- **types:** Added the `isFileResult` type-checker and updated `status` field ([2fc6410](https://github.com/storm-software/storm-stack/commit/2fc6410)) - -## 0.12.0 (2024-10-26) - - -### Features - -- **types:** Added the `FileResult` shared type definition ([f9d07c6](https://github.com/storm-software/storm-stack/commit/f9d07c6)) - -## 0.11.3 (2024-10-24) - - -### Bug Fixes - -- **date-time:** Update the conditionals in validate functions ([f5f4e26](https://github.com/storm-software/storm-stack/commit/f5f4e26)) - -## 0.11.2 (2024-10-24) - - -### Bug Fixes - -- **date-time:** Resolve issue with null date-time validations ([3eaf348](https://github.com/storm-software/storm-stack/commit/3eaf348)) - -## 0.11.1 (2024-10-24) - - -### Bug Fixes - -- **date-time:** Resolve issue with the date-time format functions ([f385b23](https://github.com/storm-software/storm-stack/commit/f385b23)) - -## 0.11.0 (2024-10-24) - - -### Features - -- **hooks:** Added `useBattery`, `useClickAway`, and `useCopyToClipboard` hooks ([556db4d](https://github.com/storm-software/storm-stack/commit/556db4d)) - -## 0.10.0 (2024-10-24) - - -### Features - -- **hooks:** Added the `composeRefs` function and hook ([80a1379](https://github.com/storm-software/storm-stack/commit/80a1379)) - -## 0.9.0 (2024-10-22) - - -### Features - -- **monorepo:** Use latest storm build tools in monorepo ([6bf00c5](https://github.com/storm-software/storm-stack/commit/6bf00c5)) - -## 0.8.2 (2024-10-20) - - -### Bug Fixes - -- **date-time:** Resolve issue with parsing ISO-8601 string ([a63273e](https://github.com/storm-software/storm-stack/commit/a63273e)) - -## 0.8.1 (2024-10-20) - - -### Bug Fixes - -- **date-time:** Resolved issue with creating date-time in validation function ([2a3c1e8](https://github.com/storm-software/storm-stack/commit/2a3c1e8)) - -## 0.8.0 (2024-10-18) - - -### Features - -- **date-time:** Provide time zone to the formatting function ([318ab55](https://github.com/storm-software/storm-stack/commit/318ab55)) - -## 0.7.0 (2024-10-18) - - -### Features - -- **date-time:** Added new flags to formatting options for helper functions ([b702d6c](https://github.com/storm-software/storm-stack/commit/b702d6c)) - - -### Bug Fixes - -- **serialization:** Resolved stack overflow issue with `StormParser` class ([f890df9](https://github.com/storm-software/storm-stack/commit/f890df9)) - -## 0.6.0 (2024-10-15) - - -### Features - -- **types:** Added the `index` and `status` properties to the `SelectOption` type ([7da9603](https://github.com/storm-software/storm-stack/commit/7da9603)) - -## 0.5.0 (2024-10-14) - - -### Features - -- **types:** Added the `description` property to the `SelectOption` type ([94c33d2](https://github.com/storm-software/storm-stack/commit/94c33d2)) - -## 0.4.0 (2024-10-11) - - -### Features - -- **types:** Added the `help` and `success` ValidationDetail message types ([207bf67](https://github.com/storm-software/storm-stack/commit/207bf67)) - -## 0.3.0 (2024-10-10) - - -### Features - -- **utilities:** Added the `toPath` and `toDeepKey` functions ([1977f13](https://github.com/storm-software/storm-stack/commit/1977f13)) - -## 0.2.2 (2024-10-10) - - -### Bug Fixes - -- **monorepo:** Regenerate markup after token update ([a37ef2a](https://github.com/storm-software/storm-stack/commit/a37ef2a)) - -## 0.2.1 (2024-10-10) - - -### Bug Fixes - -- **types:** Added missing tags and regenerated markdown ([7ab98cc](https://github.com/storm-software/storm-stack/commit/7ab98cc)) - -## 0.2.0 (2024-10-10) - - -### Features - -- **utilities:** Update the base Nx configuration ([99988e0](https://github.com/storm-software/storm-stack/commit/99988e0)) - - -### Bug Fixes - -- **monorepo:** Update the Nx configuration to include release process specifications ([df311f7](https://github.com/storm-software/storm-stack/commit/df311f7)) - -## 0.1.4 (2024-10-10) - - -### Bug Fixes - -- **monorepo:** Regenerate the README file formatting ([b81153c](https://github.com/storm-software/storm-stack/commit/b81153c)) - -## 0.1.3 (2024-10-09) - - -### Bug Fixes - -- **utilities:** Reformatting the README files ([723d68b](https://github.com/storm-software/storm-stack/commit/723d68b)) - -## 0.1.2 (2024-10-08) - - -### Bug Fixes - -- **types:** Regenerate the monorepo markdown files ([2b5818e](https://github.com/storm-software/storm-stack/commit/2b5818e)) - -## 0.1.1 (2024-10-08) - - -### Bug Fixes - -- **monorepo:** Resolve issue with markdown across entire monorepo ([ee6720c](https://github.com/storm-software/storm-stack/commit/ee6720c)) - -## 0.1.0 (2024-10-08) - - -### Features - -- **hooks:** Initial check-in of the base reusable React `hooks` package ([6af6750](https://github.com/storm-software/storm-stack/commit/6af6750)) - - -### Bug Fixes - -- **monorepo:** Automated linting resolution on monorepo ([7136dec](https://github.com/storm-software/storm-stack/commit/7136dec)) \ No newline at end of file diff --git a/packages/logging/jest.config.ts b/packages/logging/jest.config.ts deleted file mode 100644 index b25bf813..00000000 --- a/packages/logging/jest.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { getJestConfig } from "@storm-software/testing-tools"; - -export default getJestConfig("packages/logging", true, "logging"); diff --git a/packages/logging/tsconfig.spec.json b/packages/logging/tsconfig.spec.json deleted file mode 100644 index d41aea47..00000000 --- a/packages/logging/tsconfig.spec.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../dist/out-tsc", - "types": ["jest", "node"] - }, - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.spec.ts", - "src/**/*.d.ts" - ] -} diff --git a/packages/plugin-system/jest.config.ts b/packages/plugin-system/jest.config.ts deleted file mode 100644 index 8d41a606..00000000 --- a/packages/plugin-system/jest.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { getJestConfig } from "@storm-software/testing-tools"; - -export default getJestConfig("packages/plugin-system", true, "plugin-system"); diff --git a/packages/plugin-system/tsconfig.spec.json b/packages/plugin-system/tsconfig.spec.json deleted file mode 100644 index d41aea47..00000000 --- a/packages/plugin-system/tsconfig.spec.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../dist/out-tsc", - "types": ["jest", "node"] - }, - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.spec.ts", - "src/**/*.d.ts" - ] -} diff --git a/packages/serialization/jest.config.ts b/packages/serialization/jest.config.ts deleted file mode 100644 index a55a98bc..00000000 --- a/packages/serialization/jest.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { getJestConfig } from "@storm-software/testing-tools"; - -export default getJestConfig("packages/serialization", true, "serialization"); diff --git a/packages/serialization/project.json b/packages/serialization/project.json deleted file mode 100644 index 29f4770f..00000000 --- a/packages/serialization/project.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "serialization", - "$schema": "../../node_modules/nx/schemas/project-schema.json", - "projectType": "library", - "sourceRoot": "packages/serialization/src", - "targets": { - "build": { - "cache": true, - "executor": "@storm-software/workspace-tools:unbuild", - "inputs": ["typescript", "^production"], - "outputs": ["{options.outputPath}"], - "defaultConfiguration": "production", - "clean": true, - "options": { - "type": "packages/serialization/src/index.ts", - "outputPath": "dist/packages/serialization", - "tsConfig": "packages/serialization/tsconfig.json", - "project": "packages/serialization/package.json" - }, - "configurations": { - "production": { - "sourceMap": false, - "verbose": false - }, - "development": { - "sourceMap": true, - "verbose": true - } - } - }, - "nx-release-publish": { - "executor": "@storm-software/workspace-tools:npm-publish" - } - } -} diff --git a/packages/serialization/tsconfig.spec.json b/packages/serialization/tsconfig.spec.json deleted file mode 100644 index d41aea47..00000000 --- a/packages/serialization/tsconfig.spec.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../dist/out-tsc", - "types": ["jest", "node"] - }, - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.spec.ts", - "src/**/*.d.ts" - ] -} diff --git a/packages/server-cache/CHANGELOG.md b/packages/server-cache/CHANGELOG.md deleted file mode 100644 index 58485160..00000000 --- a/packages/server-cache/CHANGELOG.md +++ /dev/null @@ -1,211 +0,0 @@ -## 0.17.0 (2024-12-18) - -### Features - -- **logging:** Update the `initialize` method signature in the `StormLog` class ([7b11262](https://github.com/storm-software/storm-stack/commit/7b11262)) - -## 0.16.0 (2024-11-10) - -### Features - -- **date-time:** Resolve issue parsing ISO string in `StormDateTime` constructor ([c8032d6](https://github.com/storm-software/storm-stack/commit/c8032d6)) - -## 0.15.0 (2024-11-10) - -### Features - -- **cli:** Added the `execute` and `install` utility functions ([8b04259](https://github.com/storm-software/storm-stack/commit/8b04259)) - -## 0.14.0 (2024-11-08) - -### Features - -- **types:** Regenerate packages with upgraded ops packages ([936026a](https://github.com/storm-software/storm-stack/commit/936026a)) - -## 0.13.0 (2024-11-07) - - -### Features - -- **date-time:** Added the `getMonthIndex` helper function ([8d979d2](https://github.com/storm-software/storm-stack/commit/8d979d2)) - -## 0.12.2 (2024-10-27) - - -### Bug Fixes - -- **date-time:** Update static function to no longer be constants ([f366ffe](https://github.com/storm-software/storm-stack/commit/f366ffe)) - -## 0.12.1 (2024-10-26) - - -### Bug Fixes - -- **hooks:** Resolve issue updating element reference in `useHook` hook ([340e2f4](https://github.com/storm-software/storm-stack/commit/340e2f4)) - -## 0.12.0 (2024-10-26) - - -### Features - -- **types:** Added the `isFileResult` type-checker and updated `status` field ([2fc6410](https://github.com/storm-software/storm-stack/commit/2fc6410)) - -## 0.11.2 (2024-10-24) - - -### Bug Fixes - -- **date-time:** Update the conditionals in validate functions ([f5f4e26](https://github.com/storm-software/storm-stack/commit/f5f4e26)) - -## 0.11.1 (2024-10-24) - - -### Bug Fixes - -- **date-time:** Resolve issue with the date-time format functions ([f385b23](https://github.com/storm-software/storm-stack/commit/f385b23)) - -## 0.11.0 (2024-10-24) - - -### Features - -- **hooks:** Added the `composeRefs` function and hook ([80a1379](https://github.com/storm-software/storm-stack/commit/80a1379)) - -## 0.10.0 (2024-10-22) - - -### Features - -- **monorepo:** Use latest storm build tools in monorepo ([6bf00c5](https://github.com/storm-software/storm-stack/commit/6bf00c5)) - -## 0.9.2 (2024-10-20) - - -### Bug Fixes - -- **date-time:** Resolve issue with parsing ISO-8601 string ([a63273e](https://github.com/storm-software/storm-stack/commit/a63273e)) - -## 0.9.1 (2024-10-20) - - -### Bug Fixes - -- **date-time:** Resolved issue with creating date-time in validation function ([2a3c1e8](https://github.com/storm-software/storm-stack/commit/2a3c1e8)) - -## 0.9.0 (2024-10-18) - - -### Features - -- **date-time:** Provide time zone to the formatting function ([318ab55](https://github.com/storm-software/storm-stack/commit/318ab55)) - -## 0.8.0 (2024-10-18) - - -### Features - -- **date-time:** Added new flags to formatting options for helper functions ([b702d6c](https://github.com/storm-software/storm-stack/commit/b702d6c)) - - -### Bug Fixes - -- **serialization:** Resolved stack overflow issue with `StormParser` class ([f890df9](https://github.com/storm-software/storm-stack/commit/f890df9)) - -## 0.7.0 (2024-10-15) - - -### Features - -- **types:** Added the `index` and `status` properties to the `SelectOption` type ([7da9603](https://github.com/storm-software/storm-stack/commit/7da9603)) - -## 0.6.0 (2024-10-14) - - -### Features - -- **types:** Added the `description` property to the `SelectOption` type ([94c33d2](https://github.com/storm-software/storm-stack/commit/94c33d2)) - -## 0.5.0 (2024-10-11) - - -### Features - -- **types:** Added the `help` and `success` ValidationDetail message types ([207bf67](https://github.com/storm-software/storm-stack/commit/207bf67)) - -## 0.4.0 (2024-10-10) - - -### Features - -- **utilities:** Added the `toPath` and `toDeepKey` functions ([1977f13](https://github.com/storm-software/storm-stack/commit/1977f13)) - -## 0.3.2 (2024-10-10) - - -### Bug Fixes - -- **monorepo:** Regenerate markup after token update ([a37ef2a](https://github.com/storm-software/storm-stack/commit/a37ef2a)) - -## 0.3.1 (2024-10-10) - - -### Bug Fixes - -- **types:** Added missing tags and regenerated markdown ([7ab98cc](https://github.com/storm-software/storm-stack/commit/7ab98cc)) - -## 0.3.0 (2024-10-10) - - -### Features - -- **utilities:** Update the base Nx configuration ([99988e0](https://github.com/storm-software/storm-stack/commit/99988e0)) - - -### Bug Fixes - -- **monorepo:** Update the Nx configuration to include release process specifications ([df311f7](https://github.com/storm-software/storm-stack/commit/df311f7)) - -## 0.2.4 (2024-10-10) - - -### Bug Fixes - -- **monorepo:** Regenerate the README file formatting ([b81153c](https://github.com/storm-software/storm-stack/commit/b81153c)) - -## 0.2.3 (2024-10-09) - - -### Bug Fixes - -- **utilities:** Reformatting the README files ([723d68b](https://github.com/storm-software/storm-stack/commit/723d68b)) - -## 0.2.2 (2024-10-08) - - -### Bug Fixes - -- **types:** Regenerate the monorepo markdown files ([2b5818e](https://github.com/storm-software/storm-stack/commit/2b5818e)) - -## 0.2.1 (2024-10-08) - - -### Bug Fixes - -- **monorepo:** Resolve issue with markdown across entire monorepo ([ee6720c](https://github.com/storm-software/storm-stack/commit/ee6720c)) - - - -## 0.1.0 (2024-02-10) - -### 🚀 Features - -- **server-cache:** Added base package to support various types of caching on - the server - ([8be6e04](https://github.com/storm-software/storm-stack/commit/8be6e04)) - -- **server-cache:** Added the caching access/modify methods - ([36d8540](https://github.com/storm-software/storm-stack/commit/36d8540)) - -### ❤️ Thank You - -- Patrick Sullivan diff --git a/packages/server-cache/jest.config.ts b/packages/server-cache/jest.config.ts deleted file mode 100644 index 8cf40dac..00000000 --- a/packages/server-cache/jest.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { getJestConfig } from "@storm-software/testing-tools"; - -export default getJestConfig("packages/server-cache", true, "server-cache"); diff --git a/packages/server-cache/tsconfig.spec.json b/packages/server-cache/tsconfig.spec.json deleted file mode 100644 index d41aea47..00000000 --- a/packages/server-cache/tsconfig.spec.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../dist/out-tsc", - "types": ["jest", "node"] - }, - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.spec.ts", - "src/**/*.d.ts" - ] -} diff --git a/packages/server-result/CHANGELOG.md b/packages/server-result/CHANGELOG.md deleted file mode 100644 index ea8de411..00000000 --- a/packages/server-result/CHANGELOG.md +++ /dev/null @@ -1,222 +0,0 @@ -## 0.18.0 (2024-12-18) - -### Features - -- **logging:** Update the `initialize` method signature in the `StormLog` class ([7b11262](https://github.com/storm-software/storm-stack/commit/7b11262)) - -## 0.17.0 (2024-11-10) - -### Features - -- **date-time:** Resolve issue parsing ISO string in `StormDateTime` constructor ([c8032d6](https://github.com/storm-software/storm-stack/commit/c8032d6)) - -## 0.16.0 (2024-11-10) - -### Features - -- **cli:** Added the `execute` and `install` utility functions ([8b04259](https://github.com/storm-software/storm-stack/commit/8b04259)) - -## 0.15.0 (2024-11-08) - -### Features - -- **types:** Regenerate packages with upgraded ops packages ([936026a](https://github.com/storm-software/storm-stack/commit/936026a)) - -## 0.14.0 (2024-11-07) - - -### Features - -- **date-time:** Added the `getMonthIndex` helper function ([8d979d2](https://github.com/storm-software/storm-stack/commit/8d979d2)) - -## 0.13.2 (2024-10-27) - - -### Bug Fixes - -- **date-time:** Update static function to no longer be constants ([f366ffe](https://github.com/storm-software/storm-stack/commit/f366ffe)) - -## 0.13.1 (2024-10-26) - - -### Bug Fixes - -- **hooks:** Resolve issue updating element reference in `useHook` hook ([340e2f4](https://github.com/storm-software/storm-stack/commit/340e2f4)) - -## 0.13.0 (2024-10-26) - - -### Features - -- **types:** Added the `isFileResult` type-checker and updated `status` field ([2fc6410](https://github.com/storm-software/storm-stack/commit/2fc6410)) - -## 0.12.2 (2024-10-24) - - -### Bug Fixes - -- **date-time:** Update the conditionals in validate functions ([f5f4e26](https://github.com/storm-software/storm-stack/commit/f5f4e26)) - -## 0.12.1 (2024-10-24) - - -### Bug Fixes - -- **date-time:** Resolve issue with the date-time format functions ([f385b23](https://github.com/storm-software/storm-stack/commit/f385b23)) - -## 0.12.0 (2024-10-24) - - -### Features - -- **hooks:** Added the `composeRefs` function and hook ([80a1379](https://github.com/storm-software/storm-stack/commit/80a1379)) - -## 0.11.0 (2024-10-22) - - -### Features - -- **monorepo:** Use latest storm build tools in monorepo ([6bf00c5](https://github.com/storm-software/storm-stack/commit/6bf00c5)) - -## 0.10.2 (2024-10-20) - - -### Bug Fixes - -- **date-time:** Resolve issue with parsing ISO-8601 string ([a63273e](https://github.com/storm-software/storm-stack/commit/a63273e)) - -## 0.10.1 (2024-10-20) - - -### Bug Fixes - -- **date-time:** Resolved issue with creating date-time in validation function ([2a3c1e8](https://github.com/storm-software/storm-stack/commit/2a3c1e8)) - -## 0.10.0 (2024-10-18) - - -### Features - -- **date-time:** Provide time zone to the formatting function ([318ab55](https://github.com/storm-software/storm-stack/commit/318ab55)) - -## 0.9.0 (2024-10-18) - - -### Features - -- **date-time:** Added new flags to formatting options for helper functions ([b702d6c](https://github.com/storm-software/storm-stack/commit/b702d6c)) - - -### Bug Fixes - -- **serialization:** Resolved stack overflow issue with `StormParser` class ([f890df9](https://github.com/storm-software/storm-stack/commit/f890df9)) - -## 0.8.0 (2024-10-15) - - -### Features - -- **types:** Added the `index` and `status` properties to the `SelectOption` type ([7da9603](https://github.com/storm-software/storm-stack/commit/7da9603)) - -## 0.7.0 (2024-10-14) - - -### Features - -- **types:** Added the `description` property to the `SelectOption` type ([94c33d2](https://github.com/storm-software/storm-stack/commit/94c33d2)) - -## 0.6.0 (2024-10-11) - - -### Features - -- **types:** Added the `help` and `success` ValidationDetail message types ([207bf67](https://github.com/storm-software/storm-stack/commit/207bf67)) - -## 0.5.0 (2024-10-10) - - -### Features - -- **utilities:** Added the `toPath` and `toDeepKey` functions ([1977f13](https://github.com/storm-software/storm-stack/commit/1977f13)) - -## 0.4.2 (2024-10-10) - - -### Bug Fixes - -- **monorepo:** Regenerate markup after token update ([a37ef2a](https://github.com/storm-software/storm-stack/commit/a37ef2a)) - -## 0.4.1 (2024-10-10) - - -### Bug Fixes - -- **types:** Added missing tags and regenerated markdown ([7ab98cc](https://github.com/storm-software/storm-stack/commit/7ab98cc)) - -## 0.4.0 (2024-10-10) - - -### Features - -- **utilities:** Update the base Nx configuration ([99988e0](https://github.com/storm-software/storm-stack/commit/99988e0)) - - -### Bug Fixes - -- **monorepo:** Update the Nx configuration to include release process specifications ([df311f7](https://github.com/storm-software/storm-stack/commit/df311f7)) - -## 0.3.4 (2024-10-10) - - -### Bug Fixes - -- **monorepo:** Regenerate the README file formatting ([b81153c](https://github.com/storm-software/storm-stack/commit/b81153c)) - -## 0.3.3 (2024-10-09) - - -### Bug Fixes - -- **utilities:** Reformatting the README files ([723d68b](https://github.com/storm-software/storm-stack/commit/723d68b)) - -## 0.3.2 (2024-10-08) - - -### Bug Fixes - -- **types:** Regenerate the monorepo markdown files ([2b5818e](https://github.com/storm-software/storm-stack/commit/2b5818e)) - -## 0.3.1 (2024-10-08) - - -### Bug Fixes - -- **monorepo:** Resolve issue with markdown across entire monorepo ([ee6720c](https://github.com/storm-software/storm-stack/commit/ee6720c)) - -## 0.3.0 (2024-10-08) - - -### Features - -- **utilities:** Added the flatten and unflatten utility functions and helper types ([702d44d](https://github.com/storm-software/storm-stack/commit/702d44d)) - -- **errors:** Added the `ErrorType` concept to separate error data behavior ([cfffb39](https://github.com/storm-software/storm-stack/commit/cfffb39)) - -## 0.2.1 (2024-09-15) - - -### Bug Fixes - -- **monorepo:** Resolve issues in git hook configurations ([f925f93](https://github.com/storm-software/storm-stack/commit/f925f93)) - -## 0.2.0 (2024-09-13) - - -### Features - -- **telemetry:** Added sentry telemetry functionality ([a29cc50](https://github.com/storm-software/storm-stack/commit/a29cc50)) - - -### Continuous Integration - -- **monorepo:** Added updated action parameter names ([e82025a](https://github.com/storm-software/storm-stack/commit/e82025a)) \ No newline at end of file diff --git a/packages/server-result/jest.config.ts b/packages/server-result/jest.config.ts deleted file mode 100644 index 1c809076..00000000 --- a/packages/server-result/jest.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { getJestConfig } from '@storm-software/testing-tools'; - -export default getJestConfig('packages/server-result', true, 'server-result'); diff --git a/packages/server-result/project.json b/packages/server-result/project.json deleted file mode 100644 index 25f0c3e3..00000000 --- a/packages/server-result/project.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "server-result", - "$schema": "../../node_modules/nx/schemas/project-schema.json", - "projectType": "library", - "sourceRoot": "packages/server-result/src", - "targets": { - "build": { - "cache": true, - "executor": "@storm-software/workspace-tools:unbuild", - "inputs": ["typescript", "^production"], - "outputs": ["{options.outputPath}"], - "defaultConfiguration": "production", - "clean": true, - "options": { - "type": "packages/server-result/src/index.ts", - "outputPath": "dist/packages/server-result", - "tsConfig": "packages/server-result/tsconfig.json", - "project": "packages/server-result/package.json" - }, - "configurations": { - "production": { - "sourceMap": false, - "verbose": false - }, - "development": { - "sourceMap": true, - "verbose": true - } - } - }, - "nx-release-publish": { - "executor": "@storm-software/workspace-tools:npm-publish" - } - } -} diff --git a/packages/server-result/tsconfig.spec.json b/packages/server-result/tsconfig.spec.json deleted file mode 100644 index d41aea47..00000000 --- a/packages/server-result/tsconfig.spec.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../dist/out-tsc", - "types": ["jest", "node"] - }, - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.spec.ts", - "src/**/*.d.ts" - ] -} diff --git a/packages/string-fns/CHANGELOG.md b/packages/string-fns/CHANGELOG.md deleted file mode 100644 index f7936c89..00000000 --- a/packages/string-fns/CHANGELOG.md +++ /dev/null @@ -1,216 +0,0 @@ -## 0.18.0 (2024-11-10) - -### Features - -- **date-time:** Resolve issue parsing ISO string in `StormDateTime` constructor ([c8032d6](https://github.com/storm-software/storm-stack/commit/c8032d6)) - -## 0.17.0 (2024-11-10) - -### Features - -- **cli:** Added the `execute` and `install` utility functions ([8b04259](https://github.com/storm-software/storm-stack/commit/8b04259)) - -## 0.16.0 (2024-11-08) - -### Features - -- **types:** Regenerate packages with upgraded ops packages ([936026a](https://github.com/storm-software/storm-stack/commit/936026a)) - -## 0.15.0 (2024-11-07) - - -### Features - -- **date-time:** Added the `getMonthIndex` helper function ([8d979d2](https://github.com/storm-software/storm-stack/commit/8d979d2)) - -## 0.14.2 (2024-10-27) - - -### Bug Fixes - -- **date-time:** Update static function to no longer be constants ([f366ffe](https://github.com/storm-software/storm-stack/commit/f366ffe)) - -## 0.14.1 (2024-10-26) - - -### Bug Fixes - -- **hooks:** Resolve issue updating element reference in `useHook` hook ([340e2f4](https://github.com/storm-software/storm-stack/commit/340e2f4)) - -## 0.14.0 (2024-10-26) - - -### Features - -- **types:** Added the `isFileResult` type-checker and updated `status` field ([2fc6410](https://github.com/storm-software/storm-stack/commit/2fc6410)) - -## 0.13.2 (2024-10-24) - - -### Bug Fixes - -- **date-time:** Update the conditionals in validate functions ([f5f4e26](https://github.com/storm-software/storm-stack/commit/f5f4e26)) - -## 0.13.1 (2024-10-24) - - -### Bug Fixes - -- **date-time:** Resolve issue with the date-time format functions ([f385b23](https://github.com/storm-software/storm-stack/commit/f385b23)) - -## 0.13.0 (2024-10-24) - - -### Features - -- **hooks:** Added the `composeRefs` function and hook ([80a1379](https://github.com/storm-software/storm-stack/commit/80a1379)) - -## 0.12.0 (2024-10-22) - - -### Features - -- **monorepo:** Use latest storm build tools in monorepo ([6bf00c5](https://github.com/storm-software/storm-stack/commit/6bf00c5)) - -## 0.11.2 (2024-10-20) - - -### Bug Fixes - -- **date-time:** Resolve issue with parsing ISO-8601 string ([a63273e](https://github.com/storm-software/storm-stack/commit/a63273e)) - -## 0.11.1 (2024-10-20) - - -### Bug Fixes - -- **date-time:** Resolved issue with creating date-time in validation function ([2a3c1e8](https://github.com/storm-software/storm-stack/commit/2a3c1e8)) - -## 0.11.0 (2024-10-18) - - -### Features - -- **date-time:** Provide time zone to the formatting function ([318ab55](https://github.com/storm-software/storm-stack/commit/318ab55)) - -## 0.10.0 (2024-10-18) - - -### Features - -- **date-time:** Added new flags to formatting options for helper functions ([b702d6c](https://github.com/storm-software/storm-stack/commit/b702d6c)) - - -### Bug Fixes - -- **serialization:** Resolved stack overflow issue with `StormParser` class ([f890df9](https://github.com/storm-software/storm-stack/commit/f890df9)) - -## 0.9.0 (2024-10-15) - - -### Features - -- **types:** Added the `index` and `status` properties to the `SelectOption` type ([7da9603](https://github.com/storm-software/storm-stack/commit/7da9603)) - -## 0.8.0 (2024-10-14) - - -### Features - -- **types:** Added the `description` property to the `SelectOption` type ([94c33d2](https://github.com/storm-software/storm-stack/commit/94c33d2)) - -## 0.7.0 (2024-10-11) - - -### Features - -- **types:** Added the `help` and `success` ValidationDetail message types ([207bf67](https://github.com/storm-software/storm-stack/commit/207bf67)) - -## 0.6.0 (2024-10-10) - - -### Features - -- **utilities:** Added the `toPath` and `toDeepKey` functions ([1977f13](https://github.com/storm-software/storm-stack/commit/1977f13)) - -## 0.5.2 (2024-10-10) - - -### Bug Fixes - -- **monorepo:** Regenerate markup after token update ([a37ef2a](https://github.com/storm-software/storm-stack/commit/a37ef2a)) - -## 0.5.1 (2024-10-10) - - -### Bug Fixes - -- **types:** Added missing tags and regenerated markdown ([7ab98cc](https://github.com/storm-software/storm-stack/commit/7ab98cc)) - -## 0.5.0 (2024-10-10) - - -### Features - -- **utilities:** Update the base Nx configuration ([99988e0](https://github.com/storm-software/storm-stack/commit/99988e0)) - - -### Bug Fixes - -- **monorepo:** Update the Nx configuration to include release process specifications ([df311f7](https://github.com/storm-software/storm-stack/commit/df311f7)) - -## 0.4.4 (2024-10-10) - - -### Bug Fixes - -- **monorepo:** Regenerate the README file formatting ([b81153c](https://github.com/storm-software/storm-stack/commit/b81153c)) - -## 0.4.3 (2024-10-09) - - -### Bug Fixes - -- **utilities:** Reformatting the README files ([723d68b](https://github.com/storm-software/storm-stack/commit/723d68b)) - -## 0.4.2 (2024-10-08) - - -### Bug Fixes - -- **types:** Regenerate the monorepo markdown files ([2b5818e](https://github.com/storm-software/storm-stack/commit/2b5818e)) - -## 0.4.1 (2024-10-08) - - -### Bug Fixes - -- **monorepo:** Resolve issue with markdown across entire monorepo ([ee6720c](https://github.com/storm-software/storm-stack/commit/ee6720c)) - -## 0.4.0 (2024-10-08) - - -### Features - -- **utilities:** Added the flatten and unflatten utility functions and helper types ([702d44d](https://github.com/storm-software/storm-stack/commit/702d44d)) - -## 0.3.1 (2024-09-15) - - -### Bug Fixes - -- **monorepo:** Resolve issues in git hook configurations ([f925f93](https://github.com/storm-software/storm-stack/commit/f925f93)) - -## 0.3.0 (2024-09-15) - - -### Features - -- **monorepo:** Update base builder version ([cd06bfc](https://github.com/storm-software/storm-stack/commit/cd06bfc)) - -## 0.2.0 (2024-09-15) - - -### Features - -- **string-fns:** Added the acronyms list ([6b8b612](https://github.com/storm-software/storm-stack/commit/6b8b612)) \ No newline at end of file diff --git a/packages/string-fns/jest.config.ts b/packages/string-fns/jest.config.ts deleted file mode 100644 index 8cdcb5c9..00000000 --- a/packages/string-fns/jest.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { getJestConfig } from "@storm-software/testing-tools"; - -export default getJestConfig("packages/string-fns", true, "string-fns"); diff --git a/packages/string-fns/project.json b/packages/string-fns/project.json deleted file mode 100644 index 8f6507e3..00000000 --- a/packages/string-fns/project.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "string-fns", - "$schema": "../../node_modules/nx/schemas/project-schema.json", - "projectType": "library", - "sourceRoot": "packages/string-fns/src", - "targets": { - "build": { - "cache": true, - "executor": "@storm-software/workspace-tools:unbuild", - "inputs": ["typescript", "^production"], - "outputs": ["{options.outputPath}"], - "defaultConfiguration": "production", - "clean": true, - "options": { - "type": "packages/string-fns/src/index.ts", - "outputPath": "dist/packages/string-fns", - "tsConfig": "packages/string-fns/tsconfig.json", - "project": "packages/string-fns/package.json" - }, - "configurations": { - "production": { - "sourceMap": false, - "verbose": false - }, - "development": { - "sourceMap": true, - "verbose": true - } - } - }, - "nx-release-publish": { - "executor": "@storm-software/workspace-tools:npm-publish" - } - } -} diff --git a/packages/string-fns/tsconfig.spec.json b/packages/string-fns/tsconfig.spec.json deleted file mode 100644 index d41aea47..00000000 --- a/packages/string-fns/tsconfig.spec.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../dist/out-tsc", - "types": ["jest", "node"] - }, - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.spec.ts", - "src/**/*.d.ts" - ] -} diff --git a/packages/telemetry/jest.config.ts b/packages/telemetry/jest.config.ts deleted file mode 100644 index 5f7c9edf..00000000 --- a/packages/telemetry/jest.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { getJestConfig } from "@storm-software/testing-tools"; - -export default getJestConfig("backend/telemetry", true, "telemetry"); diff --git a/packages/telemetry/project.json b/packages/telemetry/project.json deleted file mode 100644 index 08faf40c..00000000 --- a/packages/telemetry/project.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "telemetry", - "$schema": "../../node_modules/nx/schemas/project-schema.json", - "projectType": "library", - "sourceRoot": "packages/telemetry/src", - "targets": { - "build": { - "cache": true, - "executor": "@storm-software/workspace-tools:unbuild", - "inputs": ["typescript", "^production"], - "outputs": ["{options.outputPath}"], - "defaultConfiguration": "production", - "clean": true, - "options": { - "type": "packages/telemetry/src/index.ts", - "outputPath": "dist/packages/telemetry", - "tsConfig": "packages/telemetry/tsconfig.json", - "project": "packages/telemetry/package.json" - }, - "configurations": { - "production": { - "sourceMap": false, - "verbose": false - }, - "development": { - "sourceMap": true, - "verbose": true - } - } - }, - "nx-release-publish": { - "executor": "@storm-software/workspace-tools:npm-publish" - } - } -} diff --git a/packages/telemetry/tsconfig.json b/packages/telemetry/tsconfig.json deleted file mode 100644 index f1f337a7..00000000 --- a/packages/telemetry/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "outDir": "../../dist/out-tsc" - }, - "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.js", "src/**/*.jsx"], - "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"] -} diff --git a/packages/telemetry/tsconfig.spec.json b/packages/telemetry/tsconfig.spec.json deleted file mode 100644 index d41aea47..00000000 --- a/packages/telemetry/tsconfig.spec.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../dist/out-tsc", - "types": ["jest", "node"] - }, - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.spec.ts", - "src/**/*.d.ts" - ] -} diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md deleted file mode 100644 index 04510695..00000000 --- a/packages/types/CHANGELOG.md +++ /dev/null @@ -1,362 +0,0 @@ -## 0.34.0 (2024-12-12) - -### Features - -- **types:** Added the `NameValuePair` and `UserBase` base utility types ([ed101af](https://github.com/storm-software/storm-stack/commit/ed101af)) - -## 0.33.0 (2024-12-03) - -### Features - -- **hooks:** Added the `useMemoStable` and `useCallbackStable` hooks ([4629ec3](https://github.com/storm-software/storm-stack/commit/4629ec3)) - -## 0.32.0 (2024-12-02) - -### Features - -- **monorepo:** Upgrade workflow actions to use the new base processes ([14d2f2f](https://github.com/storm-software/storm-stack/commit/14d2f2f)) - -## 0.31.0 (2024-11-10) - -### Features - -- **date-time:** Resolve issue parsing ISO string in `StormDateTime` constructor ([c8032d6](https://github.com/storm-software/storm-stack/commit/c8032d6)) - -## 0.30.0 (2024-11-10) - -### Features - -- **cli:** Added `@antfu/install-pkg` to improve install ([26cf962](https://github.com/storm-software/storm-stack/commit/26cf962)) - -## 0.29.0 (2024-11-10) - -### Features - -- **cli:** Added the `execute` and `install` utility functions ([8b04259](https://github.com/storm-software/storm-stack/commit/8b04259)) - -## 0.28.0 (2024-11-08) - -### Features - -- **monorepo:** Upgrade the workspace's Nx package versions ([075a024](https://github.com/storm-software/storm-stack/commit/075a024)) - -## 0.27.0 (2024-11-08) - -### Features - -- **types:** Regenerate packages with upgraded ops packages ([936026a](https://github.com/storm-software/storm-stack/commit/936026a)) - -## 0.26.0 (2024-11-08) - - -### Features - -- **errors:** Added the `createFromData` helper function ([c15576d](https://github.com/storm-software/storm-stack/commit/c15576d)) - -## 0.25.0 (2024-11-07) - - -### Features - -- **date-time:** Added the `getMonthIndex` helper function ([8d979d2](https://github.com/storm-software/storm-stack/commit/8d979d2)) - -## 0.24.2 (2024-10-31) - - -### Bug Fixes - -- **date-time:** Resolve issue with incorrectly exporting classes ([140d576](https://github.com/storm-software/storm-stack/commit/140d576)) - -## 0.24.1 (2024-10-27) - - -### Bug Fixes - -- **date-time:** Update static function to no longer be constants ([f366ffe](https://github.com/storm-software/storm-stack/commit/f366ffe)) - -## 0.24.0 (2024-10-27) - - -### Features - -- **date-time:** Added separate create helper functions for date-time classes ([569673f](https://github.com/storm-software/storm-stack/commit/569673f)) - -## 0.23.1 (2024-10-26) - - -### Bug Fixes - -- **hooks:** Resolve issue updating element reference in `useHook` hook ([340e2f4](https://github.com/storm-software/storm-stack/commit/340e2f4)) - -## 0.23.0 (2024-10-26) - - -### Features - -- **hooks:** Added the `useHover`, `useIdle`, and `useNetworkState` hooks ([b52aa2f](https://github.com/storm-software/storm-stack/commit/b52aa2f)) - -## 0.22.0 (2024-10-26) - - -### Features - -- **types:** Added the `isFileResult` type-checker and updated `status` field ([2fc6410](https://github.com/storm-software/storm-stack/commit/2fc6410)) - -## 0.21.0 (2024-10-26) - - -### Features - -- **types:** Added the `FileResult` shared type definition ([f9d07c6](https://github.com/storm-software/storm-stack/commit/f9d07c6)) - -## 0.20.3 (2024-10-24) - - -### Bug Fixes - -- **date-time:** Update the conditionals in validate functions ([f5f4e26](https://github.com/storm-software/storm-stack/commit/f5f4e26)) - -## 0.20.2 (2024-10-24) - - -### Bug Fixes - -- **date-time:** Resolve issue with null date-time validations ([3eaf348](https://github.com/storm-software/storm-stack/commit/3eaf348)) - -## 0.20.1 (2024-10-24) - - -### Bug Fixes - -- **date-time:** Resolve issue with the date-time format functions ([f385b23](https://github.com/storm-software/storm-stack/commit/f385b23)) - -## 0.20.0 (2024-10-24) - - -### Features - -- **hooks:** Added `useBattery`, `useClickAway`, and `useCopyToClipboard` hooks ([556db4d](https://github.com/storm-software/storm-stack/commit/556db4d)) - -## 0.19.0 (2024-10-24) - - -### Features - -- **hooks:** Added the `composeRefs` function and hook ([80a1379](https://github.com/storm-software/storm-stack/commit/80a1379)) - -## 0.18.0 (2024-10-22) - - -### Features - -- **types:** Add type parameters and the `icon` property to the `SelectOption` type ([c0ae1d6](https://github.com/storm-software/storm-stack/commit/c0ae1d6)) - -## 0.17.0 (2024-10-22) - - -### Features - -- **monorepo:** Use latest storm build tools in monorepo ([6bf00c5](https://github.com/storm-software/storm-stack/commit/6bf00c5)) - -## 0.16.0 (2024-10-20) - - -### Features - -- **serialization:** Added the `parseCookie` and `serializeCookie` helper functions ([0b695ef](https://github.com/storm-software/storm-stack/commit/0b695ef)) - -## 0.15.3 (2024-10-20) - - -### Bug Fixes - -- **date-time:** Resolve issue with parsing ISO-8601 string ([a63273e](https://github.com/storm-software/storm-stack/commit/a63273e)) - -## 0.15.2 (2024-10-20) - - -### Bug Fixes - -- **date-time:** Resolve issue with call to validation prior to construction ([d020d67](https://github.com/storm-software/storm-stack/commit/d020d67)) - -## 0.15.1 (2024-10-20) - - -### Bug Fixes - -- **date-time:** Resolved issue with creating date-time in validation function ([2a3c1e8](https://github.com/storm-software/storm-stack/commit/2a3c1e8)) - -## 0.15.0 (2024-10-20) - - -### Features - -- **date-time:** Added the day of the month validation to date classes ([734d0c8](https://github.com/storm-software/storm-stack/commit/734d0c8)) - -## 0.14.0 (2024-10-18) - - -### Features - -- **date-time:** Provide time zone to the formatting function ([318ab55](https://github.com/storm-software/storm-stack/commit/318ab55)) - -## 0.13.0 (2024-10-18) - - -### Features - -- **date-time:** Added the `getDefaultTimeZone` function to the `StormDateTime` class ([f2fac83](https://github.com/storm-software/storm-stack/commit/f2fac83)) - -## 0.12.0 (2024-10-18) - - -### Features - -- **date-time:** Added the static validate method to the `StormDateTime` utility classes ([3169747](https://github.com/storm-software/storm-stack/commit/3169747)) - -## 0.11.0 (2024-10-18) - - -### Features - -- **date-time:** Added new flags to formatting options for helper functions ([b702d6c](https://github.com/storm-software/storm-stack/commit/b702d6c)) - - -### Bug Fixes - -- **serialization:** Resolved stack overflow issue with `StormParser` class ([f890df9](https://github.com/storm-software/storm-stack/commit/f890df9)) - -## 0.10.0 (2024-10-15) - - -### Features - -- **types:** Added the `index` and `status` properties to the `SelectOption` type ([7da9603](https://github.com/storm-software/storm-stack/commit/7da9603)) - -## 0.9.0 (2024-10-14) - - -### Features - -- **types:** Added the `description` property to the `SelectOption` type ([94c33d2](https://github.com/storm-software/storm-stack/commit/94c33d2)) - -## 0.8.0 (2024-10-11) - - -### Features - -- **types:** Added the `help` and `success` ValidationDetail message types ([207bf67](https://github.com/storm-software/storm-stack/commit/207bf67)) - -## 0.7.0 (2024-10-10) - - -### Features - -- **utilities:** Added the `toPath` and `toDeepKey` functions ([1977f13](https://github.com/storm-software/storm-stack/commit/1977f13)) - -## 0.6.2 (2024-10-10) - - -### Bug Fixes - -- **monorepo:** Regenerate markup after token update ([a37ef2a](https://github.com/storm-software/storm-stack/commit/a37ef2a)) - -## 0.6.1 (2024-10-10) - - -### Bug Fixes - -- **types:** Added missing tags and regenerated markdown ([7ab98cc](https://github.com/storm-software/storm-stack/commit/7ab98cc)) - -## 0.6.0 (2024-10-10) - - -### Features - -- **utilities:** Update the base Nx configuration ([99988e0](https://github.com/storm-software/storm-stack/commit/99988e0)) - - -### Bug Fixes - -- **monorepo:** Update the Nx configuration to include release process specifications ([df311f7](https://github.com/storm-software/storm-stack/commit/df311f7)) - -## 0.5.4 (2024-10-10) - - -### Bug Fixes - -- **monorepo:** Regenerate the README file formatting ([b81153c](https://github.com/storm-software/storm-stack/commit/b81153c)) - -## 0.5.3 (2024-10-09) - - -### Bug Fixes - -- **utilities:** Reformatting the README files ([723d68b](https://github.com/storm-software/storm-stack/commit/723d68b)) - -## 0.5.2 (2024-10-08) - - -### Bug Fixes - -- **types:** Regenerate the monorepo markdown files ([2b5818e](https://github.com/storm-software/storm-stack/commit/2b5818e)) - -## 0.5.1 (2024-10-08) - - -### Bug Fixes - -- **monorepo:** Resolve issue with markdown across entire monorepo ([ee6720c](https://github.com/storm-software/storm-stack/commit/ee6720c)) - -## 0.5.0 (2024-10-08) - - -### Features - -- **utilities:** Added the flatten and unflatten utility functions and helper types ([702d44d](https://github.com/storm-software/storm-stack/commit/702d44d)) - -- **errors:** Added the `ErrorType` concept to separate error data behavior ([cfffb39](https://github.com/storm-software/storm-stack/commit/cfffb39)) - -- **hooks:** Initial check-in of the base reusable React `hooks` package ([6af6750](https://github.com/storm-software/storm-stack/commit/6af6750)) - -## 0.4.2 (2024-09-15) - - -### Bug Fixes - -- **monorepo:** Resolve issues in git hook configurations ([f925f93](https://github.com/storm-software/storm-stack/commit/f925f93)) - -## 0.4.1 (2024-09-15) - - -### Bug Fixes - -- **types:** Remove unused node poyfill ([6d1cf31](https://github.com/storm-software/storm-stack/commit/6d1cf31)) - -## 0.4.0 (2024-09-15) - - -### Features - -- **monorepo:** Update base builder version ([cd06bfc](https://github.com/storm-software/storm-stack/commit/cd06bfc)) - -## 0.3.0 (2024-09-15) - - -### Features - -- **string-fns:** Added the acronyms list ([6b8b612](https://github.com/storm-software/storm-stack/commit/6b8b612)) - -## 0.2.1 (2024-09-15) - - -### Bug Fixes - -- **types:** Resolved ESLint rule issues ([0cbebee](https://github.com/storm-software/storm-stack/commit/0cbebee)) - -## 0.2.0 (2024-09-15) - - -### Features - -- **monorepo:** Upgrade the base builder storm package ([6d39b20](https://github.com/storm-software/storm-stack/commit/6d39b20)) \ No newline at end of file diff --git a/packages/types/project.json b/packages/types/project.json deleted file mode 100644 index 46f4841d..00000000 --- a/packages/types/project.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "types", - "$schema": "../../node_modules/nx/schemas/project-schema.json", - "projectType": "library", - "sourceRoot": "packages/types/src", - "targets": { - "build": { - "cache": true, - "executor": "@storm-software/workspace-tools:unbuild", - "inputs": ["typescript", "^production"], - "outputs": ["{options.outputPath}"], - "defaultConfiguration": "production", - "clean": true, - "options": { - "type": "packages/types/src/index.ts", - "outputPath": "dist/packages/types", - "tsConfig": "packages/types/tsconfig.json", - "project": "packages/types/package.json" - }, - "configurations": { - "production": { - "sourceMap": false, - "verbose": false - }, - "development": { - "sourceMap": true, - "verbose": true - } - } - }, - "nx-release-publish": { - "executor": "@storm-software/workspace-tools:npm-publish" - } - } -} diff --git a/packages/types/tsconfig.spec.json b/packages/types/tsconfig.spec.json deleted file mode 100644 index d41aea47..00000000 --- a/packages/types/tsconfig.spec.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../dist/out-tsc", - "types": ["jest", "node"] - }, - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.spec.ts", - "src/**/*.d.ts" - ] -} diff --git a/packages/unique-identifier/project.json b/packages/unique-identifier/project.json deleted file mode 100644 index aa5d9738..00000000 --- a/packages/unique-identifier/project.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "unique-identifier", - "$schema": "../../node_modules/nx/schemas/project-schema.json", - "projectType": "library", - "sourceRoot": "packages/unique-identifier/src", - "targets": { - "build": { - "cache": true, - "executor": "@storm-software/workspace-tools:unbuild", - "inputs": ["typescript", "^production"], - "outputs": ["{options.outputPath}"], - "defaultConfiguration": "production", - "clean": true, - "options": { - "type": "packages/unique-identifier/src/index.ts", - "outputPath": "dist/packages/unique-identifier", - "tsConfig": "packages/unique-identifier/tsconfig.json", - "project": "packages/unique-identifier/package.json" - }, - "configurations": { - "production": { - "sourceMap": false, - "verbose": false - }, - "development": { - "sourceMap": true, - "verbose": true - } - } - }, - "nx-release-publish": { - "executor": "@storm-software/workspace-tools:npm-publish" - } - } -} diff --git a/packages/unique-identifier/tsconfig.spec.json b/packages/unique-identifier/tsconfig.spec.json deleted file mode 100644 index d41aea47..00000000 --- a/packages/unique-identifier/tsconfig.spec.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../dist/out-tsc", - "types": ["jest", "node"] - }, - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.spec.ts", - "src/**/*.d.ts" - ] -} diff --git a/packages/utilities/project.json b/packages/utilities/project.json deleted file mode 100644 index 588c8033..00000000 --- a/packages/utilities/project.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "utilities", - "$schema": "../../node_modules/nx/schemas/project-schema.json", - "projectType": "library", - "sourceRoot": "packages/utilities/src", - "targets": { - "build": { - "cache": true, - "executor": "@storm-software/workspace-tools:unbuild", - "inputs": ["typescript", "^production"], - "outputs": ["{options.outputPath}"], - "defaultConfiguration": "production", - "clean": true, - "options": { - "type": "packages/utilities/src/index.ts", - "outputPath": "dist/packages/utilities", - "tsConfig": "packages/utilities/tsconfig.json", - "project": "packages/utilities/package.json" - }, - "configurations": { - "production": { - "sourceMap": false, - "verbose": false - }, - "development": { - "sourceMap": true, - "verbose": true - } - } - }, - "nx-release-publish": { - "executor": "@storm-software/workspace-tools:npm-publish" - } - } -} diff --git a/packages/utilities/tsconfig.spec.json b/packages/utilities/tsconfig.spec.json deleted file mode 100644 index d41aea47..00000000 --- a/packages/utilities/tsconfig.spec.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../dist/out-tsc", - "types": ["jest", "node"] - }, - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.spec.ts", - "src/**/*.d.ts" - ] -} diff --git a/packages/utils/cli-helpers/README.md b/packages/utils/cli-helpers/README.md new file mode 100644 index 00000000..5500f64e --- /dev/null +++ b/packages/utils/cli-helpers/README.md @@ -0,0 +1,64 @@ + + + +# CLI Helpers + +A package containing various CLI utilities and helper functions used by Storm Software + + + + +## Installing + +Using [pnpm](http://pnpm.io): + +```bash +pnpm add -D @storm-stack/utils-cli-helpers +``` + +
+ Using npm + +```bash +npm install -D @storm-stack/utils-cli-helpers +``` + +
+ +
+ Using yarn + +```bash +yarn add -D @storm-stack/utils-cli-helpers +``` + +
+ +## Reduced Package Size + +This project uses [tsup](https://tsup.egoist.dev/) to package the source code +due to its ability to remove unused code and ship smaller javascript files +thanks to code splitting. This helps to greatly reduce the size of the package +and to make it easier to use in other projects. + +## Development + +This project is built using [Nx](https://nx.dev). As a result, many of the usual +commands are available to assist in development. + +### Building + +Run `nx build utils-cli-helpers` to build the library. + +### Running unit tests + +Run `nx test utils-cli-helpers` to execute the unit tests via +[Jest](https://jestjs.io). + +### Linting + +Run `nx lint utils-cli-helpers` to run [ESLint](https://eslint.org/) on the +package. + + + diff --git a/packages/utils/cli-helpers/jest.config.ts b/packages/utils/cli-helpers/jest.config.ts new file mode 100644 index 00000000..0019d51c --- /dev/null +++ b/packages/utils/cli-helpers/jest.config.ts @@ -0,0 +1,7 @@ +import { getJestConfig } from "@storm-software/testing-tools"; + +export default getJestConfig( + "packages/utils/cli-helpers", + true, + "utils-cli-helpers" +); diff --git a/packages/utils/cli-helpers/package.json b/packages/utils/cli-helpers/package.json new file mode 100644 index 00000000..182c35e8 --- /dev/null +++ b/packages/utils/cli-helpers/package.json @@ -0,0 +1,30 @@ +{ + "name": "@storm-stack/cli-helpers", + "version": "0.0.1", + "type": "module", + "description": "A package containing various CLI utilities and helper functions used by Storm Software", + "repository": { + "type": "github", + "url": "https://github.com/storm-software/storm-stack.git", + "directory": "packages/utils/cli-helpers" + }, + "private": false, + "dependencies": { + "@antfu/install-pkg": "^0.5.0", + "@antfu/ni": "^0.23.0", + "chalk": "5.3.0", + "commander": "12.1.0", + "execa": "^9.4.0", + "figlet": "^1.7.0", + "prompts": "^2.4.2", + "terminal-link": "^3.0.0", + "tinyexec": "^0.3.1" + }, + "devDependencies": { + "@types/figlet": "^1.7.0", + "@types/node": "^22.10.2" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/packages/utils/cli-helpers/project.json b/packages/utils/cli-helpers/project.json new file mode 100644 index 00000000..eee70e92 --- /dev/null +++ b/packages/utils/cli-helpers/project.json @@ -0,0 +1,43 @@ +{ + "name": "utils-cli-helpers", + "$schema": "../../../node_modules/nx/schemas/project-schema.json", + "projectType": "library", + "sourceRoot": "packages/utils/cli-helpers/src", + "targets": { + "build": { + "executor": "@storm-software/workspace-tools:unbuild", + "outputs": ["{options.outputPath}"], + "options": { + "entry": "packages/utils/cli-helpers/src/index.ts", + "outputPath": "dist/packages/utils/cli-helpers", + "tsConfig": "packages/utils/cli-helpers/tsconfig.json", + "project": "packages/utils/cli-helpers/package.json", + "defaultConfiguration": "production", + "platform": "node", + "assets": [ + { + "input": "packages/utils/cli-helpers", + "glob": "*.md", + "output": "/" + }, + { + "input": "", + "glob": "LICENSE", + "output": "/" + } + ] + }, + "configurations": { + "production": { + "debug": false, + "verbose": false + }, + "development": { + "debug": true, + "verbose": true + } + } + } + }, + "tags": ["platform:node"] +} diff --git a/packages/utils/cli-helpers/src/checks/index.ts b/packages/utils/cli-helpers/src/checks/index.ts new file mode 100644 index 00000000..5a9cee8b --- /dev/null +++ b/packages/utils/cli-helpers/src/checks/index.ts @@ -0,0 +1,19 @@ +/*------------------------------------------------------------------- + + ⚡ Storm Software - Storm Stack + + This code was released as part of the Storm Stack project. Storm Stack + is maintained by Storm Software under the Apache-2.0 License, and is + free for commercial and private use. For more information, please visit + our licensing page. + + Website: https://stormsoftware.com + Repository: https://github.com/storm-software/storm-stack + Documentation: https://stormsoftware.com/projects/storm-stack/docs + Contact: https://stormsoftware.com/contact + License: https://stormsoftware.com/projects/storm-stack/license + + -------------------------------------------------------------------*/ + +export * from "./is-ci"; +export * from "./is-interactive"; diff --git a/packages/cli/src/utilities/is-ci.ts b/packages/utils/cli-helpers/src/checks/is-ci.ts similarity index 100% rename from packages/cli/src/utilities/is-ci.ts rename to packages/utils/cli-helpers/src/checks/is-ci.ts diff --git a/packages/cli/src/utilities/is-interactive.ts b/packages/utils/cli-helpers/src/checks/is-interactive.ts similarity index 100% rename from packages/cli/src/utilities/is-interactive.ts rename to packages/utils/cli-helpers/src/checks/is-interactive.ts diff --git a/packages/file-system/src/package-management/chmod.ts b/packages/utils/cli-helpers/src/commands/chmod-x.ts similarity index 96% rename from packages/file-system/src/package-management/chmod.ts rename to packages/utils/cli-helpers/src/commands/chmod-x.ts index 9e17b8df..7cfc59e1 100644 --- a/packages/file-system/src/package-management/chmod.ts +++ b/packages/utils/cli-helpers/src/commands/chmod-x.ts @@ -22,7 +22,7 @@ import fs from "node:fs"; * * @param file - The file to add execute permissions to */ -export function chmodPlusX(file: string): void { +export function chmodX(file: string): void { // Note: skip for windows as chmod does on exist there // and will error with `EACCES: permission denied` if (process.platform === "win32") { diff --git a/packages/cli/src/utilities/execute.ts b/packages/utils/cli-helpers/src/commands/execute.ts similarity index 59% rename from packages/cli/src/utilities/execute.ts rename to packages/utils/cli-helpers/src/commands/execute.ts index 33a66f37..0cae974a 100644 --- a/packages/cli/src/utilities/execute.ts +++ b/packages/utils/cli-helpers/src/commands/execute.ts @@ -16,6 +16,8 @@ -------------------------------------------------------------------*/ import { execaCommand } from "execa"; +import { CLICommandType } from "../types"; +import { getCommand } from "./get-command"; /** * Execute a CLI command @@ -27,7 +29,7 @@ import { execaCommand } from "execa"; * @param cwd - The current working directory to use when executing the command * @returns The result of the command or an exception */ -export const execute = (command: string, cwd: string) => { +export const execute = (command: string, cwd: string = process.cwd()) => { return execaCommand(command, { preferLocal: true, shell: true, @@ -35,3 +37,28 @@ export const execute = (command: string, cwd: string) => { cwd }); }; + +/** + * Execute a CLI command + * + * @remarks + * This function is a wrapper around the execa command to run CLI commands + * + * @param command - The command to execute + * @param args - The arguments to pass to the command + * @param cwd - The current working directory to use when executing the command + * @returns The result of the command or an exception + */ +export const executePackage = async ( + packageName: string, + args: string[] = [], + cwd?: string +) => { + const result = await getCommand( + CLICommandType.EXECUTE, + [packageName, ...args], + cwd + ); + + return execute(`${result.command} ${result.args.join(" ")}`, cwd); +}; diff --git a/packages/cli/src/utilities/execute-command.ts b/packages/utils/cli-helpers/src/commands/get-command.ts similarity index 74% rename from packages/cli/src/utilities/execute-command.ts rename to packages/utils/cli-helpers/src/commands/get-command.ts index b2601726..08023823 100644 --- a/packages/cli/src/utilities/execute-command.ts +++ b/packages/utils/cli-helpers/src/commands/get-command.ts @@ -15,27 +15,26 @@ -------------------------------------------------------------------*/ -import { detect, getCommand } from "@antfu/ni"; -import { CLICommandType } from "../types"; -import { execute } from "./execute"; +import { detect, getCommand as getCommandBase } from "@antfu/ni"; +import { CLICommandType, ResolvedCommand } from "../types"; /** - * Execute a CLI command + * Get the details of a CLI command for execution * * @remarks - * This function is a wrapper around the execa command to run CLI commands + * This function is a wrapper around the @antfu/ni command to run CLI commands * * @param command - The command to execute * @param args - The arguments to pass to the command * @param cwd - The current working directory to use when executing the command * @returns The result of the command or an exception */ -export const executeCommand = async ( +export const getCommand = async ( command: CLICommandType = CLICommandType.EXECUTE, - args?: string[], - cwd: string = "./" -) => { - const result = getCommand( + args: string[] = [], + cwd?: string +): Promise => { + return getCommandBase( (await detect({ autoInstall: true, cwd, @@ -44,6 +43,4 @@ export const executeCommand = async ( command, args ); - - return execute(`${result.command} ${result.args.join(" ")}`, cwd); }; diff --git a/packages/utils/cli-helpers/src/commands/index.ts b/packages/utils/cli-helpers/src/commands/index.ts new file mode 100644 index 00000000..ebbd24c1 --- /dev/null +++ b/packages/utils/cli-helpers/src/commands/index.ts @@ -0,0 +1,21 @@ +/*------------------------------------------------------------------- + + ⚡ Storm Software - Storm Stack + + This code was released as part of the Storm Stack project. Storm Stack + is maintained by Storm Software under the Apache-2.0 License, and is + free for commercial and private use. For more information, please visit + our licensing page. + + Website: https://stormsoftware.com + Repository: https://github.com/storm-software/storm-stack + Documentation: https://stormsoftware.com/projects/storm-stack/docs + Contact: https://stormsoftware.com/contact + License: https://stormsoftware.com/projects/storm-stack/license + + -------------------------------------------------------------------*/ + +export * from "./chmod-x"; +export * from "./execute"; +export * from "./get-command"; +export * from "./install"; diff --git a/packages/cli/src/utilities/install.ts b/packages/utils/cli-helpers/src/commands/install.ts similarity index 70% rename from packages/cli/src/utilities/install.ts rename to packages/utils/cli-helpers/src/commands/install.ts index 67c43c0d..158600ab 100644 --- a/packages/cli/src/utilities/install.ts +++ b/packages/utils/cli-helpers/src/commands/install.ts @@ -16,6 +16,8 @@ -------------------------------------------------------------------*/ import { installPackage, InstallPackageOptions } from "@antfu/install-pkg"; +import { resolve } from "node:path"; + /** * Install a package * @@ -29,3 +31,21 @@ export const install = ( ) => { return installPackage(names, options); }; + +/** + * Check if a package exists and install it if it does not + * + * @param name - The name of the package to check + * @param options - The options to use when installing the package + */ +export const packageExists = ( + name: string, + options?: InstallPackageOptions +) => { + const resolvePath = resolve(options?.cwd || process.cwd()); + try { + require.resolve(name, { paths: [resolvePath] }); + } catch { + install(name, options); + } +}; diff --git a/packages/utils/cli-helpers/src/index.ts b/packages/utils/cli-helpers/src/index.ts new file mode 100644 index 00000000..becbca51 --- /dev/null +++ b/packages/utils/cli-helpers/src/index.ts @@ -0,0 +1,31 @@ +/*------------------------------------------------------------------- + + ⚡ Storm Software - Storm Stack + + This code was released as part of the Storm Stack project. Storm Stack + is maintained by Storm Software under the Apache-2.0 License, and is + free for commercial and private use. For more information, please visit + our licensing page. + + Website: https://stormsoftware.com + Repository: https://github.com/storm-software/storm-stack + Documentation: https://stormsoftware.com/projects/storm-stack/docs + Contact: https://stormsoftware.com/contact + License: https://stormsoftware.com/projects/storm-stack/license + + -------------------------------------------------------------------*/ + +/** + * The CLI Helpers library used by Storm Software for building TypeScript applications. + * + * @remarks + * A package containing various CLI utilities and helper functions used by Storm Software + * + * @packageDocumentation + */ + +export * from "./checks"; +export * from "./commands"; +export * from "./options"; +export * from "./terminal"; +export * from "./types"; diff --git a/packages/cli/src/utilities/create-cli-options.ts b/packages/utils/cli-helpers/src/options/create-options.ts similarity index 100% rename from packages/cli/src/utilities/create-cli-options.ts rename to packages/utils/cli-helpers/src/options/create-options.ts diff --git a/packages/utils/cli-helpers/src/options/index.ts b/packages/utils/cli-helpers/src/options/index.ts new file mode 100644 index 00000000..cef9c8ac --- /dev/null +++ b/packages/utils/cli-helpers/src/options/index.ts @@ -0,0 +1,18 @@ +/*------------------------------------------------------------------- + + ⚡ Storm Software - Storm Stack + + This code was released as part of the Storm Stack project. Storm Stack + is maintained by Storm Software under the Apache-2.0 License, and is + free for commercial and private use. For more information, please visit + our licensing page. + + Website: https://stormsoftware.com + Repository: https://github.com/storm-software/storm-stack + Documentation: https://stormsoftware.com/projects/storm-stack/docs + Contact: https://stormsoftware.com/contact + License: https://stormsoftware.com/projects/storm-stack/license + + -------------------------------------------------------------------*/ + +export * from "./create-options"; diff --git a/packages/cli/src/utilities/cli-link.ts b/packages/utils/cli-helpers/src/terminal/cli-link.ts similarity index 100% rename from packages/cli/src/utilities/cli-link.ts rename to packages/utils/cli-helpers/src/terminal/cli-link.ts diff --git a/packages/utils/cli-helpers/src/terminal/index.ts b/packages/utils/cli-helpers/src/terminal/index.ts new file mode 100644 index 00000000..fb0fb5de --- /dev/null +++ b/packages/utils/cli-helpers/src/terminal/index.ts @@ -0,0 +1,19 @@ +/*------------------------------------------------------------------- + + ⚡ Storm Software - Storm Stack + + This code was released as part of the Storm Stack project. Storm Stack + is maintained by Storm Software under the Apache-2.0 License, and is + free for commercial and private use. For more information, please visit + our licensing page. + + Website: https://stormsoftware.com + Repository: https://github.com/storm-software/storm-stack + Documentation: https://stormsoftware.com/projects/storm-stack/docs + Contact: https://stormsoftware.com/contact + License: https://stormsoftware.com/projects/storm-stack/license + + -------------------------------------------------------------------*/ + +export * from "./cli-link"; +export * from "./write-banner"; diff --git a/packages/utils/cli-helpers/src/terminal/write-banner.ts b/packages/utils/cli-helpers/src/terminal/write-banner.ts new file mode 100644 index 00000000..976ad463 --- /dev/null +++ b/packages/utils/cli-helpers/src/terminal/write-banner.ts @@ -0,0 +1,59 @@ +/*------------------------------------------------------------------- + + ⚡ Storm Software - Storm Stack + + This code was released as part of the Storm Stack project. Storm Stack + is maintained by Storm Software under the Apache-2.0 License, and is + free for commercial and private use. For more information, please visit + our licensing page. + + Website: https://stormsoftware.com + Repository: https://github.com/storm-software/storm-stack + Documentation: https://stormsoftware.com/projects/storm-stack/docs + Contact: https://stormsoftware.com/contact + License: https://stormsoftware.com/projects/storm-stack/license + + -------------------------------------------------------------------*/ + +import { titleCase } from "@storm-stack/string-fns/title-case"; +import chalk from "chalk"; +import { text } from "figlet"; +import type { CLITitle } from "../types"; + +export const writeBanner = ( + bannerOpts: CLITitle, + byOpts: CLITitle, + color?: string +) => { + if (bannerOpts?.hide !== true) { + text( + titleCase(bannerOpts?.name ?? "Storm CLI")!, + bannerOpts?.options ?? { + font: bannerOpts?.font ?? "Larry 3D" + }, + (err, data) => { + if (err) { + return; + } + + // eslint-disable-next-line no-console + console.log(chalk.hex(color || "#FFF")(data)); + } + ); + + if (byOpts?.hide !== true) { + text( + `by ${titleCase(byOpts?.name ?? "Storm")}`, + byOpts?.options ?? { font: byOpts?.font ?? "Doom" }, + (err, data) => { + if (err) { + return; + } + + // eslint-disable-next-line no-console + console.log(chalk.hex(color || "#adbac7")(data)); + } + ); + } + } +}; diff --git a/packages/utils/cli-helpers/src/types.ts b/packages/utils/cli-helpers/src/types.ts new file mode 100644 index 00000000..e337afab --- /dev/null +++ b/packages/utils/cli-helpers/src/types.ts @@ -0,0 +1,110 @@ +/*------------------------------------------------------------------- + + ⚡ Storm Software - Storm Stack + + This code was released as part of the Storm Stack project. Storm Stack + is maintained by Storm Software under the Apache-2.0 License, and is + free for commercial and private use. For more information, please visit + our licensing page. + + Website: https://stormsoftware.com + Repository: https://github.com/storm-software/storm-stack + Documentation: https://stormsoftware.com/projects/storm-stack/docs + Contact: https://stormsoftware.com/contact + License: https://stormsoftware.com/projects/storm-stack/license + + -------------------------------------------------------------------*/ + +import { MaybePromise } from "@storm-stack/types/utility-types/base"; +import { Command } from "commander"; +import { Fonts, Options } from "figlet"; + +/** + * A resolved command with arguments using the current directories package manager + */ +export interface ResolvedCommand { + /** + * CLI command. + */ + command: string; + /** + * Arguments for the CLI command, merged with user arguments. + */ + args: string[]; +} + +export interface CLIConfig { + name: string; + banner?: CLITitle; + by?: CLITitle; + description: string; + homepageUrl?: string; + documentationUrl?: string; + repositoryUrl?: string; + license?: string; + licenseUrl?: string; + commands: CLICommand[]; + preAction: (command: Command) => MaybePromise; + postAction: (command: Command) => MaybePromise; +} + +export interface CLITitle { + name?: string; + font?: Fonts; + options?: Options; + hide?: boolean; +} + +export interface CLICommand { + name: string; + description: string; + commands?: CLICommand[]; + options?: CLIOption[]; + argument?: CLIArgument[]; + action: (...args: any[]) => MaybePromise; +} + +export interface CLIArgument { + flags: string; + description?: string; + default?: unknown | undefined; +} + +export interface CLIOption { + flags: string; + description: string | undefined; + choices?: string[]; + default?: CLIOptionDefault; +} + +export interface CLIOptionDefault { + value: unknown; + description?: string | undefined; +} + +export type CLICommandType = + | "agent" + | "run" + | "install" + | "frozen" + | "global" + | "add" + | "upgrade" + | "upgrade-interactive" + | "execute" + | "uninstall" + | "global_uninstall"; + +export const CLICommandType = { + AGENT: "agent" as CLICommandType, + RUN: "run" as CLICommandType, + INSTALL: "install" as CLICommandType, + FROZEN: "frozen" as CLICommandType, + GLOBAL: "global" as CLICommandType, + ADD: "add" as CLICommandType, + UPGRADE: "upgrade" as CLICommandType, + UPGRADE_INTERACTIVE: "upgrade-interactive" as CLICommandType, + EXECUTE: "execute" as CLICommandType, + UNINSTALL: "uninstall" as CLICommandType, + GLOBAL_UNINSTALL: "global_uninstall" as CLICommandType +}; diff --git a/packages/utils/cli-helpers/tsconfig.json b/packages/utils/cli-helpers/tsconfig.json new file mode 100644 index 00000000..078ce2b3 --- /dev/null +++ b/packages/utils/cli-helpers/tsconfig.json @@ -0,0 +1,11 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "../../../dist/out-tsc", + "noEmit": true + }, + "files": [], + "include": ["src/**/*.ts", "src/**/*.js", "bin/**/*"], + "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"], + "composite": true +} diff --git a/packages/utils/cli-helpers/tsconfig.spec.json b/packages/utils/cli-helpers/tsconfig.spec.json new file mode 100644 index 00000000..f8bfbb68 --- /dev/null +++ b/packages/utils/cli-helpers/tsconfig.spec.json @@ -0,0 +1,13 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../dist/out-tsc", + "types": ["jest", "node"] + }, + "include": [ + "jest.config.ts", + "src/**/*.test.ts", + "src/**/*.spec.ts", + "src/**/*.d.ts" + ] +} diff --git a/packages/errors/CHANGELOG.md b/packages/utils/errors/CHANGELOG.md similarity index 87% rename from packages/errors/CHANGELOG.md rename to packages/utils/errors/CHANGELOG.md index 5381949c..2e7fb964 100644 --- a/packages/errors/CHANGELOG.md +++ b/packages/utils/errors/CHANGELOG.md @@ -2,256 +2,266 @@ ### Features -- **monorepo:** Upgrade workflow actions to use the new base processes ([14d2f2f](https://github.com/storm-software/storm-stack/commit/14d2f2f)) +- **monorepo:** Upgrade workflow actions to use the new base processes + ([14d2f2f](https://github.com/storm-software/storm-stack/commit/14d2f2f)) ## 1.39.0 (2024-11-10) ### Features -- **date-time:** Resolve issue parsing ISO string in `StormDateTime` constructor ([c8032d6](https://github.com/storm-software/storm-stack/commit/c8032d6)) +- **date-time:** Resolve issue parsing ISO string in `StormDateTime` constructor + ([c8032d6](https://github.com/storm-software/storm-stack/commit/c8032d6)) ## 1.38.0 (2024-11-10) ### Features -- **cli:** Added `@antfu/install-pkg` to improve install ([26cf962](https://github.com/storm-software/storm-stack/commit/26cf962)) +- **cli:** Added `@antfu/install-pkg` to improve install + ([26cf962](https://github.com/storm-software/storm-stack/commit/26cf962)) ## 1.37.0 (2024-11-10) ### Features -- **cli:** Added the `execute` and `install` utility functions ([8b04259](https://github.com/storm-software/storm-stack/commit/8b04259)) +- **cli:** Added the `execute` and `install` utility functions + ([8b04259](https://github.com/storm-software/storm-stack/commit/8b04259)) ## 1.36.0 (2024-11-08) ### Features -- **monorepo:** Upgrade the workspace's Nx package versions ([075a024](https://github.com/storm-software/storm-stack/commit/075a024)) +- **monorepo:** Upgrade the workspace's Nx package versions + ([075a024](https://github.com/storm-software/storm-stack/commit/075a024)) ## 1.35.0 (2024-11-08) ### Features -- **types:** Regenerate packages with upgraded ops packages ([936026a](https://github.com/storm-software/storm-stack/commit/936026a)) +- **types:** Regenerate packages with upgraded ops packages + ([936026a](https://github.com/storm-software/storm-stack/commit/936026a)) ## 1.34.0 (2024-11-08) - ### Features -- **errors:** Added the `createFromData` helper function ([c15576d](https://github.com/storm-software/storm-stack/commit/c15576d)) +- **errors:** Added the `createFromData` helper function + ([c15576d](https://github.com/storm-software/storm-stack/commit/c15576d)) ## 1.33.0 (2024-11-07) - ### Features -- **date-time:** Added the `getMonthIndex` helper function ([8d979d2](https://github.com/storm-software/storm-stack/commit/8d979d2)) +- **date-time:** Added the `getMonthIndex` helper function + ([8d979d2](https://github.com/storm-software/storm-stack/commit/8d979d2)) ## 1.32.3 (2024-10-31) - ### Bug Fixes -- **date-time:** Resolve issue with incorrectly exporting classes ([140d576](https://github.com/storm-software/storm-stack/commit/140d576)) +- **date-time:** Resolve issue with incorrectly exporting classes + ([140d576](https://github.com/storm-software/storm-stack/commit/140d576)) ## 1.32.2 (2024-10-27) - ### Bug Fixes -- **date-time:** Update static function to no longer be constants ([f366ffe](https://github.com/storm-software/storm-stack/commit/f366ffe)) +- **date-time:** Update static function to no longer be constants + ([f366ffe](https://github.com/storm-software/storm-stack/commit/f366ffe)) ## 1.32.1 (2024-10-26) - ### Bug Fixes -- **hooks:** Resolve issue updating element reference in `useHook` hook ([340e2f4](https://github.com/storm-software/storm-stack/commit/340e2f4)) +- **hooks:** Resolve issue updating element reference in `useHook` hook + ([340e2f4](https://github.com/storm-software/storm-stack/commit/340e2f4)) ## 1.32.0 (2024-10-26) - ### Features -- **types:** Added the `isFileResult` type-checker and updated `status` field ([2fc6410](https://github.com/storm-software/storm-stack/commit/2fc6410)) +- **types:** Added the `isFileResult` type-checker and updated `status` field + ([2fc6410](https://github.com/storm-software/storm-stack/commit/2fc6410)) ## 1.31.2 (2024-10-24) - ### Bug Fixes -- **date-time:** Update the conditionals in validate functions ([f5f4e26](https://github.com/storm-software/storm-stack/commit/f5f4e26)) +- **date-time:** Update the conditionals in validate functions + ([f5f4e26](https://github.com/storm-software/storm-stack/commit/f5f4e26)) ## 1.31.1 (2024-10-24) - ### Bug Fixes -- **date-time:** Resolve issue with the date-time format functions ([f385b23](https://github.com/storm-software/storm-stack/commit/f385b23)) +- **date-time:** Resolve issue with the date-time format functions + ([f385b23](https://github.com/storm-software/storm-stack/commit/f385b23)) ## 1.31.0 (2024-10-24) - ### Features -- **hooks:** Added the `composeRefs` function and hook ([80a1379](https://github.com/storm-software/storm-stack/commit/80a1379)) +- **hooks:** Added the `composeRefs` function and hook + ([80a1379](https://github.com/storm-software/storm-stack/commit/80a1379)) ## 1.30.0 (2024-10-22) - ### Features -- **monorepo:** Use latest storm build tools in monorepo ([6bf00c5](https://github.com/storm-software/storm-stack/commit/6bf00c5)) +- **monorepo:** Use latest storm build tools in monorepo + ([6bf00c5](https://github.com/storm-software/storm-stack/commit/6bf00c5)) ## 1.29.2 (2024-10-20) - ### Bug Fixes -- **date-time:** Resolve issue with parsing ISO-8601 string ([a63273e](https://github.com/storm-software/storm-stack/commit/a63273e)) +- **date-time:** Resolve issue with parsing ISO-8601 string + ([a63273e](https://github.com/storm-software/storm-stack/commit/a63273e)) ## 1.29.1 (2024-10-20) - ### Bug Fixes -- **date-time:** Resolved issue with creating date-time in validation function ([2a3c1e8](https://github.com/storm-software/storm-stack/commit/2a3c1e8)) +- **date-time:** Resolved issue with creating date-time in validation function + ([2a3c1e8](https://github.com/storm-software/storm-stack/commit/2a3c1e8)) ## 1.29.0 (2024-10-18) - ### Features -- **date-time:** Provide time zone to the formatting function ([318ab55](https://github.com/storm-software/storm-stack/commit/318ab55)) +- **date-time:** Provide time zone to the formatting function + ([318ab55](https://github.com/storm-software/storm-stack/commit/318ab55)) ## 1.28.0 (2024-10-18) - ### Features -- **errors:** Added helper function to `StormError` to quickly create with specific types ([6ffdb40](https://github.com/storm-software/storm-stack/commit/6ffdb40)) +- **errors:** Added helper function to `StormError` to quickly create with + specific types + ([6ffdb40](https://github.com/storm-software/storm-stack/commit/6ffdb40)) -- **date-time:** Added the static validate method to the `StormDateTime` utility classes ([3169747](https://github.com/storm-software/storm-stack/commit/3169747)) +- **date-time:** Added the static validate method to the `StormDateTime` utility + classes + ([3169747](https://github.com/storm-software/storm-stack/commit/3169747)) ## 1.27.0 (2024-10-18) - ### Features -- **date-time:** Added new flags to formatting options for helper functions ([b702d6c](https://github.com/storm-software/storm-stack/commit/b702d6c)) - +- **date-time:** Added new flags to formatting options for helper functions + ([b702d6c](https://github.com/storm-software/storm-stack/commit/b702d6c)) ### Bug Fixes -- **serialization:** Resolved stack overflow issue with `StormParser` class ([f890df9](https://github.com/storm-software/storm-stack/commit/f890df9)) +- **serialization:** Resolved stack overflow issue with `StormParser` class + ([f890df9](https://github.com/storm-software/storm-stack/commit/f890df9)) ## 1.26.0 (2024-10-15) - ### Features -- **types:** Added the `index` and `status` properties to the `SelectOption` type ([7da9603](https://github.com/storm-software/storm-stack/commit/7da9603)) +- **types:** Added the `index` and `status` properties to the `SelectOption` + type ([7da9603](https://github.com/storm-software/storm-stack/commit/7da9603)) ## 1.25.0 (2024-10-14) - ### Features -- **types:** Added the `description` property to the `SelectOption` type ([94c33d2](https://github.com/storm-software/storm-stack/commit/94c33d2)) +- **types:** Added the `description` property to the `SelectOption` type + ([94c33d2](https://github.com/storm-software/storm-stack/commit/94c33d2)) ## 1.24.0 (2024-10-11) - ### Features -- **types:** Added the `help` and `success` ValidationDetail message types ([207bf67](https://github.com/storm-software/storm-stack/commit/207bf67)) +- **types:** Added the `help` and `success` ValidationDetail message types + ([207bf67](https://github.com/storm-software/storm-stack/commit/207bf67)) ## 1.23.0 (2024-10-10) - ### Features -- **utilities:** Added the `toPath` and `toDeepKey` functions ([1977f13](https://github.com/storm-software/storm-stack/commit/1977f13)) +- **utilities:** Added the `toPath` and `toDeepKey` functions + ([1977f13](https://github.com/storm-software/storm-stack/commit/1977f13)) ## 1.22.2 (2024-10-10) - ### Bug Fixes -- **monorepo:** Regenerate markup after token update ([a37ef2a](https://github.com/storm-software/storm-stack/commit/a37ef2a)) +- **monorepo:** Regenerate markup after token update + ([a37ef2a](https://github.com/storm-software/storm-stack/commit/a37ef2a)) ## 1.22.1 (2024-10-10) - ### Bug Fixes -- **types:** Added missing tags and regenerated markdown ([7ab98cc](https://github.com/storm-software/storm-stack/commit/7ab98cc)) +- **types:** Added missing tags and regenerated markdown + ([7ab98cc](https://github.com/storm-software/storm-stack/commit/7ab98cc)) ## 1.22.0 (2024-10-10) - ### Features -- **utilities:** Update the base Nx configuration ([99988e0](https://github.com/storm-software/storm-stack/commit/99988e0)) - +- **utilities:** Update the base Nx configuration + ([99988e0](https://github.com/storm-software/storm-stack/commit/99988e0)) ### Bug Fixes -- **monorepo:** Update the Nx configuration to include release process specifications ([df311f7](https://github.com/storm-software/storm-stack/commit/df311f7)) +- **monorepo:** Update the Nx configuration to include release process + specifications + ([df311f7](https://github.com/storm-software/storm-stack/commit/df311f7)) ## 1.21.4 (2024-10-10) - ### Bug Fixes -- **monorepo:** Regenerate the README file formatting ([b81153c](https://github.com/storm-software/storm-stack/commit/b81153c)) +- **monorepo:** Regenerate the README file formatting + ([b81153c](https://github.com/storm-software/storm-stack/commit/b81153c)) ## 1.21.3 (2024-10-09) - ### Bug Fixes -- **utilities:** Reformatting the README files ([723d68b](https://github.com/storm-software/storm-stack/commit/723d68b)) +- **utilities:** Reformatting the README files + ([723d68b](https://github.com/storm-software/storm-stack/commit/723d68b)) ## 1.21.2 (2024-10-08) - ### Bug Fixes -- **types:** Regenerate the monorepo markdown files ([2b5818e](https://github.com/storm-software/storm-stack/commit/2b5818e)) +- **types:** Regenerate the monorepo markdown files + ([2b5818e](https://github.com/storm-software/storm-stack/commit/2b5818e)) ## 1.21.1 (2024-10-08) - ### Bug Fixes -- **monorepo:** Resolve issue with markdown across entire monorepo ([ee6720c](https://github.com/storm-software/storm-stack/commit/ee6720c)) +- **monorepo:** Resolve issue with markdown across entire monorepo + ([ee6720c](https://github.com/storm-software/storm-stack/commit/ee6720c)) ## 1.21.0 (2024-10-08) - ### Features -- **utilities:** Added the flatten and unflatten utility functions and helper types ([702d44d](https://github.com/storm-software/storm-stack/commit/702d44d)) +- **utilities:** Added the flatten and unflatten utility functions and helper + types + ([702d44d](https://github.com/storm-software/storm-stack/commit/702d44d)) -- **errors:** Added the `ErrorType` concept to separate error data behavior ([cfffb39](https://github.com/storm-software/storm-stack/commit/cfffb39)) +- **errors:** Added the `ErrorType` concept to separate error data behavior + ([cfffb39](https://github.com/storm-software/storm-stack/commit/cfffb39)) ## 1.20.1 (2024-09-15) - ### Bug Fixes -- **monorepo:** Resolve issues in git hook configurations ([f925f93](https://github.com/storm-software/storm-stack/commit/f925f93)) +- **monorepo:** Resolve issues in git hook configurations + ([f925f93](https://github.com/storm-software/storm-stack/commit/f925f93)) ## 1.20.0 (2024-09-14) - ### Features -- **file-system:** Added banner to source control ([0c7bafc](https://github.com/storm-software/storm-stack/commit/0c7bafc)) - - +- **file-system:** Added banner to source control + ([0c7bafc](https://github.com/storm-software/storm-stack/commit/0c7bafc)) ## 1.18.0 (2024-02-10) diff --git a/packages/errors/README.md b/packages/utils/errors/README.md similarity index 98% rename from packages/errors/README.md rename to packages/utils/errors/README.md index 5fa07724..653c4758 100644 --- a/packages/errors/README.md +++ b/packages/utils/errors/README.md @@ -42,11 +42,12 @@ This package is part of the ⚡Storm Stack monorepo. Storm Stack packages # Storm Errors Package This package provides a wrapper for the JavaScript `Error` object and a simple -way to create custom errors through error code strings that can be used +way to create custom utils-errors through error code strings that can be used throughout your application. + ## Table of Contents - [Installing](#installing) @@ -72,14 +73,14 @@ throughout your application. Using [pnpm](http://pnpm.io): ```bash -pnpm add -D @storm-stack/errors +pnpm add -D @storm-stack/utils-errors ```
Using npm ```bash -npm install -D @storm-stack/errors +npm install -D @storm-stack/utils-errors ```
@@ -88,7 +89,7 @@ npm install -D @storm-stack/errors Using yarn ```bash -yarn add -D @storm-stack/errors +yarn add -D @storm-stack/utils-errors ``` diff --git a/packages/errors/package.json b/packages/utils/errors/package.json similarity index 93% rename from packages/errors/package.json rename to packages/utils/errors/package.json index 8c8b87c2..3a994aca 100644 --- a/packages/errors/package.json +++ b/packages/utils/errors/package.json @@ -6,7 +6,7 @@ "repository": { "type": "github", "url": "https://github.com/storm-software/storm-stack.git", - "directory": "packages/errors" + "directory": "packages/utils/errors" }, "private": false, "dependencies": { diff --git a/packages/file-system/project.json b/packages/utils/errors/project.json similarity index 64% rename from packages/file-system/project.json rename to packages/utils/errors/project.json index 5fdb72d1..0fe6999a 100644 --- a/packages/file-system/project.json +++ b/packages/utils/errors/project.json @@ -1,8 +1,8 @@ { - "name": "file-system", - "$schema": "../../node_modules/nx/schemas/project-schema.json", + "name": "utils-errors", + "$schema": "../../../node_modules/nx/schemas/project-schema.json", "projectType": "library", - "sourceRoot": "packages/file-system/src", + "sourceRoot": "packages/utils/errors/src", "targets": { "build": { "cache": true, @@ -12,10 +12,10 @@ "defaultConfiguration": "production", "clean": true, "options": { - "type": "packages/file-system/src/index.ts", - "outputPath": "dist/packages/file-system", - "tsConfig": "packages/file-system/tsconfig.json", - "project": "packages/file-system/package.json" + "type": "packages/utils/errors/src/index.ts", + "outputPath": "dist/packages/utils/errors", + "tsConfig": "packages/utils/errors/tsconfig.json", + "project": "packages/utils/errors/package.json" }, "configurations": { "production": { diff --git a/packages/errors/src/errors.ts b/packages/utils/errors/src/errors.ts similarity index 100% rename from packages/errors/src/errors.ts rename to packages/utils/errors/src/errors.ts diff --git a/packages/errors/src/index.ts b/packages/utils/errors/src/index.ts similarity index 100% rename from packages/errors/src/index.ts rename to packages/utils/errors/src/index.ts diff --git a/packages/errors/src/storm-error.ts b/packages/utils/errors/src/storm-error.ts similarity index 99% rename from packages/errors/src/storm-error.ts rename to packages/utils/errors/src/storm-error.ts index 8e475773..4687a7e5 100644 --- a/packages/errors/src/storm-error.ts +++ b/packages/utils/errors/src/storm-error.ts @@ -15,7 +15,7 @@ -------------------------------------------------------------------*/ -import { Serializable } from "@storm-stack/serialization"; +import { Serializable } from "@storm-stack/serialization/serializable"; import { EMPTY_STRING, ErrorMessageDetails, diff --git a/packages/errors/src/types.ts b/packages/utils/errors/src/types.ts similarity index 100% rename from packages/errors/src/types.ts rename to packages/utils/errors/src/types.ts diff --git a/packages/errors/src/utilities/default-value-helpers.ts b/packages/utils/errors/src/utilities/default-value-helpers.ts similarity index 100% rename from packages/errors/src/utilities/default-value-helpers.ts rename to packages/utils/errors/src/utilities/default-value-helpers.ts diff --git a/packages/errors/src/utilities/index.ts b/packages/utils/errors/src/utilities/index.ts similarity index 100% rename from packages/errors/src/utilities/index.ts rename to packages/utils/errors/src/utilities/index.ts diff --git a/packages/errors/src/utilities/serialization.ts b/packages/utils/errors/src/utilities/serialization.ts similarity index 86% rename from packages/errors/src/utilities/serialization.ts rename to packages/utils/errors/src/utilities/serialization.ts index 543e85d2..7533a9b3 100644 --- a/packages/errors/src/utilities/serialization.ts +++ b/packages/utils/errors/src/utilities/serialization.ts @@ -15,10 +15,11 @@ -------------------------------------------------------------------*/ -import type { JsonObject, JsonValue } from "@storm-stack/serialization"; -import { isSetObject } from "@storm-stack/types"; +import type { JsonObject, JsonValue } from "@storm-stack/serialization/types"; +import { isSetObject } from "@storm-stack/types/type-checks/is-set-object"; import { ErrorCode } from "../errors"; import { StormError } from "../storm-error"; +import { ErrorType } from "../types"; /** * Serializes a StormError into a JSON object @@ -42,7 +43,9 @@ export function serializeStormError(error: StormError): JsonValue { * @param error - The error to deserialize * @returns The deserialized error */ -export function deserializeStormError(json: JsonValue): StormError { +export function deserializeStormError( + json: JsonValue +): StormError { if (isSetObject(json)) { const { code, message, stack, data, cause } = json as JsonObject; @@ -51,7 +54,7 @@ export function deserializeStormError(json: JsonValue): StormError { { message: String(message), stack: String(stack), - data: String(data) + data: data ?? String(data) } ); @@ -65,7 +68,7 @@ export function deserializeStormError(json: JsonValue): StormError { return error; } - return new StormError(ErrorCode.internal_server_error, { + return StormError.createException({ message: "Could not read server response" }); } diff --git a/packages/errors/tsconfig.json b/packages/utils/errors/tsconfig.json similarity index 67% rename from packages/errors/tsconfig.json rename to packages/utils/errors/tsconfig.json index 0c7ac69f..a8dd0665 100644 --- a/packages/errors/tsconfig.json +++ b/packages/utils/errors/tsconfig.json @@ -1,7 +1,7 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { - "outDir": "../../dist/out-tsc", + "outDir": "../../../dist/out-tsc", "types": ["node"] }, "include": ["src/**/*.ts", "src/**/*.js"], diff --git a/packages/utils/errors/tsconfig.spec.json b/packages/utils/errors/tsconfig.spec.json new file mode 100644 index 00000000..f8bfbb68 --- /dev/null +++ b/packages/utils/errors/tsconfig.spec.json @@ -0,0 +1,13 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../dist/out-tsc", + "types": ["jest", "node"] + }, + "include": [ + "jest.config.ts", + "src/**/*.test.ts", + "src/**/*.spec.ts", + "src/**/*.d.ts" + ] +} diff --git a/packages/file-system/CHANGELOG.md b/packages/utils/file-system/CHANGELOG.md similarity index 90% rename from packages/file-system/CHANGELOG.md rename to packages/utils/file-system/CHANGELOG.md index 2824ec28..c811a31a 100644 --- a/packages/file-system/CHANGELOG.md +++ b/packages/utils/file-system/CHANGELOG.md @@ -2,219 +2,223 @@ ### Features -- **file-system:** Added the `getEnvPaths` utility function ([7dae4df](https://github.com/storm-software/storm-stack/commit/7dae4df)) +- **file-system:** Added the `getEnvPaths` utility function + ([7dae4df](https://github.com/storm-software/storm-stack/commit/7dae4df)) ## 1.38.0 (2024-11-10) ### Features -- **date-time:** Resolve issue parsing ISO string in `StormDateTime` constructor ([c8032d6](https://github.com/storm-software/storm-stack/commit/c8032d6)) +- **date-time:** Resolve issue parsing ISO string in `StormDateTime` constructor + ([c8032d6](https://github.com/storm-software/storm-stack/commit/c8032d6)) ## 1.37.0 (2024-11-10) ### Features -- **cli:** Added the `execute` and `install` utility functions ([8b04259](https://github.com/storm-software/storm-stack/commit/8b04259)) +- **cli:** Added the `execute` and `install` utility functions + ([8b04259](https://github.com/storm-software/storm-stack/commit/8b04259)) ## 1.36.0 (2024-11-08) ### Features -- **types:** Regenerate packages with upgraded ops packages ([936026a](https://github.com/storm-software/storm-stack/commit/936026a)) +- **types:** Regenerate packages with upgraded ops packages + ([936026a](https://github.com/storm-software/storm-stack/commit/936026a)) ## 1.35.0 (2024-11-07) - ### Features -- **date-time:** Added the `getMonthIndex` helper function ([8d979d2](https://github.com/storm-software/storm-stack/commit/8d979d2)) +- **date-time:** Added the `getMonthIndex` helper function + ([8d979d2](https://github.com/storm-software/storm-stack/commit/8d979d2)) ## 1.34.2 (2024-10-27) - ### Bug Fixes -- **date-time:** Update static function to no longer be constants ([f366ffe](https://github.com/storm-software/storm-stack/commit/f366ffe)) +- **date-time:** Update static function to no longer be constants + ([f366ffe](https://github.com/storm-software/storm-stack/commit/f366ffe)) ## 1.34.1 (2024-10-26) - ### Bug Fixes -- **hooks:** Resolve issue updating element reference in `useHook` hook ([340e2f4](https://github.com/storm-software/storm-stack/commit/340e2f4)) +- **hooks:** Resolve issue updating element reference in `useHook` hook + ([340e2f4](https://github.com/storm-software/storm-stack/commit/340e2f4)) ## 1.34.0 (2024-10-26) - ### Features -- **types:** Added the `isFileResult` type-checker and updated `status` field ([2fc6410](https://github.com/storm-software/storm-stack/commit/2fc6410)) +- **types:** Added the `isFileResult` type-checker and updated `status` field + ([2fc6410](https://github.com/storm-software/storm-stack/commit/2fc6410)) ## 1.33.2 (2024-10-24) - ### Bug Fixes -- **date-time:** Update the conditionals in validate functions ([f5f4e26](https://github.com/storm-software/storm-stack/commit/f5f4e26)) +- **date-time:** Update the conditionals in validate functions + ([f5f4e26](https://github.com/storm-software/storm-stack/commit/f5f4e26)) ## 1.33.1 (2024-10-24) - ### Bug Fixes -- **date-time:** Resolve issue with the date-time format functions ([f385b23](https://github.com/storm-software/storm-stack/commit/f385b23)) +- **date-time:** Resolve issue with the date-time format functions + ([f385b23](https://github.com/storm-software/storm-stack/commit/f385b23)) ## 1.33.0 (2024-10-24) - ### Features -- **hooks:** Added the `composeRefs` function and hook ([80a1379](https://github.com/storm-software/storm-stack/commit/80a1379)) +- **hooks:** Added the `composeRefs` function and hook + ([80a1379](https://github.com/storm-software/storm-stack/commit/80a1379)) ## 1.32.0 (2024-10-22) - ### Features -- **monorepo:** Use latest storm build tools in monorepo ([6bf00c5](https://github.com/storm-software/storm-stack/commit/6bf00c5)) +- **monorepo:** Use latest storm build tools in monorepo + ([6bf00c5](https://github.com/storm-software/storm-stack/commit/6bf00c5)) ## 1.31.2 (2024-10-20) - ### Bug Fixes -- **date-time:** Resolve issue with parsing ISO-8601 string ([a63273e](https://github.com/storm-software/storm-stack/commit/a63273e)) +- **date-time:** Resolve issue with parsing ISO-8601 string + ([a63273e](https://github.com/storm-software/storm-stack/commit/a63273e)) ## 1.31.1 (2024-10-20) - ### Bug Fixes -- **date-time:** Resolved issue with creating date-time in validation function ([2a3c1e8](https://github.com/storm-software/storm-stack/commit/2a3c1e8)) +- **date-time:** Resolved issue with creating date-time in validation function + ([2a3c1e8](https://github.com/storm-software/storm-stack/commit/2a3c1e8)) ## 1.31.0 (2024-10-18) - ### Features -- **date-time:** Provide time zone to the formatting function ([318ab55](https://github.com/storm-software/storm-stack/commit/318ab55)) +- **date-time:** Provide time zone to the formatting function + ([318ab55](https://github.com/storm-software/storm-stack/commit/318ab55)) ## 1.30.0 (2024-10-18) - ### Features -- **date-time:** Added new flags to formatting options for helper functions ([b702d6c](https://github.com/storm-software/storm-stack/commit/b702d6c)) - +- **date-time:** Added new flags to formatting options for helper functions + ([b702d6c](https://github.com/storm-software/storm-stack/commit/b702d6c)) ### Bug Fixes -- **serialization:** Resolved stack overflow issue with `StormParser` class ([f890df9](https://github.com/storm-software/storm-stack/commit/f890df9)) +- **serialization:** Resolved stack overflow issue with `StormParser` class + ([f890df9](https://github.com/storm-software/storm-stack/commit/f890df9)) ## 1.29.0 (2024-10-15) - ### Features -- **types:** Added the `index` and `status` properties to the `SelectOption` type ([7da9603](https://github.com/storm-software/storm-stack/commit/7da9603)) +- **types:** Added the `index` and `status` properties to the `SelectOption` + type ([7da9603](https://github.com/storm-software/storm-stack/commit/7da9603)) ## 1.28.0 (2024-10-14) - ### Features -- **types:** Added the `description` property to the `SelectOption` type ([94c33d2](https://github.com/storm-software/storm-stack/commit/94c33d2)) +- **types:** Added the `description` property to the `SelectOption` type + ([94c33d2](https://github.com/storm-software/storm-stack/commit/94c33d2)) ## 1.27.0 (2024-10-11) - ### Features -- **types:** Added the `help` and `success` ValidationDetail message types ([207bf67](https://github.com/storm-software/storm-stack/commit/207bf67)) +- **types:** Added the `help` and `success` ValidationDetail message types + ([207bf67](https://github.com/storm-software/storm-stack/commit/207bf67)) ## 1.26.0 (2024-10-10) - ### Features -- **utilities:** Added the `toPath` and `toDeepKey` functions ([1977f13](https://github.com/storm-software/storm-stack/commit/1977f13)) +- **utilities:** Added the `toPath` and `toDeepKey` functions + ([1977f13](https://github.com/storm-software/storm-stack/commit/1977f13)) ## 1.25.2 (2024-10-10) - ### Bug Fixes -- **monorepo:** Regenerate markup after token update ([a37ef2a](https://github.com/storm-software/storm-stack/commit/a37ef2a)) +- **monorepo:** Regenerate markup after token update + ([a37ef2a](https://github.com/storm-software/storm-stack/commit/a37ef2a)) ## 1.25.1 (2024-10-10) - ### Bug Fixes -- **types:** Added missing tags and regenerated markdown ([7ab98cc](https://github.com/storm-software/storm-stack/commit/7ab98cc)) +- **types:** Added missing tags and regenerated markdown + ([7ab98cc](https://github.com/storm-software/storm-stack/commit/7ab98cc)) ## 1.25.0 (2024-10-10) - ### Features -- **utilities:** Update the base Nx configuration ([99988e0](https://github.com/storm-software/storm-stack/commit/99988e0)) - +- **utilities:** Update the base Nx configuration + ([99988e0](https://github.com/storm-software/storm-stack/commit/99988e0)) ### Bug Fixes -- **monorepo:** Update the Nx configuration to include release process specifications ([df311f7](https://github.com/storm-software/storm-stack/commit/df311f7)) +- **monorepo:** Update the Nx configuration to include release process + specifications + ([df311f7](https://github.com/storm-software/storm-stack/commit/df311f7)) ## 1.24.4 (2024-10-10) - ### Bug Fixes -- **monorepo:** Regenerate the README file formatting ([b81153c](https://github.com/storm-software/storm-stack/commit/b81153c)) +- **monorepo:** Regenerate the README file formatting + ([b81153c](https://github.com/storm-software/storm-stack/commit/b81153c)) ## 1.24.3 (2024-10-09) - ### Bug Fixes -- **utilities:** Reformatting the README files ([723d68b](https://github.com/storm-software/storm-stack/commit/723d68b)) +- **utilities:** Reformatting the README files + ([723d68b](https://github.com/storm-software/storm-stack/commit/723d68b)) ## 1.24.2 (2024-10-08) - ### Bug Fixes -- **types:** Regenerate the monorepo markdown files ([2b5818e](https://github.com/storm-software/storm-stack/commit/2b5818e)) +- **types:** Regenerate the monorepo markdown files + ([2b5818e](https://github.com/storm-software/storm-stack/commit/2b5818e)) ## 1.24.1 (2024-10-08) - ### Bug Fixes -- **monorepo:** Resolve issue with markdown across entire monorepo ([ee6720c](https://github.com/storm-software/storm-stack/commit/ee6720c)) +- **monorepo:** Resolve issue with markdown across entire monorepo + ([ee6720c](https://github.com/storm-software/storm-stack/commit/ee6720c)) ## 1.24.0 (2024-10-08) - ### Features -- **utilities:** Added the flatten and unflatten utility functions and helper types ([702d44d](https://github.com/storm-software/storm-stack/commit/702d44d)) +- **utilities:** Added the flatten and unflatten utility functions and helper + types + ([702d44d](https://github.com/storm-software/storm-stack/commit/702d44d)) ## 1.23.1 (2024-09-15) - ### Bug Fixes -- **monorepo:** Resolve issues in git hook configurations ([f925f93](https://github.com/storm-software/storm-stack/commit/f925f93)) +- **monorepo:** Resolve issues in git hook configurations + ([f925f93](https://github.com/storm-software/storm-stack/commit/f925f93)) ## 1.23.0 (2024-09-14) - ### Features -- **file-system:** Added banner to source control ([0c7bafc](https://github.com/storm-software/storm-stack/commit/0c7bafc)) - - +- **file-system:** Added banner to source control + ([0c7bafc](https://github.com/storm-software/storm-stack/commit/0c7bafc)) ## 1.21.0 (2024-02-10) diff --git a/packages/file-system/README.md b/packages/utils/file-system/README.md similarity index 97% rename from packages/file-system/README.md rename to packages/utils/file-system/README.md index 5ce4ba3f..0ac61c42 100644 --- a/packages/file-system/README.md +++ b/packages/utils/file-system/README.md @@ -39,12 +39,13 @@ This package is part of the ⚡Storm Stack monorepo. Storm Stack packages -# file-system +# utils-file-system A utility package containing various methods used to manipulate files + ## Table of Contents - [Installing](#installing) @@ -70,14 +71,14 @@ A utility package containing various methods used to manipulate files Using [pnpm](http://pnpm.io): ```bash -pnpm add -D @storm-stack/file-system +pnpm add -D @storm-stack/utils-file-system ```
Using npm ```bash -npm install -D @storm-stack/file-system +npm install -D @storm-stack/utils-file-system ```
@@ -86,7 +87,7 @@ npm install -D @storm-stack/file-system Using yarn ```bash -yarn add -D @storm-stack/file-system +yarn add -D @storm-stack/utils-file-system ``` @@ -105,16 +106,17 @@ commands are available to assist in development. ### Building -Run `nx build file-system` to build the library. +Run `nx build utils-file-system` to build the library. ### Running unit tests -Run `nx test file-system` to execute the unit tests via +Run `nx test utils-file-system` to execute the unit tests via [Jest](https://jestjs.io). ### Linting -Run `nx lint file-system` to run [ESLint](https://eslint.org/) on the package. +Run `nx lint utils-file-system` to run [ESLint](https://eslint.org/) on the +package. diff --git a/packages/file-system/declaration.d.ts b/packages/utils/file-system/declaration.d.ts similarity index 100% rename from packages/file-system/declaration.d.ts rename to packages/utils/file-system/declaration.d.ts diff --git a/packages/utils/file-system/jest.config.ts b/packages/utils/file-system/jest.config.ts new file mode 100644 index 00000000..b1a5ba98 --- /dev/null +++ b/packages/utils/file-system/jest.config.ts @@ -0,0 +1,3 @@ +import { getJestConfig } from "@storm-software/testing-tools"; + +export default getJestConfig("packages/file-system", true, "utils-file-system"); diff --git a/packages/file-system/package.json b/packages/utils/file-system/package.json similarity index 95% rename from packages/file-system/package.json rename to packages/utils/file-system/package.json index 2d4e3d6c..d3fd9269 100644 --- a/packages/file-system/package.json +++ b/packages/utils/file-system/package.json @@ -14,7 +14,6 @@ "semver": "7.6.3" }, "devDependencies": { - "@types/node": "^22.10.2", "@types/semver": "7.5.8" }, "publishConfig": { diff --git a/packages/utils/file-system/project.json b/packages/utils/file-system/project.json new file mode 100644 index 00000000..dc51c4db --- /dev/null +++ b/packages/utils/file-system/project.json @@ -0,0 +1,35 @@ +{ + "name": "utils-file-system", + "$schema": "../../../node_modules/nx/schemas/project-schema.json", + "projectType": "library", + "sourceRoot": "packages/utils/file-system/src", + "targets": { + "build": { + "cache": true, + "executor": "@storm-software/workspace-tools:unbuild", + "inputs": ["typescript", "^production"], + "outputs": ["{options.outputPath}"], + "defaultConfiguration": "production", + "clean": true, + "options": { + "type": "packages/utils/file-system/src/index.ts", + "outputPath": "dist/packages/utils/file-system", + "tsConfig": "packages/utils/file-system/tsconfig.json", + "project": "packages/utils/file-system/package.json" + }, + "configurations": { + "production": { + "sourceMap": false, + "verbose": false + }, + "development": { + "sourceMap": true, + "verbose": true + } + } + }, + "nx-release-publish": { + "executor": "@storm-software/workspace-tools:npm-publish" + } + } +} diff --git a/packages/file-system/src/directories/get-env-paths.ts b/packages/utils/file-system/src/directories/get-env-paths.ts similarity index 100% rename from packages/file-system/src/directories/get-env-paths.ts rename to packages/utils/file-system/src/directories/get-env-paths.ts diff --git a/packages/file-system/src/directories/get-workspace-root.ts b/packages/utils/file-system/src/directories/get-workspace-root.ts similarity index 100% rename from packages/file-system/src/directories/get-workspace-root.ts rename to packages/utils/file-system/src/directories/get-workspace-root.ts diff --git a/packages/file-system/src/directories/index.ts b/packages/utils/file-system/src/directories/index.ts similarity index 100% rename from packages/file-system/src/directories/index.ts rename to packages/utils/file-system/src/directories/index.ts diff --git a/packages/file-system/src/errors.ts b/packages/utils/file-system/src/errors.ts similarity index 87% rename from packages/file-system/src/errors.ts rename to packages/utils/file-system/src/errors.ts index 4419cc1d..f8110167 100644 --- a/packages/file-system/src/errors.ts +++ b/packages/utils/file-system/src/errors.ts @@ -22,12 +22,14 @@ export type FileSystemErrorCode = | "invalid_file_path" | "invalid_file_content" | "file_does_not_exist" - | "file_write_failure"; + | "file_write_failure" + | "file_copy_failure"; export const FileSystemErrorCode = { ...ErrorCode, invalid_file_path: "invalid_file_path" as FileSystemErrorCode, invalid_file_content: "invalid_file_content" as FileSystemErrorCode, file_does_not_exist: "file_does_not_exist" as FileSystemErrorCode, file_write_failure: "file_write_failure" as FileSystemErrorCode, - file_read_failure: "file_read_failure" as FileSystemErrorCode + file_read_failure: "file_read_failure" as FileSystemErrorCode, + file_copy_failure: "file_copy_failure" as FileSystemErrorCode }; diff --git a/packages/file-system/src/files/copy-files.ts b/packages/utils/file-system/src/files/copy-files.ts similarity index 61% rename from packages/file-system/src/files/copy-files.ts rename to packages/utils/file-system/src/files/copy-files.ts index 582dd5b2..0b3a6b3a 100644 --- a/packages/file-system/src/files/copy-files.ts +++ b/packages/utils/file-system/src/files/copy-files.ts @@ -15,9 +15,9 @@ -------------------------------------------------------------------*/ +import { StormError } from "@storm-stack/errors"; import { constants, copyFileSync, cpSync, type CopySyncOptions } from "node:fs"; -/* eslint-disable @typescript-eslint/no-explicit-any */ -import { StormLog } from "@storm-stack/logging"; +import { FileSystemErrorCode } from "../errors"; /** * Copy files from one location to another @@ -31,19 +31,14 @@ export const copyFiles = ( from: string, to: string, options?: CopySyncOptions -): string | Buffer | undefined => { +) => { try { - StormLog.info(`Copying files from "${from}" to "${to}"`); cpSync(from, to, options); - - return undefined; } catch (error_) { - StormLog.error("An error occurred copying files"); - StormLog.error(error_); - - return ( - (error_ as any)?.message ?? "Exception occurred while processing request " - ); + throw StormError.createException(FileSystemErrorCode.file_copy_failure, { + message: "A file copy error occurred", + cause: error_ + }); } }; @@ -51,25 +46,16 @@ export const copyFiles = ( * Copy a file from one location to another * * @param file - The file to copy - * @param dest - The destination location + * @param to - The destination location * @returns An indicator specifying if the copy was successful */ -export const copyFile = ( - file: string, - dest: string -): string | Buffer | undefined => { +export const copyFile = (file: string, to: string) => { try { - StormLog.info(`Copying file "${file}" to "${dest}"`); - - copyFileSync(file, dest, constants.COPYFILE_FICLONE); - - return undefined; + copyFileSync(file, to, constants.COPYFILE_FICLONE); } catch (error_) { - StormLog.error("An error occurred copying files"); - StormLog.error(error_); - - return ( - (error_ as any)?.message ?? "Exception occurred while processing request " - ); + throw StormError.createException(FileSystemErrorCode.file_copy_failure, { + message: "A file copy error occurred", + cause: error_ + }); } }; diff --git a/packages/file-system/src/files/exists.ts b/packages/utils/file-system/src/files/exists.ts similarity index 100% rename from packages/file-system/src/files/exists.ts rename to packages/utils/file-system/src/files/exists.ts diff --git a/packages/file-system/src/files/file-path-fns.ts b/packages/utils/file-system/src/files/file-path-fns.ts similarity index 98% rename from packages/file-system/src/files/file-path-fns.ts rename to packages/utils/file-system/src/files/file-path-fns.ts index f939b325..c0a2a6cf 100644 --- a/packages/file-system/src/files/file-path-fns.ts +++ b/packages/utils/file-system/src/files/file-path-fns.ts @@ -15,7 +15,7 @@ -------------------------------------------------------------------*/ -import { EMPTY_STRING } from "@storm-stack/types"; +import { EMPTY_STRING } from "@storm-stack/types/utility-types/base"; import { dirname, isAbsolute, parse, relative, sep } from "node:path"; import { getWorkspaceRoot } from "../directories/get-workspace-root"; import { joinPaths } from "./join-paths"; diff --git a/packages/file-system/src/files/index.ts b/packages/utils/file-system/src/files/index.ts similarity index 100% rename from packages/file-system/src/files/index.ts rename to packages/utils/file-system/src/files/index.ts diff --git a/packages/file-system/src/files/is-file.ts b/packages/utils/file-system/src/files/is-file.ts similarity index 100% rename from packages/file-system/src/files/is-file.ts rename to packages/utils/file-system/src/files/is-file.ts diff --git a/packages/file-system/src/files/join-paths.ts b/packages/utils/file-system/src/files/join-paths.ts similarity index 100% rename from packages/file-system/src/files/join-paths.ts rename to packages/utils/file-system/src/files/join-paths.ts diff --git a/packages/file-system/src/files/read-file.ts b/packages/utils/file-system/src/files/read-file.ts similarity index 85% rename from packages/file-system/src/files/read-file.ts rename to packages/utils/file-system/src/files/read-file.ts index 0a1794a8..07d1e76e 100644 --- a/packages/file-system/src/files/read-file.ts +++ b/packages/utils/file-system/src/files/read-file.ts @@ -28,14 +28,14 @@ import { FileSystemErrorCode } from "../errors"; export const readFile = (filePath: string): string => { try { if (!filePath) { - throw new StormError(FileSystemErrorCode.invalid_file_path, { + throw StormError.createException(FileSystemErrorCode.invalid_file_path, { message: "No file path provided to read data" }); } return readFileSync(filePath, { encoding: "utf8" }); } catch (error_) { - throw new StormError(FileSystemErrorCode.file_write_failure, { + throw StormError.createException(FileSystemErrorCode.file_write_failure, { message: "An error occurred writing data to file", cause: error_ }); @@ -50,14 +50,14 @@ export const readFile = (filePath: string): string => { export const readFileAsync = (filePath: string): Promise => { try { if (!filePath) { - throw new StormError(FileSystemErrorCode.invalid_file_path, { + throw StormError.createException(FileSystemErrorCode.invalid_file_path, { message: "No file path provided to read data" }); } return promisify(readFileFs)(filePath, { encoding: "utf8" }); } catch (error_) { - throw new StormError(FileSystemErrorCode.file_write_failure, { + throw StormError.createException(FileSystemErrorCode.file_write_failure, { message: "An error occurred writing data to file", cause: error_ }); diff --git a/packages/file-system/src/files/write-file.ts b/packages/utils/file-system/src/files/write-file.ts similarity index 77% rename from packages/file-system/src/files/write-file.ts rename to packages/utils/file-system/src/files/write-file.ts index 5605d12f..f289c1a3 100644 --- a/packages/file-system/src/files/write-file.ts +++ b/packages/utils/file-system/src/files/write-file.ts @@ -16,7 +16,7 @@ -------------------------------------------------------------------*/ import { StormError } from "@storm-stack/errors"; -import { StormParser } from "@storm-stack/serialization"; +import { StormParser } from "@storm-stack/serialization/storm-parser"; import { writeFile as writeFileFs, writeFileSync } from "node:fs"; import { promisify } from "node:util"; import { FileSystemErrorCode } from "../errors"; @@ -30,19 +30,22 @@ import { FileSystemErrorCode } from "../errors"; export const writeFile = (filePath: string, content: any): void => { try { if (!filePath) { - throw new StormError(FileSystemErrorCode.invalid_file_path, { + throw StormError.createException(FileSystemErrorCode.invalid_file_path, { message: "No file path provided to write data" }); } if (!content) { - throw new StormError(FileSystemErrorCode.invalid_file_content, { - message: "No content provided to write to file" - }); + throw StormError.createException( + FileSystemErrorCode.invalid_file_content, + { + message: "No content provided to write to file" + } + ); } writeFileSync(filePath, StormParser.stringify(content)); } catch (error_) { - throw new StormError(FileSystemErrorCode.file_write_failure, { + throw StormError.createException(FileSystemErrorCode.file_write_failure, { message: "An error occurred writing data to file", cause: error_ }); @@ -60,14 +63,14 @@ export const writeFileAsync = ( ): Promise => { try { if (!filePath) { - throw new StormError(FileSystemErrorCode.invalid_file_path, { + throw StormError.createException(FileSystemErrorCode.invalid_file_path, { message: "No file path provided to read data" }); } return promisify(writeFileFs)(filePath, content); } catch (error_) { - throw new StormError(FileSystemErrorCode.file_write_failure, { + throw StormError.createException(FileSystemErrorCode.file_write_failure, { message: "An error occurred writing data to file", cause: error_ }); diff --git a/packages/file-system/src/index.ts b/packages/utils/file-system/src/index.ts similarity index 97% rename from packages/file-system/src/index.ts rename to packages/utils/file-system/src/index.ts index 3a0a5e8e..b63825bf 100644 --- a/packages/file-system/src/index.ts +++ b/packages/utils/file-system/src/index.ts @@ -19,3 +19,4 @@ export * from "./directories"; export * from "./errors"; export * from "./files"; export * from "./package-management"; +export * from "./types"; diff --git a/packages/file-system/src/package-management/get-tsconfig.ts b/packages/utils/file-system/src/package-management/get-tsconfig.ts similarity index 99% rename from packages/file-system/src/package-management/get-tsconfig.ts rename to packages/utils/file-system/src/package-management/get-tsconfig.ts index d302df31..7c32469e 100644 --- a/packages/file-system/src/package-management/get-tsconfig.ts +++ b/packages/utils/file-system/src/package-management/get-tsconfig.ts @@ -15,7 +15,7 @@ -------------------------------------------------------------------*/ -import { EMPTY_STRING } from "@storm-stack/types"; +import { EMPTY_STRING } from "@storm-stack/types/utility-types/base"; import fs from "node:fs"; import { createRequire } from "node:module"; import path from "node:path"; diff --git a/packages/file-system/src/package-management/index.ts b/packages/utils/file-system/src/package-management/index.ts similarity index 93% rename from packages/file-system/src/package-management/index.ts rename to packages/utils/file-system/src/package-management/index.ts index 2dda9ade..7419d16d 100644 --- a/packages/file-system/src/package-management/index.ts +++ b/packages/utils/file-system/src/package-management/index.ts @@ -15,7 +15,7 @@ -------------------------------------------------------------------*/ -export * from "./chmod"; +export * from "../../../cli-helpers/src/commands/chmod"; export * from "./get-tsconfig"; export * from "./package-fns"; export * from "./semver-fns"; diff --git a/packages/utils/file-system/src/package-management/package-fns.ts b/packages/utils/file-system/src/package-management/package-fns.ts new file mode 100644 index 00000000..32674b56 --- /dev/null +++ b/packages/utils/file-system/src/package-management/package-fns.ts @@ -0,0 +1,61 @@ +/*------------------------------------------------------------------- + + ⚡ Storm Software - Storm Stack + + This code was released as part of the Storm Stack project. Storm Stack + is maintained by Storm Software under the Apache-2.0 License, and is + free for commercial and private use. For more information, please visit + our licensing page. + + Website: https://stormsoftware.com + Repository: https://github.com/storm-software/storm-stack + Documentation: https://stormsoftware.com/projects/storm-stack/docs + Contact: https://stormsoftware.com/contact + License: https://stormsoftware.com/projects/storm-stack/license + + -------------------------------------------------------------------*/ + +import { basename, resolve } from "node:path"; +import { exists } from "../files/exists"; +import { joinPaths } from "../files/join-paths"; +import { PackageManagers } from "../types"; + +function findUp(names: string[], cwd: string): string | undefined { + let dir = cwd; + + while (true) { + const target = names.find(name => exists(joinPaths(dir, name))); + if (target) return target; + + const up = resolve(dir, ".."); + if (up === dir) return undefined; // it'll fail anyway + dir = up; + } +} + +export function getPackageManager(projectPath = "."): PackageManagers { + const lockFile = findUp( + ["yarn.lock", "pnpm-lock.yaml", "package-lock.json", "bun.lockb"], + projectPath + ); + + if (!lockFile) { + // default use pnpm + return "pnpm"; + } + + switch (basename(lockFile)) { + case "yarn.lock": { + return "yarn"; + } + case "pnpm-lock.yaml": { + return "pnpm"; + } + case "bun.lockb": { + return "bun"; + } + default: { + return "npm"; + } + } +} diff --git a/packages/file-system/src/package-management/semver-fns.ts b/packages/utils/file-system/src/package-management/semver-fns.ts similarity index 100% rename from packages/file-system/src/package-management/semver-fns.ts rename to packages/utils/file-system/src/package-management/semver-fns.ts diff --git a/packages/utils/file-system/src/types.ts b/packages/utils/file-system/src/types.ts new file mode 100644 index 00000000..6e7f63d1 --- /dev/null +++ b/packages/utils/file-system/src/types.ts @@ -0,0 +1,24 @@ +/*------------------------------------------------------------------- + + ⚡ Storm Software - Storm Stack + + This code was released as part of the Storm Stack project. Storm Stack + is maintained by Storm Software under the Apache-2.0 License, and is + free for commercial and private use. For more information, please visit + our licensing page. + + Website: https://stormsoftware.com + Repository: https://github.com/storm-software/storm-stack + Documentation: https://stormsoftware.com/projects/storm-stack/docs + Contact: https://stormsoftware.com/contact + License: https://stormsoftware.com/projects/storm-stack/license + + -------------------------------------------------------------------*/ + +export type PackageManagers = "npm" | "yarn" | "pnpm" | "bun"; +export const PackageManagers = { + NPM: "npm" as PackageManagers, + YARN: "yarn" as PackageManagers, + PNPM: "pnpm" as PackageManagers, + BUN: "bun" as PackageManagers +}; diff --git a/packages/serialization/tsconfig.json b/packages/utils/file-system/tsconfig.json similarity index 68% rename from packages/serialization/tsconfig.json rename to packages/utils/file-system/tsconfig.json index f1f337a7..40928c21 100644 --- a/packages/serialization/tsconfig.json +++ b/packages/utils/file-system/tsconfig.json @@ -1,7 +1,7 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { - "outDir": "../../dist/out-tsc" + "outDir": "../../../dist/out-tsc" }, "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.js", "src/**/*.jsx"], "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"] diff --git a/packages/utils/file-system/tsconfig.spec.json b/packages/utils/file-system/tsconfig.spec.json new file mode 100644 index 00000000..f8bfbb68 --- /dev/null +++ b/packages/utils/file-system/tsconfig.spec.json @@ -0,0 +1,13 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../dist/out-tsc", + "types": ["jest", "node"] + }, + "include": [ + "jest.config.ts", + "src/**/*.test.ts", + "src/**/*.spec.ts", + "src/**/*.d.ts" + ] +} diff --git a/packages/utils/hashing/CHANGELOG.md b/packages/utils/hashing/CHANGELOG.md new file mode 100644 index 00000000..dec09e1d --- /dev/null +++ b/packages/utils/hashing/CHANGELOG.md @@ -0,0 +1,192 @@ +## 0.15.0 (2024-11-10) + +### Features + +- **date-time:** Resolve issue parsing ISO string in `StormDateTime` constructor + ([c8032d6](https://github.com/storm-software/storm-stack/commit/c8032d6)) + +## 0.14.0 (2024-11-10) + +### Features + +- **cli:** Added the `execute` and `install` utility functions + ([8b04259](https://github.com/storm-software/storm-stack/commit/8b04259)) + +## 0.13.0 (2024-11-08) + +### Features + +- **types:** Regenerate packages with upgraded ops packages + ([936026a](https://github.com/storm-software/storm-stack/commit/936026a)) + +## 0.12.0 (2024-11-07) + +### Features + +- **date-time:** Added the `getMonthIndex` helper function + ([8d979d2](https://github.com/storm-software/storm-stack/commit/8d979d2)) + +## 0.11.2 (2024-10-27) + +### Bug Fixes + +- **date-time:** Update static function to no longer be constants + ([f366ffe](https://github.com/storm-software/storm-stack/commit/f366ffe)) + +## 0.11.1 (2024-10-26) + +### Bug Fixes + +- **hooks:** Resolve issue updating element reference in `useHook` hook + ([340e2f4](https://github.com/storm-software/storm-stack/commit/340e2f4)) + +## 0.11.0 (2024-10-26) + +### Features + +- **types:** Added the `isFileResult` type-checker and updated `status` field + ([2fc6410](https://github.com/storm-software/storm-stack/commit/2fc6410)) + +## 0.10.2 (2024-10-24) + +### Bug Fixes + +- **date-time:** Update the conditionals in validate functions + ([f5f4e26](https://github.com/storm-software/storm-stack/commit/f5f4e26)) + +## 0.10.1 (2024-10-24) + +### Bug Fixes + +- **date-time:** Resolve issue with the date-time format functions + ([f385b23](https://github.com/storm-software/storm-stack/commit/f385b23)) + +## 0.10.0 (2024-10-24) + +### Features + +- **hooks:** Added the `composeRefs` function and hook + ([80a1379](https://github.com/storm-software/storm-stack/commit/80a1379)) + +## 0.9.0 (2024-10-22) + +### Features + +- **monorepo:** Use latest storm build tools in monorepo + ([6bf00c5](https://github.com/storm-software/storm-stack/commit/6bf00c5)) + +## 0.8.2 (2024-10-20) + +### Bug Fixes + +- **date-time:** Resolve issue with parsing ISO-8601 string + ([a63273e](https://github.com/storm-software/storm-stack/commit/a63273e)) + +## 0.8.1 (2024-10-20) + +### Bug Fixes + +- **date-time:** Resolved issue with creating date-time in validation function + ([2a3c1e8](https://github.com/storm-software/storm-stack/commit/2a3c1e8)) + +## 0.8.0 (2024-10-18) + +### Features + +- **date-time:** Provide time zone to the formatting function + ([318ab55](https://github.com/storm-software/storm-stack/commit/318ab55)) + +## 0.7.0 (2024-10-18) + +### Features + +- **date-time:** Added new flags to formatting options for helper functions + ([b702d6c](https://github.com/storm-software/storm-stack/commit/b702d6c)) + +### Bug Fixes + +- **serialization:** Resolved stack overflow issue with `StormParser` class + ([f890df9](https://github.com/storm-software/storm-stack/commit/f890df9)) + +## 0.6.0 (2024-10-15) + +### Features + +- **types:** Added the `index` and `status` properties to the `SelectOption` + type ([7da9603](https://github.com/storm-software/storm-stack/commit/7da9603)) + +## 0.5.0 (2024-10-14) + +### Features + +- **types:** Added the `description` property to the `SelectOption` type + ([94c33d2](https://github.com/storm-software/storm-stack/commit/94c33d2)) + +## 0.4.0 (2024-10-11) + +### Features + +- **types:** Added the `help` and `success` ValidationDetail message types + ([207bf67](https://github.com/storm-software/storm-stack/commit/207bf67)) + +## 0.3.0 (2024-10-10) + +### Features + +- **utilities:** Added the `toPath` and `toDeepKey` functions + ([1977f13](https://github.com/storm-software/storm-stack/commit/1977f13)) + +## 0.2.2 (2024-10-10) + +### Bug Fixes + +- **monorepo:** Regenerate markup after token update + ([a37ef2a](https://github.com/storm-software/storm-stack/commit/a37ef2a)) + +## 0.2.1 (2024-10-10) + +### Bug Fixes + +- **types:** Added missing tags and regenerated markdown + ([7ab98cc](https://github.com/storm-software/storm-stack/commit/7ab98cc)) + +## 0.2.0 (2024-10-10) + +### Features + +- **utilities:** Update the base Nx configuration + ([99988e0](https://github.com/storm-software/storm-stack/commit/99988e0)) + +### Bug Fixes + +- **monorepo:** Update the Nx configuration to include release process + specifications + ([df311f7](https://github.com/storm-software/storm-stack/commit/df311f7)) + +## 0.1.4 (2024-10-10) + +### Bug Fixes + +- **monorepo:** Regenerate the README file formatting + ([b81153c](https://github.com/storm-software/storm-stack/commit/b81153c)) + +## 0.1.3 (2024-10-09) + +### Bug Fixes + +- **utilities:** Reformatting the README files + ([723d68b](https://github.com/storm-software/storm-stack/commit/723d68b)) + +## 0.1.2 (2024-10-08) + +### Bug Fixes + +- **types:** Regenerate the monorepo markdown files + ([2b5818e](https://github.com/storm-software/storm-stack/commit/2b5818e)) + +## 0.1.1 (2024-10-08) + +### Bug Fixes + +- **monorepo:** Resolve issue with markdown across entire monorepo + ([ee6720c](https://github.com/storm-software/storm-stack/commit/ee6720c)) diff --git a/packages/hashing/README.md b/packages/utils/hashing/README.md similarity index 96% rename from packages/hashing/README.md rename to packages/utils/hashing/README.md index 66760535..607b779a 100644 --- a/packages/hashing/README.md +++ b/packages/utils/hashing/README.md @@ -39,12 +39,13 @@ This package is part of the ⚡Storm Stack monorepo. Storm Stack packages -# hashing +# utils-hashing -A package that includes hashing utility functions +A package that includes utils-hashing utility functions + ## Table of Contents - [Installing](#installing) @@ -70,14 +71,14 @@ A package that includes hashing utility functions Using [pnpm](http://pnpm.io): ```bash -pnpm add -D @storm-stack/hashing +pnpm add -D @storm-stack/utils-hashing ```
Using npm ```bash -npm install -D @storm-stack/hashing +npm install -D @storm-stack/utils-hashing ```
@@ -86,7 +87,7 @@ npm install -D @storm-stack/hashing Using yarn ```bash -yarn add -D @storm-stack/hashing +yarn add -D @storm-stack/utils-hashing ``` @@ -105,15 +106,16 @@ commands are available to assist in development. ### Building -Run `nx build hashing` to build the library. +Run `nx build utils-hashing` to build the library. ### Running unit tests -Run `nx test hashing` to execute the unit tests via [Jest](https://jestjs.io). +Run `nx test utils-hashing` to execute the unit tests via +[Jest](https://jestjs.io). ### Linting -Run `nx lint hashing` to run [ESLint](https://eslint.org/) on the package. +Run `nx lint utils-hashing` to run [ESLint](https://eslint.org/) on the package. diff --git a/packages/utils/hashing/jest.config.ts b/packages/utils/hashing/jest.config.ts new file mode 100644 index 00000000..d3742353 --- /dev/null +++ b/packages/utils/hashing/jest.config.ts @@ -0,0 +1,3 @@ +import { getJestConfig } from "@storm-software/testing-tools"; + +export default getJestConfig("packages/hashing", true, "utils-hashing"); diff --git a/packages/hashing/package.json b/packages/utils/hashing/package.json similarity index 100% rename from packages/hashing/package.json rename to packages/utils/hashing/package.json diff --git a/packages/cli/project.json b/packages/utils/hashing/project.json similarity index 63% rename from packages/cli/project.json rename to packages/utils/hashing/project.json index 47a241a3..5da33a2e 100644 --- a/packages/cli/project.json +++ b/packages/utils/hashing/project.json @@ -1,8 +1,8 @@ { - "name": "cli", - "$schema": "../../node_modules/nx/schemas/project-schema.json", + "name": "utils-hashing", + "$schema": "../../../node_modules/nx/schemas/project-schema.json", "projectType": "library", - "sourceRoot": "packages/cli/src", + "sourceRoot": "packages/utils/hashing/src", "targets": { "build": { "cache": true, @@ -12,10 +12,10 @@ "defaultConfiguration": "production", "clean": true, "options": { - "type": "packages/cli/src/index.ts", - "outputPath": "dist/packages/cli", - "tsConfig": "packages/cli/tsconfig.json", - "project": "packages/cli/package.json" + "type": "packages/utils/hashing/src/index.ts", + "outputPath": "dist/packages/utils/hashing", + "tsConfig": "packages/utils/hashing/tsconfig.json", + "project": "packages/utils/hashing/package.json" }, "configurations": { "production": { diff --git a/packages/hashing/src/hash-object.ts b/packages/utils/hashing/src/hash-object.ts similarity index 100% rename from packages/hashing/src/hash-object.ts rename to packages/utils/hashing/src/hash-object.ts diff --git a/packages/hashing/src/hash.ts b/packages/utils/hashing/src/hash.ts similarity index 100% rename from packages/hashing/src/hash.ts rename to packages/utils/hashing/src/hash.ts diff --git a/packages/hashing/src/index.ts b/packages/utils/hashing/src/index.ts similarity index 100% rename from packages/hashing/src/index.ts rename to packages/utils/hashing/src/index.ts diff --git a/packages/hashing/src/sha-256.ts b/packages/utils/hashing/src/sha-256.ts similarity index 100% rename from packages/hashing/src/sha-256.ts rename to packages/utils/hashing/src/sha-256.ts diff --git a/packages/server-cache/tsconfig.json b/packages/utils/hashing/tsconfig.json similarity index 66% rename from packages/server-cache/tsconfig.json rename to packages/utils/hashing/tsconfig.json index 60c8d2ec..91ab82fc 100644 --- a/packages/server-cache/tsconfig.json +++ b/packages/utils/hashing/tsconfig.json @@ -1,7 +1,7 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { - "outDir": "../../dist/out-tsc" + "outDir": "../../../dist/out-tsc" }, "include": ["src/**/*.ts", "src/**/*.js", "bin/**/*"], "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"] diff --git a/packages/utils/hashing/tsconfig.spec.json b/packages/utils/hashing/tsconfig.spec.json new file mode 100644 index 00000000..f8bfbb68 --- /dev/null +++ b/packages/utils/hashing/tsconfig.spec.json @@ -0,0 +1,13 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../dist/out-tsc", + "types": ["jest", "node"] + }, + "include": [ + "jest.config.ts", + "src/**/*.test.ts", + "src/**/*.spec.ts", + "src/**/*.d.ts" + ] +} diff --git a/packages/utils/hooks/CHANGELOG.md b/packages/utils/hooks/CHANGELOG.md new file mode 100644 index 00000000..cc712202 --- /dev/null +++ b/packages/utils/hooks/CHANGELOG.md @@ -0,0 +1,309 @@ +## 0.25.1 (2024-12-04) + +### Bug Fixes + +- **monorepo:** Resolved issue with missing env values in CI workflow action + ([d0c6d6b](https://github.com/storm-software/storm-stack/commit/d0c6d6b)) + +## 0.25.0 (2024-12-04) + +### Features + +- **cli:** Update CLI program function name + ([9a8dc91](https://github.com/storm-software/storm-stack/commit/9a8dc91)) + +## 0.24.2 (2024-12-04) + +### Bug Fixes + +- **monorepo:** Resolve issue with external workflow execution + ([8c13959](https://github.com/storm-software/storm-stack/commit/8c13959)) + +## 0.24.1 (2024-12-04) + +### Bug Fixes + +- **hooks:** Ensure a consistent typing in `useComposeRefs` hook + ([3537a18](https://github.com/storm-software/storm-stack/commit/3537a18)) + +## 0.24.0 (2024-12-03) + +### Features + +- **hooks:** Added the `useMemoStable` and `useCallbackStable` hooks + ([4629ec3](https://github.com/storm-software/storm-stack/commit/4629ec3)) + +## 0.23.0 (2024-12-02) + +### Features + +- **monorepo:** Upgrade workflow actions to use the new base processes + ([14d2f2f](https://github.com/storm-software/storm-stack/commit/14d2f2f)) + +## 0.22.0 (2024-11-10) + +### Features + +- **date-time:** Resolve issue parsing ISO string in `StormDateTime` constructor + ([c8032d6](https://github.com/storm-software/storm-stack/commit/c8032d6)) + +## 0.21.0 (2024-11-10) + +### Features + +- **cli:** Added `@antfu/install-pkg` to improve install + ([26cf962](https://github.com/storm-software/storm-stack/commit/26cf962)) + +## 0.20.0 (2024-11-10) + +### Features + +- **cli:** Added the `execute` and `install` utility functions + ([8b04259](https://github.com/storm-software/storm-stack/commit/8b04259)) + +## 0.19.0 (2024-11-08) + +### Features + +- **monorepo:** Upgrade the workspace's Nx package versions + ([075a024](https://github.com/storm-software/storm-stack/commit/075a024)) + +## 0.18.0 (2024-11-08) + +### Features + +- **types:** Regenerate packages with upgraded ops packages + ([936026a](https://github.com/storm-software/storm-stack/commit/936026a)) + +## 0.17.0 (2024-11-08) + +### Features + +- **errors:** Added the `createFromData` helper function + ([c15576d](https://github.com/storm-software/storm-stack/commit/c15576d)) + +## 0.16.0 (2024-11-07) + +### Features + +- **date-time:** Added the `getMonthIndex` helper function + ([8d979d2](https://github.com/storm-software/storm-stack/commit/8d979d2)) + +## 0.15.2 (2024-10-31) + +### Bug Fixes + +- **date-time:** Resolve issue with incorrectly exporting classes + ([140d576](https://github.com/storm-software/storm-stack/commit/140d576)) + +## 0.15.1 (2024-10-27) + +### Bug Fixes + +- **date-time:** Update static function to no longer be constants + ([f366ffe](https://github.com/storm-software/storm-stack/commit/f366ffe)) + +## 0.15.0 (2024-10-27) + +### Features + +- **date-time:** Added separate create helper functions for date-time classes + ([569673f](https://github.com/storm-software/storm-stack/commit/569673f)) + +## 0.14.1 (2024-10-26) + +### Bug Fixes + +- **hooks:** Resolve issue updating element reference in `useHook` hook + ([340e2f4](https://github.com/storm-software/storm-stack/commit/340e2f4)) + +## 0.14.0 (2024-10-26) + +### Features + +- **hooks:** Added the `useHover`, `useIdle`, and `useNetworkState` hooks + ([b52aa2f](https://github.com/storm-software/storm-stack/commit/b52aa2f)) + +## 0.13.0 (2024-10-26) + +### Features + +- **types:** Added the `isFileResult` type-checker and updated `status` field + ([2fc6410](https://github.com/storm-software/storm-stack/commit/2fc6410)) + +## 0.12.0 (2024-10-26) + +### Features + +- **types:** Added the `FileResult` shared type definition + ([f9d07c6](https://github.com/storm-software/storm-stack/commit/f9d07c6)) + +## 0.11.3 (2024-10-24) + +### Bug Fixes + +- **date-time:** Update the conditionals in validate functions + ([f5f4e26](https://github.com/storm-software/storm-stack/commit/f5f4e26)) + +## 0.11.2 (2024-10-24) + +### Bug Fixes + +- **date-time:** Resolve issue with null date-time validations + ([3eaf348](https://github.com/storm-software/storm-stack/commit/3eaf348)) + +## 0.11.1 (2024-10-24) + +### Bug Fixes + +- **date-time:** Resolve issue with the date-time format functions + ([f385b23](https://github.com/storm-software/storm-stack/commit/f385b23)) + +## 0.11.0 (2024-10-24) + +### Features + +- **hooks:** Added `useBattery`, `useClickAway`, and `useCopyToClipboard` hooks + ([556db4d](https://github.com/storm-software/storm-stack/commit/556db4d)) + +## 0.10.0 (2024-10-24) + +### Features + +- **hooks:** Added the `composeRefs` function and hook + ([80a1379](https://github.com/storm-software/storm-stack/commit/80a1379)) + +## 0.9.0 (2024-10-22) + +### Features + +- **monorepo:** Use latest storm build tools in monorepo + ([6bf00c5](https://github.com/storm-software/storm-stack/commit/6bf00c5)) + +## 0.8.2 (2024-10-20) + +### Bug Fixes + +- **date-time:** Resolve issue with parsing ISO-8601 string + ([a63273e](https://github.com/storm-software/storm-stack/commit/a63273e)) + +## 0.8.1 (2024-10-20) + +### Bug Fixes + +- **date-time:** Resolved issue with creating date-time in validation function + ([2a3c1e8](https://github.com/storm-software/storm-stack/commit/2a3c1e8)) + +## 0.8.0 (2024-10-18) + +### Features + +- **date-time:** Provide time zone to the formatting function + ([318ab55](https://github.com/storm-software/storm-stack/commit/318ab55)) + +## 0.7.0 (2024-10-18) + +### Features + +- **date-time:** Added new flags to formatting options for helper functions + ([b702d6c](https://github.com/storm-software/storm-stack/commit/b702d6c)) + +### Bug Fixes + +- **serialization:** Resolved stack overflow issue with `StormParser` class + ([f890df9](https://github.com/storm-software/storm-stack/commit/f890df9)) + +## 0.6.0 (2024-10-15) + +### Features + +- **types:** Added the `index` and `status` properties to the `SelectOption` + type ([7da9603](https://github.com/storm-software/storm-stack/commit/7da9603)) + +## 0.5.0 (2024-10-14) + +### Features + +- **types:** Added the `description` property to the `SelectOption` type + ([94c33d2](https://github.com/storm-software/storm-stack/commit/94c33d2)) + +## 0.4.0 (2024-10-11) + +### Features + +- **types:** Added the `help` and `success` ValidationDetail message types + ([207bf67](https://github.com/storm-software/storm-stack/commit/207bf67)) + +## 0.3.0 (2024-10-10) + +### Features + +- **utilities:** Added the `toPath` and `toDeepKey` functions + ([1977f13](https://github.com/storm-software/storm-stack/commit/1977f13)) + +## 0.2.2 (2024-10-10) + +### Bug Fixes + +- **monorepo:** Regenerate markup after token update + ([a37ef2a](https://github.com/storm-software/storm-stack/commit/a37ef2a)) + +## 0.2.1 (2024-10-10) + +### Bug Fixes + +- **types:** Added missing tags and regenerated markdown + ([7ab98cc](https://github.com/storm-software/storm-stack/commit/7ab98cc)) + +## 0.2.0 (2024-10-10) + +### Features + +- **utilities:** Update the base Nx configuration + ([99988e0](https://github.com/storm-software/storm-stack/commit/99988e0)) + +### Bug Fixes + +- **monorepo:** Update the Nx configuration to include release process + specifications + ([df311f7](https://github.com/storm-software/storm-stack/commit/df311f7)) + +## 0.1.4 (2024-10-10) + +### Bug Fixes + +- **monorepo:** Regenerate the README file formatting + ([b81153c](https://github.com/storm-software/storm-stack/commit/b81153c)) + +## 0.1.3 (2024-10-09) + +### Bug Fixes + +- **utilities:** Reformatting the README files + ([723d68b](https://github.com/storm-software/storm-stack/commit/723d68b)) + +## 0.1.2 (2024-10-08) + +### Bug Fixes + +- **types:** Regenerate the monorepo markdown files + ([2b5818e](https://github.com/storm-software/storm-stack/commit/2b5818e)) + +## 0.1.1 (2024-10-08) + +### Bug Fixes + +- **monorepo:** Resolve issue with markdown across entire monorepo + ([ee6720c](https://github.com/storm-software/storm-stack/commit/ee6720c)) + +## 0.1.0 (2024-10-08) + +### Features + +- **hooks:** Initial check-in of the base reusable React `hooks` package + ([6af6750](https://github.com/storm-software/storm-stack/commit/6af6750)) + +### Bug Fixes + +- **monorepo:** Automated linting resolution on monorepo + ([7136dec](https://github.com/storm-software/storm-stack/commit/7136dec)) diff --git a/packages/hooks/README.md b/packages/utils/hooks/README.md similarity index 97% rename from packages/hooks/README.md rename to packages/utils/hooks/README.md index f8f74ff2..fa58ac98 100644 --- a/packages/hooks/README.md +++ b/packages/utils/hooks/README.md @@ -45,9 +45,10 @@ A base utility hook library used by Storm Software in React clients + ## Table of Contents -- [React Hooks](#react-hooks) +- [React Hooks](#react-utils-hooks) - [Table of Contents](#table-of-contents) - [Installing](#installing) - [Reduced Package Size](#reduced-package-size) @@ -72,14 +73,14 @@ A base utility hook library used by Storm Software in React clients Using [pnpm](http://pnpm.io): ```bash -pnpm add -D @storm-stack/hooks +pnpm add -D @storm-stack/utils-hooks ```
Using npm ```bash -npm install -D @storm-stack/hooks +npm install -D @storm-stack/utils-hooks ```
@@ -88,7 +89,7 @@ npm install -D @storm-stack/hooks Using yarn ```bash -yarn add -D @storm-stack/hooks +yarn add -D @storm-stack/utils-hooks ``` @@ -107,15 +108,16 @@ commands are available to assist in development. ### Building -Run `nx build hooks` to build the library. +Run `nx build utils-hooks` to build the library. ### Running unit tests -Run `nx test hooks` to execute the unit tests via [Jest](https://jestjs.io). +Run `nx test utils-hooks` to execute the unit tests via +[Jest](https://jestjs.io). ### Linting -Run `nx lint hooks` to run [ESLint](https://eslint.org/) on the package. +Run `nx lint utils-hooks` to run [ESLint](https://eslint.org/) on the package. diff --git a/packages/utils/hooks/jest.config.ts b/packages/utils/hooks/jest.config.ts new file mode 100644 index 00000000..f8eee5ca --- /dev/null +++ b/packages/utils/hooks/jest.config.ts @@ -0,0 +1,3 @@ +import { getJestConfig } from "@storm-software/testing-tools"; + +export default getJestConfig("packages/hooks", true, "utils-hooks"); diff --git a/packages/hooks/package.json b/packages/utils/hooks/package.json similarity index 100% rename from packages/hooks/package.json rename to packages/utils/hooks/package.json diff --git a/packages/hooks/project.json b/packages/utils/hooks/project.json similarity index 66% rename from packages/hooks/project.json rename to packages/utils/hooks/project.json index d13141a4..cbfbf578 100644 --- a/packages/hooks/project.json +++ b/packages/utils/hooks/project.json @@ -1,8 +1,8 @@ { - "name": "hooks", - "$schema": "../../node_modules/nx/schemas/project-schema.json", + "name": "utils-hooks", + "$schema": "../../../node_modules/nx/schemas/project-schema.json", "projectType": "library", - "sourceRoot": "packages/hooks/src", + "sourceRoot": "packages/utils/hooks/src", "targets": { "build": { "cache": true, @@ -12,10 +12,10 @@ "defaultConfiguration": "production", "clean": true, "options": { - "type": "packages/hooks/src/index.ts", - "outputPath": "dist/packages/hooks", - "tsConfig": "packages/hooks/tsconfig.json", - "project": "packages/hooks/package.json", + "type": "packages/utils/hooks/src/index.ts", + "outputPath": "dist/packages/utils/hooks", + "tsConfig": "packages/utils/hooks/tsconfig.json", + "project": "packages/utils/hooks/package.json", "externals": ["react", "react-dom", "react-native"] }, "configurations": { diff --git a/packages/hooks/src/index.ts b/packages/utils/hooks/src/index.ts similarity index 100% rename from packages/hooks/src/index.ts rename to packages/utils/hooks/src/index.ts diff --git a/packages/hooks/src/use-battery.ts b/packages/utils/hooks/src/use-battery.ts similarity index 100% rename from packages/hooks/src/use-battery.ts rename to packages/utils/hooks/src/use-battery.ts diff --git a/packages/hooks/src/use-callback-ref.ts b/packages/utils/hooks/src/use-callback-ref.ts similarity index 100% rename from packages/hooks/src/use-callback-ref.ts rename to packages/utils/hooks/src/use-callback-ref.ts diff --git a/packages/hooks/src/use-callback-stable.ts b/packages/utils/hooks/src/use-callback-stable.ts similarity index 100% rename from packages/hooks/src/use-callback-stable.ts rename to packages/utils/hooks/src/use-callback-stable.ts diff --git a/packages/hooks/src/use-click-away.ts b/packages/utils/hooks/src/use-click-away.ts similarity index 100% rename from packages/hooks/src/use-click-away.ts rename to packages/utils/hooks/src/use-click-away.ts diff --git a/packages/hooks/src/use-compose-refs.ts b/packages/utils/hooks/src/use-compose-refs.ts similarity index 100% rename from packages/hooks/src/use-compose-refs.ts rename to packages/utils/hooks/src/use-compose-refs.ts diff --git a/packages/hooks/src/use-copy-to-clipboard.ts b/packages/utils/hooks/src/use-copy-to-clipboard.ts similarity index 100% rename from packages/hooks/src/use-copy-to-clipboard.ts rename to packages/utils/hooks/src/use-copy-to-clipboard.ts diff --git a/packages/hooks/src/use-debounce.ts b/packages/utils/hooks/src/use-debounce.ts similarity index 100% rename from packages/hooks/src/use-debounce.ts rename to packages/utils/hooks/src/use-debounce.ts diff --git a/packages/hooks/src/use-did-finish-ssr.ts b/packages/utils/hooks/src/use-did-finish-ssr.ts similarity index 100% rename from packages/hooks/src/use-did-finish-ssr.ts rename to packages/utils/hooks/src/use-did-finish-ssr.ts diff --git a/packages/hooks/src/use-escape-keydown.ts b/packages/utils/hooks/src/use-escape-keydown.ts similarity index 100% rename from packages/hooks/src/use-escape-keydown.ts rename to packages/utils/hooks/src/use-escape-keydown.ts diff --git a/packages/hooks/src/use-event.ts b/packages/utils/hooks/src/use-event.ts similarity index 100% rename from packages/hooks/src/use-event.ts rename to packages/utils/hooks/src/use-event.ts diff --git a/packages/hooks/src/use-hover.ts b/packages/utils/hooks/src/use-hover.ts similarity index 100% rename from packages/hooks/src/use-hover.ts rename to packages/utils/hooks/src/use-hover.ts diff --git a/packages/hooks/src/use-idle.ts b/packages/utils/hooks/src/use-idle.ts similarity index 100% rename from packages/hooks/src/use-idle.ts rename to packages/utils/hooks/src/use-idle.ts diff --git a/packages/hooks/src/use-isomorphic-layout-effect.ts b/packages/utils/hooks/src/use-isomorphic-layout-effect.ts similarity index 100% rename from packages/hooks/src/use-isomorphic-layout-effect.ts rename to packages/utils/hooks/src/use-isomorphic-layout-effect.ts diff --git a/packages/hooks/src/use-keyboard-visible.ts b/packages/utils/hooks/src/use-keyboard-visible.ts similarity index 96% rename from packages/hooks/src/use-keyboard-visible.ts rename to packages/utils/hooks/src/use-keyboard-visible.ts index a63e513a..f6b4b25d 100644 --- a/packages/hooks/src/use-keyboard-visible.ts +++ b/packages/utils/hooks/src/use-keyboard-visible.ts @@ -15,7 +15,7 @@ -------------------------------------------------------------------*/ -import { useState, useEffect } from "react"; +import { useEffect, useState } from "react"; import { Keyboard } from "react-native"; export const useKeyboardVisible = () => { diff --git a/packages/hooks/src/use-memo-stable.ts b/packages/utils/hooks/src/use-memo-stable.ts similarity index 100% rename from packages/hooks/src/use-memo-stable.ts rename to packages/utils/hooks/src/use-memo-stable.ts diff --git a/packages/hooks/src/use-network-state.ts b/packages/utils/hooks/src/use-network-state.ts similarity index 100% rename from packages/hooks/src/use-network-state.ts rename to packages/utils/hooks/src/use-network-state.ts diff --git a/packages/hooks/src/use-previous.ts b/packages/utils/hooks/src/use-previous.ts similarity index 100% rename from packages/hooks/src/use-previous.ts rename to packages/utils/hooks/src/use-previous.ts diff --git a/packages/hooks/tsconfig.json b/packages/utils/hooks/tsconfig.json similarity index 71% rename from packages/hooks/tsconfig.json rename to packages/utils/hooks/tsconfig.json index 8c17825a..d4c8b9de 100644 --- a/packages/hooks/tsconfig.json +++ b/packages/utils/hooks/tsconfig.json @@ -1,7 +1,7 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { - "outDir": "../../dist/out-tsc", + "outDir": "../../../dist/out-tsc", "skipLibCheck": true, "lib": ["ESNext", "DOM"] }, diff --git a/packages/hooks/tsconfig.spec.json b/packages/utils/hooks/tsconfig.spec.json similarity index 83% rename from packages/hooks/tsconfig.spec.json rename to packages/utils/hooks/tsconfig.spec.json index 95c31fef..a4d574d5 100644 --- a/packages/hooks/tsconfig.spec.json +++ b/packages/utils/hooks/tsconfig.spec.json @@ -1,7 +1,7 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "outDir": "../../dist/out-tsc", + "outDir": "../../../dist/out-tsc", "types": ["jest"] }, "include": [ diff --git a/packages/serialization/CHANGELOG.md b/packages/utils/serialization/CHANGELOG.md similarity index 85% rename from packages/serialization/CHANGELOG.md rename to packages/utils/serialization/CHANGELOG.md index 97beda2b..4f57a348 100644 --- a/packages/serialization/CHANGELOG.md +++ b/packages/utils/serialization/CHANGELOG.md @@ -2,311 +2,320 @@ ### Features -- **logging:** Update the `initialize` method signature in the `StormLog` class ([7b11262](https://github.com/storm-software/storm-stack/commit/7b11262)) +- **logging:** Update the `initialize` method signature in the `StormLog` class + ([7b11262](https://github.com/storm-software/storm-stack/commit/7b11262)) ## 1.45.0 (2024-12-12) ### Features -- **types:** Added the `NameValuePair` and `UserBase` base utility types ([ed101af](https://github.com/storm-software/storm-stack/commit/ed101af)) +- **types:** Added the `NameValuePair` and `UserBase` base utility types + ([ed101af](https://github.com/storm-software/storm-stack/commit/ed101af)) ## 1.44.0 (2024-12-02) ### Features -- **monorepo:** Upgrade workflow actions to use the new base processes ([14d2f2f](https://github.com/storm-software/storm-stack/commit/14d2f2f)) +- **monorepo:** Upgrade workflow actions to use the new base processes + ([14d2f2f](https://github.com/storm-software/storm-stack/commit/14d2f2f)) ## 1.43.0 (2024-11-10) ### Features -- **date-time:** Resolve issue parsing ISO string in `StormDateTime` constructor ([c8032d6](https://github.com/storm-software/storm-stack/commit/c8032d6)) +- **date-time:** Resolve issue parsing ISO string in `StormDateTime` constructor + ([c8032d6](https://github.com/storm-software/storm-stack/commit/c8032d6)) ## 1.42.0 (2024-11-10) ### Features -- **cli:** Added `@antfu/install-pkg` to improve install ([26cf962](https://github.com/storm-software/storm-stack/commit/26cf962)) +- **cli:** Added `@antfu/install-pkg` to improve install + ([26cf962](https://github.com/storm-software/storm-stack/commit/26cf962)) ## 1.41.0 (2024-11-10) ### Features -- **cli:** Added the `execute` and `install` utility functions ([8b04259](https://github.com/storm-software/storm-stack/commit/8b04259)) +- **cli:** Added the `execute` and `install` utility functions + ([8b04259](https://github.com/storm-software/storm-stack/commit/8b04259)) ## 1.40.0 (2024-11-08) ### Features -- **monorepo:** Upgrade the workspace's Nx package versions ([075a024](https://github.com/storm-software/storm-stack/commit/075a024)) +- **monorepo:** Upgrade the workspace's Nx package versions + ([075a024](https://github.com/storm-software/storm-stack/commit/075a024)) ## 1.39.0 (2024-11-08) ### Features -- **types:** Regenerate packages with upgraded ops packages ([936026a](https://github.com/storm-software/storm-stack/commit/936026a)) +- **types:** Regenerate packages with upgraded ops packages + ([936026a](https://github.com/storm-software/storm-stack/commit/936026a)) ## 1.38.0 (2024-11-08) - ### Features -- **errors:** Added the `createFromData` helper function ([c15576d](https://github.com/storm-software/storm-stack/commit/c15576d)) +- **errors:** Added the `createFromData` helper function + ([c15576d](https://github.com/storm-software/storm-stack/commit/c15576d)) ## 1.37.0 (2024-11-07) - ### Features -- **date-time:** Added the `getMonthIndex` helper function ([8d979d2](https://github.com/storm-software/storm-stack/commit/8d979d2)) +- **date-time:** Added the `getMonthIndex` helper function + ([8d979d2](https://github.com/storm-software/storm-stack/commit/8d979d2)) ## 1.36.2 (2024-10-31) - ### Bug Fixes -- **date-time:** Resolve issue with incorrectly exporting classes ([140d576](https://github.com/storm-software/storm-stack/commit/140d576)) +- **date-time:** Resolve issue with incorrectly exporting classes + ([140d576](https://github.com/storm-software/storm-stack/commit/140d576)) ## 1.36.1 (2024-10-27) - ### Bug Fixes -- **date-time:** Update static function to no longer be constants ([f366ffe](https://github.com/storm-software/storm-stack/commit/f366ffe)) +- **date-time:** Update static function to no longer be constants + ([f366ffe](https://github.com/storm-software/storm-stack/commit/f366ffe)) ## 1.36.0 (2024-10-27) - ### Features -- **date-time:** Added separate create helper functions for date-time classes ([569673f](https://github.com/storm-software/storm-stack/commit/569673f)) +- **date-time:** Added separate create helper functions for date-time classes + ([569673f](https://github.com/storm-software/storm-stack/commit/569673f)) ## 1.35.1 (2024-10-26) - ### Bug Fixes -- **hooks:** Resolve issue updating element reference in `useHook` hook ([340e2f4](https://github.com/storm-software/storm-stack/commit/340e2f4)) +- **hooks:** Resolve issue updating element reference in `useHook` hook + ([340e2f4](https://github.com/storm-software/storm-stack/commit/340e2f4)) ## 1.35.0 (2024-10-26) - ### Features -- **hooks:** Added the `useHover`, `useIdle`, and `useNetworkState` hooks ([b52aa2f](https://github.com/storm-software/storm-stack/commit/b52aa2f)) +- **hooks:** Added the `useHover`, `useIdle`, and `useNetworkState` hooks + ([b52aa2f](https://github.com/storm-software/storm-stack/commit/b52aa2f)) ## 1.34.0 (2024-10-26) - ### Features -- **types:** Added the `isFileResult` type-checker and updated `status` field ([2fc6410](https://github.com/storm-software/storm-stack/commit/2fc6410)) +- **types:** Added the `isFileResult` type-checker and updated `status` field + ([2fc6410](https://github.com/storm-software/storm-stack/commit/2fc6410)) ## 1.33.0 (2024-10-26) - ### Features -- **types:** Added the `FileResult` shared type definition ([f9d07c6](https://github.com/storm-software/storm-stack/commit/f9d07c6)) +- **types:** Added the `FileResult` shared type definition + ([f9d07c6](https://github.com/storm-software/storm-stack/commit/f9d07c6)) ## 1.32.3 (2024-10-24) - ### Bug Fixes -- **date-time:** Update the conditionals in validate functions ([f5f4e26](https://github.com/storm-software/storm-stack/commit/f5f4e26)) +- **date-time:** Update the conditionals in validate functions + ([f5f4e26](https://github.com/storm-software/storm-stack/commit/f5f4e26)) ## 1.32.2 (2024-10-24) - ### Bug Fixes -- **date-time:** Resolve issue with null date-time validations ([3eaf348](https://github.com/storm-software/storm-stack/commit/3eaf348)) +- **date-time:** Resolve issue with null date-time validations + ([3eaf348](https://github.com/storm-software/storm-stack/commit/3eaf348)) ## 1.32.1 (2024-10-24) - ### Bug Fixes -- **date-time:** Resolve issue with the date-time format functions ([f385b23](https://github.com/storm-software/storm-stack/commit/f385b23)) +- **date-time:** Resolve issue with the date-time format functions + ([f385b23](https://github.com/storm-software/storm-stack/commit/f385b23)) ## 1.32.0 (2024-10-24) - ### Features -- **hooks:** Added `useBattery`, `useClickAway`, and `useCopyToClipboard` hooks ([556db4d](https://github.com/storm-software/storm-stack/commit/556db4d)) +- **hooks:** Added `useBattery`, `useClickAway`, and `useCopyToClipboard` hooks + ([556db4d](https://github.com/storm-software/storm-stack/commit/556db4d)) ## 1.31.0 (2024-10-24) - ### Features -- **hooks:** Added the `composeRefs` function and hook ([80a1379](https://github.com/storm-software/storm-stack/commit/80a1379)) +- **hooks:** Added the `composeRefs` function and hook + ([80a1379](https://github.com/storm-software/storm-stack/commit/80a1379)) ## 1.30.0 (2024-10-22) - ### Features -- **types:** Add type parameters and the `icon` property to the `SelectOption` type ([c0ae1d6](https://github.com/storm-software/storm-stack/commit/c0ae1d6)) +- **types:** Add type parameters and the `icon` property to the `SelectOption` + type ([c0ae1d6](https://github.com/storm-software/storm-stack/commit/c0ae1d6)) ## 1.29.0 (2024-10-22) - ### Features -- **monorepo:** Use latest storm build tools in monorepo ([6bf00c5](https://github.com/storm-software/storm-stack/commit/6bf00c5)) +- **monorepo:** Use latest storm build tools in monorepo + ([6bf00c5](https://github.com/storm-software/storm-stack/commit/6bf00c5)) ## 1.28.0 (2024-10-20) - ### Features -- **serialization:** Added the `parseCookie` and `serializeCookie` helper functions ([0b695ef](https://github.com/storm-software/storm-stack/commit/0b695ef)) - +- **serialization:** Added the `parseCookie` and `serializeCookie` helper + functions + ([0b695ef](https://github.com/storm-software/storm-stack/commit/0b695ef)) ### Refactoring -- **serialization:** Use type-checkers from `types` package ([2379ba8](https://github.com/storm-software/storm-stack/commit/2379ba8)) +- **serialization:** Use type-checkers from `types` package + ([2379ba8](https://github.com/storm-software/storm-stack/commit/2379ba8)) ## 1.27.2 (2024-10-20) - ### Bug Fixes -- **date-time:** Resolve issue with parsing ISO-8601 string ([a63273e](https://github.com/storm-software/storm-stack/commit/a63273e)) +- **date-time:** Resolve issue with parsing ISO-8601 string + ([a63273e](https://github.com/storm-software/storm-stack/commit/a63273e)) ## 1.27.1 (2024-10-20) - ### Bug Fixes -- **date-time:** Resolved issue with creating date-time in validation function ([2a3c1e8](https://github.com/storm-software/storm-stack/commit/2a3c1e8)) +- **date-time:** Resolved issue with creating date-time in validation function + ([2a3c1e8](https://github.com/storm-software/storm-stack/commit/2a3c1e8)) ## 1.27.0 (2024-10-18) - ### Features -- **date-time:** Provide time zone to the formatting function ([318ab55](https://github.com/storm-software/storm-stack/commit/318ab55)) +- **date-time:** Provide time zone to the formatting function + ([318ab55](https://github.com/storm-software/storm-stack/commit/318ab55)) ## 1.26.0 (2024-10-18) - ### Features -- **date-time:** Added new flags to formatting options for helper functions ([b702d6c](https://github.com/storm-software/storm-stack/commit/b702d6c)) - +- **date-time:** Added new flags to formatting options for helper functions + ([b702d6c](https://github.com/storm-software/storm-stack/commit/b702d6c)) ### Bug Fixes -- **serialization:** Resolved stack overflow issue with `StormParser` class ([f890df9](https://github.com/storm-software/storm-stack/commit/f890df9)) +- **serialization:** Resolved stack overflow issue with `StormParser` class + ([f890df9](https://github.com/storm-software/storm-stack/commit/f890df9)) ## 1.25.0 (2024-10-15) - ### Features -- **types:** Added the `index` and `status` properties to the `SelectOption` type ([7da9603](https://github.com/storm-software/storm-stack/commit/7da9603)) +- **types:** Added the `index` and `status` properties to the `SelectOption` + type ([7da9603](https://github.com/storm-software/storm-stack/commit/7da9603)) ## 1.24.0 (2024-10-14) - ### Features -- **types:** Added the `description` property to the `SelectOption` type ([94c33d2](https://github.com/storm-software/storm-stack/commit/94c33d2)) +- **types:** Added the `description` property to the `SelectOption` type + ([94c33d2](https://github.com/storm-software/storm-stack/commit/94c33d2)) ## 1.23.0 (2024-10-11) - ### Features -- **types:** Added the `help` and `success` ValidationDetail message types ([207bf67](https://github.com/storm-software/storm-stack/commit/207bf67)) +- **types:** Added the `help` and `success` ValidationDetail message types + ([207bf67](https://github.com/storm-software/storm-stack/commit/207bf67)) ## 1.22.0 (2024-10-10) - ### Features -- **utilities:** Added the `toPath` and `toDeepKey` functions ([1977f13](https://github.com/storm-software/storm-stack/commit/1977f13)) +- **utilities:** Added the `toPath` and `toDeepKey` functions + ([1977f13](https://github.com/storm-software/storm-stack/commit/1977f13)) ## 1.21.2 (2024-10-10) - ### Bug Fixes -- **monorepo:** Regenerate markup after token update ([a37ef2a](https://github.com/storm-software/storm-stack/commit/a37ef2a)) +- **monorepo:** Regenerate markup after token update + ([a37ef2a](https://github.com/storm-software/storm-stack/commit/a37ef2a)) ## 1.21.1 (2024-10-10) - ### Bug Fixes -- **types:** Added missing tags and regenerated markdown ([7ab98cc](https://github.com/storm-software/storm-stack/commit/7ab98cc)) +- **types:** Added missing tags and regenerated markdown + ([7ab98cc](https://github.com/storm-software/storm-stack/commit/7ab98cc)) ## 1.21.0 (2024-10-10) - ### Features -- **utilities:** Update the base Nx configuration ([99988e0](https://github.com/storm-software/storm-stack/commit/99988e0)) - +- **utilities:** Update the base Nx configuration + ([99988e0](https://github.com/storm-software/storm-stack/commit/99988e0)) ### Bug Fixes -- **monorepo:** Update the Nx configuration to include release process specifications ([df311f7](https://github.com/storm-software/storm-stack/commit/df311f7)) +- **monorepo:** Update the Nx configuration to include release process + specifications + ([df311f7](https://github.com/storm-software/storm-stack/commit/df311f7)) ## 1.20.4 (2024-10-10) - ### Bug Fixes -- **monorepo:** Regenerate the README file formatting ([b81153c](https://github.com/storm-software/storm-stack/commit/b81153c)) +- **monorepo:** Regenerate the README file formatting + ([b81153c](https://github.com/storm-software/storm-stack/commit/b81153c)) ## 1.20.3 (2024-10-09) - ### Bug Fixes -- **utilities:** Reformatting the README files ([723d68b](https://github.com/storm-software/storm-stack/commit/723d68b)) +- **utilities:** Reformatting the README files + ([723d68b](https://github.com/storm-software/storm-stack/commit/723d68b)) ## 1.20.2 (2024-10-08) - ### Bug Fixes -- **types:** Regenerate the monorepo markdown files ([2b5818e](https://github.com/storm-software/storm-stack/commit/2b5818e)) +- **types:** Regenerate the monorepo markdown files + ([2b5818e](https://github.com/storm-software/storm-stack/commit/2b5818e)) ## 1.20.1 (2024-10-08) - ### Bug Fixes -- **monorepo:** Resolve issue with markdown across entire monorepo ([ee6720c](https://github.com/storm-software/storm-stack/commit/ee6720c)) +- **monorepo:** Resolve issue with markdown across entire monorepo + ([ee6720c](https://github.com/storm-software/storm-stack/commit/ee6720c)) ## 1.20.0 (2024-10-08) - ### Features -- **utilities:** Added the flatten and unflatten utility functions and helper types ([702d44d](https://github.com/storm-software/storm-stack/commit/702d44d)) +- **utilities:** Added the flatten and unflatten utility functions and helper + types + ([702d44d](https://github.com/storm-software/storm-stack/commit/702d44d)) ## 1.19.2 (2024-09-26) - ### Bug Fixes -- **serialization:** Remove `noEmit` compiler option ([6591e6f](https://github.com/storm-software/storm-stack/commit/6591e6f)) +- **serialization:** Remove `noEmit` compiler option + ([6591e6f](https://github.com/storm-software/storm-stack/commit/6591e6f)) ## 1.19.1 (2024-09-26) - ### Bug Fixes -- **serialization:** Remove extra parser code ([67be4ba](https://github.com/storm-software/storm-stack/commit/67be4ba)) - - +- **serialization:** Remove extra parser code + ([67be4ba](https://github.com/storm-software/storm-stack/commit/67be4ba)) ## 1.18.0 (2024-02-10) diff --git a/packages/serialization/README.md b/packages/utils/serialization/README.md similarity index 95% rename from packages/serialization/README.md rename to packages/utils/serialization/README.md index 453fcca9..06fd944c 100644 --- a/packages/serialization/README.md +++ b/packages/utils/serialization/README.md @@ -41,13 +41,14 @@ This package is part of the ⚡Storm Stack monorepo. Storm Stack packages # Storm Serialization -This package contains the serialization logic for the Storm project. It is +This package contains the utils-serialization logic for the Storm project. It is responsible for serializing and deserializing the data that is sent between the -client and the server. The code serialization logic is handled by the +client and the server. The code utils-serialization logic is handled by the [SuperJson](https://github.com/blitz-js/superjson) library. + ## Table of Contents - [Installing](#installing) @@ -73,14 +74,14 @@ client and the server. The code serialization logic is handled by the Using [pnpm](http://pnpm.io): ```bash -pnpm add -D @storm-stack/serialization +pnpm add -D @storm-stack/utils-serialization ```
Using npm ```bash -npm install -D @storm-stack/serialization +npm install -D @storm-stack/utils-serialization ```
@@ -89,7 +90,7 @@ npm install -D @storm-stack/serialization Using yarn ```bash -yarn add -D @storm-stack/serialization +yarn add -D @storm-stack/utils-serialization ``` @@ -108,16 +109,17 @@ commands are available to assist in development. ### Building -Run `nx build serialization` to build the library. +Run `nx build utils-serialization` to build the library. ### Running unit tests -Run `nx test serialization` to execute the unit tests via +Run `nx test utils-serialization` to execute the unit tests via [Jest](https://jestjs.io). ### Linting -Run `nx lint serialization` to run [ESLint](https://eslint.org/) on the package. +Run `nx lint utils-serialization` to run [ESLint](https://eslint.org/) on the +package. diff --git a/packages/utils/serialization/jest.config.ts b/packages/utils/serialization/jest.config.ts new file mode 100644 index 00000000..7b4eb926 --- /dev/null +++ b/packages/utils/serialization/jest.config.ts @@ -0,0 +1,7 @@ +import { getJestConfig } from "@storm-software/testing-tools"; + +export default getJestConfig( + "packages/serialization", + true, + "utils-serialization" +); diff --git a/packages/serialization/package.json b/packages/utils/serialization/package.json similarity index 100% rename from packages/serialization/package.json rename to packages/utils/serialization/package.json diff --git a/packages/utils/serialization/project.json b/packages/utils/serialization/project.json new file mode 100644 index 00000000..78fd6e46 --- /dev/null +++ b/packages/utils/serialization/project.json @@ -0,0 +1,35 @@ +{ + "name": "utils-serialization", + "$schema": "../../../node_modules/nx/schemas/project-schema.json", + "projectType": "library", + "sourceRoot": "packages/utils/serialization/src", + "targets": { + "build": { + "cache": true, + "executor": "@storm-software/workspace-tools:unbuild", + "inputs": ["typescript", "^production"], + "outputs": ["{options.outputPath}"], + "defaultConfiguration": "production", + "clean": true, + "options": { + "type": "packages/utils/serialization/src/index.ts", + "outputPath": "dist/packages/utils/serialization", + "tsConfig": "packages/utils/serialization/tsconfig.json", + "project": "packages/utils/serialization/package.json" + }, + "configurations": { + "production": { + "sourceMap": false, + "verbose": false + }, + "development": { + "sourceMap": true, + "verbose": true + } + } + }, + "nx-release-publish": { + "executor": "@storm-software/workspace-tools:npm-publish" + } + } +} diff --git a/packages/serialization/src/cookie.ts b/packages/utils/serialization/src/cookie.ts similarity index 100% rename from packages/serialization/src/cookie.ts rename to packages/utils/serialization/src/cookie.ts diff --git a/packages/serialization/src/index.ts b/packages/utils/serialization/src/index.ts similarity index 100% rename from packages/serialization/src/index.ts rename to packages/utils/serialization/src/index.ts diff --git a/packages/serialization/src/serializable.ts b/packages/utils/serialization/src/serializable.ts similarity index 100% rename from packages/serialization/src/serializable.ts rename to packages/utils/serialization/src/serializable.ts diff --git a/packages/serialization/src/storm-parser.ts b/packages/utils/serialization/src/storm-parser.ts similarity index 100% rename from packages/serialization/src/storm-parser.ts rename to packages/utils/serialization/src/storm-parser.ts diff --git a/packages/serialization/src/storm-url-builder.ts b/packages/utils/serialization/src/storm-url-builder.ts similarity index 100% rename from packages/serialization/src/storm-url-builder.ts rename to packages/utils/serialization/src/storm-url-builder.ts diff --git a/packages/serialization/src/types.ts b/packages/utils/serialization/src/types.ts similarity index 100% rename from packages/serialization/src/types.ts rename to packages/utils/serialization/src/types.ts diff --git a/packages/utils/serialization/tsconfig.json b/packages/utils/serialization/tsconfig.json new file mode 100644 index 00000000..40928c21 --- /dev/null +++ b/packages/utils/serialization/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "../../../dist/out-tsc" + }, + "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.js", "src/**/*.jsx"], + "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"] +} diff --git a/packages/utils/serialization/tsconfig.spec.json b/packages/utils/serialization/tsconfig.spec.json new file mode 100644 index 00000000..f8bfbb68 --- /dev/null +++ b/packages/utils/serialization/tsconfig.spec.json @@ -0,0 +1,13 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../dist/out-tsc", + "types": ["jest", "node"] + }, + "include": [ + "jest.config.ts", + "src/**/*.test.ts", + "src/**/*.spec.ts", + "src/**/*.d.ts" + ] +} diff --git a/packages/utils/string-fns/CHANGELOG.md b/packages/utils/string-fns/CHANGELOG.md new file mode 100644 index 00000000..f1a97d9f --- /dev/null +++ b/packages/utils/string-fns/CHANGELOG.md @@ -0,0 +1,221 @@ +## 0.18.0 (2024-11-10) + +### Features + +- **date-time:** Resolve issue parsing ISO string in `StormDateTime` constructor + ([c8032d6](https://github.com/storm-software/storm-stack/commit/c8032d6)) + +## 0.17.0 (2024-11-10) + +### Features + +- **cli:** Added the `execute` and `install` utility functions + ([8b04259](https://github.com/storm-software/storm-stack/commit/8b04259)) + +## 0.16.0 (2024-11-08) + +### Features + +- **types:** Regenerate packages with upgraded ops packages + ([936026a](https://github.com/storm-software/storm-stack/commit/936026a)) + +## 0.15.0 (2024-11-07) + +### Features + +- **date-time:** Added the `getMonthIndex` helper function + ([8d979d2](https://github.com/storm-software/storm-stack/commit/8d979d2)) + +## 0.14.2 (2024-10-27) + +### Bug Fixes + +- **date-time:** Update static function to no longer be constants + ([f366ffe](https://github.com/storm-software/storm-stack/commit/f366ffe)) + +## 0.14.1 (2024-10-26) + +### Bug Fixes + +- **hooks:** Resolve issue updating element reference in `useHook` hook + ([340e2f4](https://github.com/storm-software/storm-stack/commit/340e2f4)) + +## 0.14.0 (2024-10-26) + +### Features + +- **types:** Added the `isFileResult` type-checker and updated `status` field + ([2fc6410](https://github.com/storm-software/storm-stack/commit/2fc6410)) + +## 0.13.2 (2024-10-24) + +### Bug Fixes + +- **date-time:** Update the conditionals in validate functions + ([f5f4e26](https://github.com/storm-software/storm-stack/commit/f5f4e26)) + +## 0.13.1 (2024-10-24) + +### Bug Fixes + +- **date-time:** Resolve issue with the date-time format functions + ([f385b23](https://github.com/storm-software/storm-stack/commit/f385b23)) + +## 0.13.0 (2024-10-24) + +### Features + +- **hooks:** Added the `composeRefs` function and hook + ([80a1379](https://github.com/storm-software/storm-stack/commit/80a1379)) + +## 0.12.0 (2024-10-22) + +### Features + +- **monorepo:** Use latest storm build tools in monorepo + ([6bf00c5](https://github.com/storm-software/storm-stack/commit/6bf00c5)) + +## 0.11.2 (2024-10-20) + +### Bug Fixes + +- **date-time:** Resolve issue with parsing ISO-8601 string + ([a63273e](https://github.com/storm-software/storm-stack/commit/a63273e)) + +## 0.11.1 (2024-10-20) + +### Bug Fixes + +- **date-time:** Resolved issue with creating date-time in validation function + ([2a3c1e8](https://github.com/storm-software/storm-stack/commit/2a3c1e8)) + +## 0.11.0 (2024-10-18) + +### Features + +- **date-time:** Provide time zone to the formatting function + ([318ab55](https://github.com/storm-software/storm-stack/commit/318ab55)) + +## 0.10.0 (2024-10-18) + +### Features + +- **date-time:** Added new flags to formatting options for helper functions + ([b702d6c](https://github.com/storm-software/storm-stack/commit/b702d6c)) + +### Bug Fixes + +- **serialization:** Resolved stack overflow issue with `StormParser` class + ([f890df9](https://github.com/storm-software/storm-stack/commit/f890df9)) + +## 0.9.0 (2024-10-15) + +### Features + +- **types:** Added the `index` and `status` properties to the `SelectOption` + type ([7da9603](https://github.com/storm-software/storm-stack/commit/7da9603)) + +## 0.8.0 (2024-10-14) + +### Features + +- **types:** Added the `description` property to the `SelectOption` type + ([94c33d2](https://github.com/storm-software/storm-stack/commit/94c33d2)) + +## 0.7.0 (2024-10-11) + +### Features + +- **types:** Added the `help` and `success` ValidationDetail message types + ([207bf67](https://github.com/storm-software/storm-stack/commit/207bf67)) + +## 0.6.0 (2024-10-10) + +### Features + +- **utilities:** Added the `toPath` and `toDeepKey` functions + ([1977f13](https://github.com/storm-software/storm-stack/commit/1977f13)) + +## 0.5.2 (2024-10-10) + +### Bug Fixes + +- **monorepo:** Regenerate markup after token update + ([a37ef2a](https://github.com/storm-software/storm-stack/commit/a37ef2a)) + +## 0.5.1 (2024-10-10) + +### Bug Fixes + +- **types:** Added missing tags and regenerated markdown + ([7ab98cc](https://github.com/storm-software/storm-stack/commit/7ab98cc)) + +## 0.5.0 (2024-10-10) + +### Features + +- **utilities:** Update the base Nx configuration + ([99988e0](https://github.com/storm-software/storm-stack/commit/99988e0)) + +### Bug Fixes + +- **monorepo:** Update the Nx configuration to include release process + specifications + ([df311f7](https://github.com/storm-software/storm-stack/commit/df311f7)) + +## 0.4.4 (2024-10-10) + +### Bug Fixes + +- **monorepo:** Regenerate the README file formatting + ([b81153c](https://github.com/storm-software/storm-stack/commit/b81153c)) + +## 0.4.3 (2024-10-09) + +### Bug Fixes + +- **utilities:** Reformatting the README files + ([723d68b](https://github.com/storm-software/storm-stack/commit/723d68b)) + +## 0.4.2 (2024-10-08) + +### Bug Fixes + +- **types:** Regenerate the monorepo markdown files + ([2b5818e](https://github.com/storm-software/storm-stack/commit/2b5818e)) + +## 0.4.1 (2024-10-08) + +### Bug Fixes + +- **monorepo:** Resolve issue with markdown across entire monorepo + ([ee6720c](https://github.com/storm-software/storm-stack/commit/ee6720c)) + +## 0.4.0 (2024-10-08) + +### Features + +- **utilities:** Added the flatten and unflatten utility functions and helper + types + ([702d44d](https://github.com/storm-software/storm-stack/commit/702d44d)) + +## 0.3.1 (2024-09-15) + +### Bug Fixes + +- **monorepo:** Resolve issues in git hook configurations + ([f925f93](https://github.com/storm-software/storm-stack/commit/f925f93)) + +## 0.3.0 (2024-09-15) + +### Features + +- **monorepo:** Update base builder version + ([cd06bfc](https://github.com/storm-software/storm-stack/commit/cd06bfc)) + +## 0.2.0 (2024-09-15) + +### Features + +- **string-fns:** Added the acronyms list + ([6b8b612](https://github.com/storm-software/storm-stack/commit/6b8b612)) diff --git a/packages/string-fns/README.md b/packages/utils/string-fns/README.md similarity index 97% rename from packages/string-fns/README.md rename to packages/utils/string-fns/README.md index 10417c5c..1ea1f8e2 100644 --- a/packages/string-fns/README.md +++ b/packages/utils/string-fns/README.md @@ -45,6 +45,7 @@ A package containing various utility functions used to format string values + ## Table of Contents - [Installing](#installing) @@ -70,14 +71,14 @@ A package containing various utility functions used to format string values Using [pnpm](http://pnpm.io): ```bash -pnpm add -D @storm-stack/string-fns +pnpm add -D @storm-stack/utils-string-fns ```
Using npm ```bash -npm install -D @storm-stack/string-fns +npm install -D @storm-stack/utils-string-fns ```
@@ -86,7 +87,7 @@ npm install -D @storm-stack/string-fns Using yarn ```bash -yarn add -D @storm-stack/string-fns +yarn add -D @storm-stack/utils-string-fns ``` @@ -105,16 +106,17 @@ commands are available to assist in development. ### Building -Run `nx build string-fns` to build the library. +Run `nx build utils-string-fns` to build the library. ### Running unit tests -Run `nx test string-fns` to execute the unit tests via +Run `nx test utils-string-fns` to execute the unit tests via [Jest](https://jestjs.io). ### Linting -Run `nx lint string-fns` to run [ESLint](https://eslint.org/) on the package. +Run `nx lint utils-string-fns` to run [ESLint](https://eslint.org/) on the +package. diff --git a/packages/utils/string-fns/jest.config.ts b/packages/utils/string-fns/jest.config.ts new file mode 100644 index 00000000..9828a786 --- /dev/null +++ b/packages/utils/string-fns/jest.config.ts @@ -0,0 +1,3 @@ +import { getJestConfig } from "@storm-software/testing-tools"; + +export default getJestConfig("packages/string-fns", true, "utils-string-fns"); diff --git a/packages/string-fns/package.json b/packages/utils/string-fns/package.json similarity index 100% rename from packages/string-fns/package.json rename to packages/utils/string-fns/package.json diff --git a/packages/utils/string-fns/project.json b/packages/utils/string-fns/project.json new file mode 100644 index 00000000..d010f0a1 --- /dev/null +++ b/packages/utils/string-fns/project.json @@ -0,0 +1,35 @@ +{ + "name": "utils-string-fns", + "$schema": "../../../node_modules/nx/schemas/project-schema.json", + "projectType": "library", + "sourceRoot": "packages/utils/string-fns/src", + "targets": { + "build": { + "cache": true, + "executor": "@storm-software/workspace-tools:unbuild", + "inputs": ["typescript", "^production"], + "outputs": ["{options.outputPath}"], + "defaultConfiguration": "production", + "clean": true, + "options": { + "type": "packages/utils/string-fns/src/index.ts", + "outputPath": "dist/packages/utils/string-fns", + "tsConfig": "packages/utils/string-fns/tsconfig.json", + "project": "packages/utils/string-fns/package.json" + }, + "configurations": { + "production": { + "sourceMap": false, + "verbose": false + }, + "development": { + "sourceMap": true, + "verbose": true + } + } + }, + "nx-release-publish": { + "executor": "@storm-software/workspace-tools:npm-publish" + } + } +} diff --git a/packages/string-fns/src/acronyms.ts b/packages/utils/string-fns/src/acronyms.ts similarity index 100% rename from packages/string-fns/src/acronyms.ts rename to packages/utils/string-fns/src/acronyms.ts diff --git a/packages/string-fns/src/camel-case.ts b/packages/utils/string-fns/src/camel-case.ts similarity index 100% rename from packages/string-fns/src/camel-case.ts rename to packages/utils/string-fns/src/camel-case.ts diff --git a/packages/string-fns/src/constant-case.ts b/packages/utils/string-fns/src/constant-case.ts similarity index 100% rename from packages/string-fns/src/constant-case.ts rename to packages/utils/string-fns/src/constant-case.ts diff --git a/packages/string-fns/src/deburr.ts b/packages/utils/string-fns/src/deburr.ts similarity index 100% rename from packages/string-fns/src/deburr.ts rename to packages/utils/string-fns/src/deburr.ts diff --git a/packages/string-fns/src/escape.ts b/packages/utils/string-fns/src/escape.ts similarity index 100% rename from packages/string-fns/src/escape.ts rename to packages/utils/string-fns/src/escape.ts diff --git a/packages/string-fns/src/get-words.ts b/packages/utils/string-fns/src/get-words.ts similarity index 100% rename from packages/string-fns/src/get-words.ts rename to packages/utils/string-fns/src/get-words.ts diff --git a/packages/string-fns/src/index.ts b/packages/utils/string-fns/src/index.ts similarity index 100% rename from packages/string-fns/src/index.ts rename to packages/utils/string-fns/src/index.ts diff --git a/packages/string-fns/src/kebab-case.ts b/packages/utils/string-fns/src/kebab-case.ts similarity index 100% rename from packages/string-fns/src/kebab-case.ts rename to packages/utils/string-fns/src/kebab-case.ts diff --git a/packages/string-fns/src/lower-case-first.ts b/packages/utils/string-fns/src/lower-case-first.ts similarity index 100% rename from packages/string-fns/src/lower-case-first.ts rename to packages/utils/string-fns/src/lower-case-first.ts diff --git a/packages/string-fns/src/pad.ts b/packages/utils/string-fns/src/pad.ts similarity index 100% rename from packages/string-fns/src/pad.ts rename to packages/utils/string-fns/src/pad.ts diff --git a/packages/string-fns/src/pascal-case.ts b/packages/utils/string-fns/src/pascal-case.ts similarity index 100% rename from packages/string-fns/src/pascal-case.ts rename to packages/utils/string-fns/src/pascal-case.ts diff --git a/packages/string-fns/src/period-split.ts b/packages/utils/string-fns/src/period-split.ts similarity index 100% rename from packages/string-fns/src/period-split.ts rename to packages/utils/string-fns/src/period-split.ts diff --git a/packages/string-fns/src/pretty-bytes.ts b/packages/utils/string-fns/src/pretty-bytes.ts similarity index 100% rename from packages/string-fns/src/pretty-bytes.ts rename to packages/utils/string-fns/src/pretty-bytes.ts diff --git a/packages/string-fns/src/snake-case.ts b/packages/utils/string-fns/src/snake-case.ts similarity index 100% rename from packages/string-fns/src/snake-case.ts rename to packages/utils/string-fns/src/snake-case.ts diff --git a/packages/string-fns/src/start-case.ts b/packages/utils/string-fns/src/start-case.ts similarity index 100% rename from packages/string-fns/src/start-case.ts rename to packages/utils/string-fns/src/start-case.ts diff --git a/packages/string-fns/src/strip-indents.ts b/packages/utils/string-fns/src/strip-indents.ts similarity index 100% rename from packages/string-fns/src/strip-indents.ts rename to packages/utils/string-fns/src/strip-indents.ts diff --git a/packages/string-fns/src/title-case.ts b/packages/utils/string-fns/src/title-case.ts similarity index 100% rename from packages/string-fns/src/title-case.ts rename to packages/utils/string-fns/src/title-case.ts diff --git a/packages/string-fns/src/unescape.ts b/packages/utils/string-fns/src/unescape.ts similarity index 100% rename from packages/string-fns/src/unescape.ts rename to packages/utils/string-fns/src/unescape.ts diff --git a/packages/string-fns/src/upper-case-first.ts b/packages/utils/string-fns/src/upper-case-first.ts similarity index 100% rename from packages/string-fns/src/upper-case-first.ts rename to packages/utils/string-fns/src/upper-case-first.ts diff --git a/packages/server-result/tsconfig.json b/packages/utils/string-fns/tsconfig.json similarity index 66% rename from packages/server-result/tsconfig.json rename to packages/utils/string-fns/tsconfig.json index 60c8d2ec..91ab82fc 100644 --- a/packages/server-result/tsconfig.json +++ b/packages/utils/string-fns/tsconfig.json @@ -1,7 +1,7 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { - "outDir": "../../dist/out-tsc" + "outDir": "../../../dist/out-tsc" }, "include": ["src/**/*.ts", "src/**/*.js", "bin/**/*"], "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"] diff --git a/packages/utils/string-fns/tsconfig.spec.json b/packages/utils/string-fns/tsconfig.spec.json new file mode 100644 index 00000000..f8bfbb68 --- /dev/null +++ b/packages/utils/string-fns/tsconfig.spec.json @@ -0,0 +1,13 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../dist/out-tsc", + "types": ["jest", "node"] + }, + "include": [ + "jest.config.ts", + "src/**/*.test.ts", + "src/**/*.spec.ts", + "src/**/*.d.ts" + ] +} diff --git a/packages/utils/types/CHANGELOG.md b/packages/utils/types/CHANGELOG.md new file mode 100644 index 00000000..ec0aedaf --- /dev/null +++ b/packages/utils/types/CHANGELOG.md @@ -0,0 +1,377 @@ +## 0.34.0 (2024-12-12) + +### Features + +- **types:** Added the `NameValuePair` and `UserBase` base utility types + ([ed101af](https://github.com/storm-software/storm-stack/commit/ed101af)) + +## 0.33.0 (2024-12-03) + +### Features + +- **hooks:** Added the `useMemoStable` and `useCallbackStable` hooks + ([4629ec3](https://github.com/storm-software/storm-stack/commit/4629ec3)) + +## 0.32.0 (2024-12-02) + +### Features + +- **monorepo:** Upgrade workflow actions to use the new base processes + ([14d2f2f](https://github.com/storm-software/storm-stack/commit/14d2f2f)) + +## 0.31.0 (2024-11-10) + +### Features + +- **date-time:** Resolve issue parsing ISO string in `StormDateTime` constructor + ([c8032d6](https://github.com/storm-software/storm-stack/commit/c8032d6)) + +## 0.30.0 (2024-11-10) + +### Features + +- **cli:** Added `@antfu/install-pkg` to improve install + ([26cf962](https://github.com/storm-software/storm-stack/commit/26cf962)) + +## 0.29.0 (2024-11-10) + +### Features + +- **cli:** Added the `execute` and `install` utility functions + ([8b04259](https://github.com/storm-software/storm-stack/commit/8b04259)) + +## 0.28.0 (2024-11-08) + +### Features + +- **monorepo:** Upgrade the workspace's Nx package versions + ([075a024](https://github.com/storm-software/storm-stack/commit/075a024)) + +## 0.27.0 (2024-11-08) + +### Features + +- **types:** Regenerate packages with upgraded ops packages + ([936026a](https://github.com/storm-software/storm-stack/commit/936026a)) + +## 0.26.0 (2024-11-08) + +### Features + +- **errors:** Added the `createFromData` helper function + ([c15576d](https://github.com/storm-software/storm-stack/commit/c15576d)) + +## 0.25.0 (2024-11-07) + +### Features + +- **date-time:** Added the `getMonthIndex` helper function + ([8d979d2](https://github.com/storm-software/storm-stack/commit/8d979d2)) + +## 0.24.2 (2024-10-31) + +### Bug Fixes + +- **date-time:** Resolve issue with incorrectly exporting classes + ([140d576](https://github.com/storm-software/storm-stack/commit/140d576)) + +## 0.24.1 (2024-10-27) + +### Bug Fixes + +- **date-time:** Update static function to no longer be constants + ([f366ffe](https://github.com/storm-software/storm-stack/commit/f366ffe)) + +## 0.24.0 (2024-10-27) + +### Features + +- **date-time:** Added separate create helper functions for date-time classes + ([569673f](https://github.com/storm-software/storm-stack/commit/569673f)) + +## 0.23.1 (2024-10-26) + +### Bug Fixes + +- **hooks:** Resolve issue updating element reference in `useHook` hook + ([340e2f4](https://github.com/storm-software/storm-stack/commit/340e2f4)) + +## 0.23.0 (2024-10-26) + +### Features + +- **hooks:** Added the `useHover`, `useIdle`, and `useNetworkState` hooks + ([b52aa2f](https://github.com/storm-software/storm-stack/commit/b52aa2f)) + +## 0.22.0 (2024-10-26) + +### Features + +- **types:** Added the `isFileResult` type-checker and updated `status` field + ([2fc6410](https://github.com/storm-software/storm-stack/commit/2fc6410)) + +## 0.21.0 (2024-10-26) + +### Features + +- **types:** Added the `FileResult` shared type definition + ([f9d07c6](https://github.com/storm-software/storm-stack/commit/f9d07c6)) + +## 0.20.3 (2024-10-24) + +### Bug Fixes + +- **date-time:** Update the conditionals in validate functions + ([f5f4e26](https://github.com/storm-software/storm-stack/commit/f5f4e26)) + +## 0.20.2 (2024-10-24) + +### Bug Fixes + +- **date-time:** Resolve issue with null date-time validations + ([3eaf348](https://github.com/storm-software/storm-stack/commit/3eaf348)) + +## 0.20.1 (2024-10-24) + +### Bug Fixes + +- **date-time:** Resolve issue with the date-time format functions + ([f385b23](https://github.com/storm-software/storm-stack/commit/f385b23)) + +## 0.20.0 (2024-10-24) + +### Features + +- **hooks:** Added `useBattery`, `useClickAway`, and `useCopyToClipboard` hooks + ([556db4d](https://github.com/storm-software/storm-stack/commit/556db4d)) + +## 0.19.0 (2024-10-24) + +### Features + +- **hooks:** Added the `composeRefs` function and hook + ([80a1379](https://github.com/storm-software/storm-stack/commit/80a1379)) + +## 0.18.0 (2024-10-22) + +### Features + +- **types:** Add type parameters and the `icon` property to the `SelectOption` + type ([c0ae1d6](https://github.com/storm-software/storm-stack/commit/c0ae1d6)) + +## 0.17.0 (2024-10-22) + +### Features + +- **monorepo:** Use latest storm build tools in monorepo + ([6bf00c5](https://github.com/storm-software/storm-stack/commit/6bf00c5)) + +## 0.16.0 (2024-10-20) + +### Features + +- **serialization:** Added the `parseCookie` and `serializeCookie` helper + functions + ([0b695ef](https://github.com/storm-software/storm-stack/commit/0b695ef)) + +## 0.15.3 (2024-10-20) + +### Bug Fixes + +- **date-time:** Resolve issue with parsing ISO-8601 string + ([a63273e](https://github.com/storm-software/storm-stack/commit/a63273e)) + +## 0.15.2 (2024-10-20) + +### Bug Fixes + +- **date-time:** Resolve issue with call to validation prior to construction + ([d020d67](https://github.com/storm-software/storm-stack/commit/d020d67)) + +## 0.15.1 (2024-10-20) + +### Bug Fixes + +- **date-time:** Resolved issue with creating date-time in validation function + ([2a3c1e8](https://github.com/storm-software/storm-stack/commit/2a3c1e8)) + +## 0.15.0 (2024-10-20) + +### Features + +- **date-time:** Added the day of the month validation to date classes + ([734d0c8](https://github.com/storm-software/storm-stack/commit/734d0c8)) + +## 0.14.0 (2024-10-18) + +### Features + +- **date-time:** Provide time zone to the formatting function + ([318ab55](https://github.com/storm-software/storm-stack/commit/318ab55)) + +## 0.13.0 (2024-10-18) + +### Features + +- **date-time:** Added the `getDefaultTimeZone` function to the `StormDateTime` + class + ([f2fac83](https://github.com/storm-software/storm-stack/commit/f2fac83)) + +## 0.12.0 (2024-10-18) + +### Features + +- **date-time:** Added the static validate method to the `StormDateTime` utility + classes + ([3169747](https://github.com/storm-software/storm-stack/commit/3169747)) + +## 0.11.0 (2024-10-18) + +### Features + +- **date-time:** Added new flags to formatting options for helper functions + ([b702d6c](https://github.com/storm-software/storm-stack/commit/b702d6c)) + +### Bug Fixes + +- **serialization:** Resolved stack overflow issue with `StormParser` class + ([f890df9](https://github.com/storm-software/storm-stack/commit/f890df9)) + +## 0.10.0 (2024-10-15) + +### Features + +- **types:** Added the `index` and `status` properties to the `SelectOption` + type ([7da9603](https://github.com/storm-software/storm-stack/commit/7da9603)) + +## 0.9.0 (2024-10-14) + +### Features + +- **types:** Added the `description` property to the `SelectOption` type + ([94c33d2](https://github.com/storm-software/storm-stack/commit/94c33d2)) + +## 0.8.0 (2024-10-11) + +### Features + +- **types:** Added the `help` and `success` ValidationDetail message types + ([207bf67](https://github.com/storm-software/storm-stack/commit/207bf67)) + +## 0.7.0 (2024-10-10) + +### Features + +- **utilities:** Added the `toPath` and `toDeepKey` functions + ([1977f13](https://github.com/storm-software/storm-stack/commit/1977f13)) + +## 0.6.2 (2024-10-10) + +### Bug Fixes + +- **monorepo:** Regenerate markup after token update + ([a37ef2a](https://github.com/storm-software/storm-stack/commit/a37ef2a)) + +## 0.6.1 (2024-10-10) + +### Bug Fixes + +- **types:** Added missing tags and regenerated markdown + ([7ab98cc](https://github.com/storm-software/storm-stack/commit/7ab98cc)) + +## 0.6.0 (2024-10-10) + +### Features + +- **utilities:** Update the base Nx configuration + ([99988e0](https://github.com/storm-software/storm-stack/commit/99988e0)) + +### Bug Fixes + +- **monorepo:** Update the Nx configuration to include release process + specifications + ([df311f7](https://github.com/storm-software/storm-stack/commit/df311f7)) + +## 0.5.4 (2024-10-10) + +### Bug Fixes + +- **monorepo:** Regenerate the README file formatting + ([b81153c](https://github.com/storm-software/storm-stack/commit/b81153c)) + +## 0.5.3 (2024-10-09) + +### Bug Fixes + +- **utilities:** Reformatting the README files + ([723d68b](https://github.com/storm-software/storm-stack/commit/723d68b)) + +## 0.5.2 (2024-10-08) + +### Bug Fixes + +- **types:** Regenerate the monorepo markdown files + ([2b5818e](https://github.com/storm-software/storm-stack/commit/2b5818e)) + +## 0.5.1 (2024-10-08) + +### Bug Fixes + +- **monorepo:** Resolve issue with markdown across entire monorepo + ([ee6720c](https://github.com/storm-software/storm-stack/commit/ee6720c)) + +## 0.5.0 (2024-10-08) + +### Features + +- **utilities:** Added the flatten and unflatten utility functions and helper + types + ([702d44d](https://github.com/storm-software/storm-stack/commit/702d44d)) + +- **errors:** Added the `ErrorType` concept to separate error data behavior + ([cfffb39](https://github.com/storm-software/storm-stack/commit/cfffb39)) + +- **hooks:** Initial check-in of the base reusable React `hooks` package + ([6af6750](https://github.com/storm-software/storm-stack/commit/6af6750)) + +## 0.4.2 (2024-09-15) + +### Bug Fixes + +- **monorepo:** Resolve issues in git hook configurations + ([f925f93](https://github.com/storm-software/storm-stack/commit/f925f93)) + +## 0.4.1 (2024-09-15) + +### Bug Fixes + +- **types:** Remove unused node poyfill + ([6d1cf31](https://github.com/storm-software/storm-stack/commit/6d1cf31)) + +## 0.4.0 (2024-09-15) + +### Features + +- **monorepo:** Update base builder version + ([cd06bfc](https://github.com/storm-software/storm-stack/commit/cd06bfc)) + +## 0.3.0 (2024-09-15) + +### Features + +- **string-fns:** Added the acronyms list + ([6b8b612](https://github.com/storm-software/storm-stack/commit/6b8b612)) + +## 0.2.1 (2024-09-15) + +### Bug Fixes + +- **types:** Resolved ESLint rule issues + ([0cbebee](https://github.com/storm-software/storm-stack/commit/0cbebee)) + +## 0.2.0 (2024-09-15) + +### Features + +- **monorepo:** Upgrade the base builder storm package + ([6d39b20](https://github.com/storm-software/storm-stack/commit/6d39b20)) diff --git a/packages/types/README.md b/packages/utils/types/README.md similarity index 97% rename from packages/types/README.md rename to packages/utils/types/README.md index af473d75..323b9b32 100644 --- a/packages/types/README.md +++ b/packages/utils/types/README.md @@ -41,10 +41,11 @@ This package is part of the ⚡Storm Stack monorepo. Storm Stack packages # Types -A package containing various type checking functions and utility types +A package containing various type checking functions and utility utils-types + ## Table of Contents - [Installing](#installing) @@ -70,14 +71,14 @@ A package containing various type checking functions and utility types Using [pnpm](http://pnpm.io): ```bash -pnpm add -D @storm-stack/types +pnpm add -D @storm-stack/utils-types ```
Using npm ```bash -npm install -D @storm-stack/types +npm install -D @storm-stack/utils-types ```
@@ -86,7 +87,7 @@ npm install -D @storm-stack/types Using yarn ```bash -yarn add -D @storm-stack/types +yarn add -D @storm-stack/utils-types ``` @@ -105,15 +106,16 @@ commands are available to assist in development. ### Building -Run `nx build types` to build the library. +Run `nx build utils-types` to build the library. ### Running unit tests -Run `nx test types` to execute the unit tests via [Jest](https://jestjs.io). +Run `nx test utils-types` to execute the unit tests via +[Jest](https://jestjs.io). ### Linting -Run `nx lint types` to run [ESLint](https://eslint.org/) on the package. +Run `nx lint utils-types` to run [ESLint](https://eslint.org/) on the package. diff --git a/packages/types/jest.config.ts b/packages/utils/types/jest.config.ts similarity index 92% rename from packages/types/jest.config.ts rename to packages/utils/types/jest.config.ts index 1866018f..f6f94424 100644 --- a/packages/types/jest.config.ts +++ b/packages/utils/types/jest.config.ts @@ -18,4 +18,4 @@ import { getJestConfig } from "@storm-software/testing-tools"; -export default getJestConfig("packages/types", true, "types"); +export default getJestConfig("packages/types", true, "utils-types"); diff --git a/packages/types/package.json b/packages/utils/types/package.json similarity index 100% rename from packages/types/package.json rename to packages/utils/types/package.json diff --git a/packages/date-time/project.json b/packages/utils/types/project.json similarity index 64% rename from packages/date-time/project.json rename to packages/utils/types/project.json index a402863e..86facb67 100644 --- a/packages/date-time/project.json +++ b/packages/utils/types/project.json @@ -1,8 +1,8 @@ { - "name": "date-time", - "$schema": "../../node_modules/nx/schemas/project-schema.json", + "name": "utils-types", + "$schema": "../../../node_modules/nx/schemas/project-schema.json", "projectType": "library", - "sourceRoot": "packages/date-time/src", + "sourceRoot": "packages/utils/types/src", "targets": { "build": { "cache": true, @@ -12,10 +12,10 @@ "defaultConfiguration": "production", "clean": true, "options": { - "type": "packages/date-time/src/index.ts", - "outputPath": "dist/packages/date-time", - "tsConfig": "packages/date-time/tsconfig.json", - "project": "packages/date-time/package.json" + "type": "packages/utils/types/src/index.ts", + "outputPath": "dist/packages/utils/types", + "tsConfig": "packages/utils/types/tsconfig.json", + "project": "packages/utils/types/package.json" }, "configurations": { "production": { diff --git a/packages/types/src/convert/buffer-to-string.ts b/packages/utils/types/src/convert/buffer-to-string.ts similarity index 100% rename from packages/types/src/convert/buffer-to-string.ts rename to packages/utils/types/src/convert/buffer-to-string.ts diff --git a/packages/types/src/convert/index.ts b/packages/utils/types/src/convert/index.ts similarity index 100% rename from packages/types/src/convert/index.ts rename to packages/utils/types/src/convert/index.ts diff --git a/packages/types/src/convert/string-to-uint8array.ts b/packages/utils/types/src/convert/string-to-uint8array.ts similarity index 100% rename from packages/types/src/convert/string-to-uint8array.ts rename to packages/utils/types/src/convert/string-to-uint8array.ts diff --git a/packages/types/src/convert/to-string-key.ts b/packages/utils/types/src/convert/to-string-key.ts similarity index 100% rename from packages/types/src/convert/to-string-key.ts rename to packages/utils/types/src/convert/to-string-key.ts diff --git a/packages/types/src/convert/uint8array-to-string.ts b/packages/utils/types/src/convert/uint8array-to-string.ts similarity index 100% rename from packages/types/src/convert/uint8array-to-string.ts rename to packages/utils/types/src/convert/uint8array-to-string.ts diff --git a/packages/types/src/index.ts b/packages/utils/types/src/index.ts similarity index 100% rename from packages/types/src/index.ts rename to packages/utils/types/src/index.ts diff --git a/packages/types/src/type-checks/get-object-tag.ts b/packages/utils/types/src/type-checks/get-object-tag.ts similarity index 100% rename from packages/types/src/type-checks/get-object-tag.ts rename to packages/utils/types/src/type-checks/get-object-tag.ts diff --git a/packages/types/src/type-checks/index.ts b/packages/utils/types/src/type-checks/index.ts similarity index 100% rename from packages/types/src/type-checks/index.ts rename to packages/utils/types/src/type-checks/index.ts diff --git a/packages/types/src/type-checks/is-array-like.ts b/packages/utils/types/src/type-checks/is-array-like.ts similarity index 100% rename from packages/types/src/type-checks/is-array-like.ts rename to packages/utils/types/src/type-checks/is-array-like.ts diff --git a/packages/types/src/type-checks/is-async-iterable.ts b/packages/utils/types/src/type-checks/is-async-iterable.ts similarity index 100% rename from packages/types/src/type-checks/is-async-iterable.ts rename to packages/utils/types/src/type-checks/is-async-iterable.ts diff --git a/packages/types/src/type-checks/is-bigint.ts b/packages/utils/types/src/type-checks/is-bigint.ts similarity index 100% rename from packages/types/src/type-checks/is-bigint.ts rename to packages/utils/types/src/type-checks/is-bigint.ts diff --git a/packages/types/src/type-checks/is-boolean.ts b/packages/utils/types/src/type-checks/is-boolean.ts similarity index 100% rename from packages/types/src/type-checks/is-boolean.ts rename to packages/utils/types/src/type-checks/is-boolean.ts diff --git a/packages/types/src/type-checks/is-buffer.ts b/packages/utils/types/src/type-checks/is-buffer.ts similarity index 100% rename from packages/types/src/type-checks/is-buffer.ts rename to packages/utils/types/src/type-checks/is-buffer.ts diff --git a/packages/types/src/type-checks/is-collection.ts b/packages/utils/types/src/type-checks/is-collection.ts similarity index 100% rename from packages/types/src/type-checks/is-collection.ts rename to packages/utils/types/src/type-checks/is-collection.ts diff --git a/packages/types/src/type-checks/is-date.ts b/packages/utils/types/src/type-checks/is-date.ts similarity index 100% rename from packages/types/src/type-checks/is-date.ts rename to packages/utils/types/src/type-checks/is-date.ts diff --git a/packages/types/src/type-checks/is-deep-key.ts b/packages/utils/types/src/type-checks/is-deep-key.ts similarity index 100% rename from packages/types/src/type-checks/is-deep-key.ts rename to packages/utils/types/src/type-checks/is-deep-key.ts diff --git a/packages/types/src/type-checks/is-empty-object.ts b/packages/utils/types/src/type-checks/is-empty-object.ts similarity index 100% rename from packages/types/src/type-checks/is-empty-object.ts rename to packages/utils/types/src/type-checks/is-empty-object.ts diff --git a/packages/types/src/type-checks/is-empty-string.ts b/packages/utils/types/src/type-checks/is-empty-string.ts similarity index 100% rename from packages/types/src/type-checks/is-empty-string.ts rename to packages/utils/types/src/type-checks/is-empty-string.ts diff --git a/packages/types/src/type-checks/is-empty.ts b/packages/utils/types/src/type-checks/is-empty.ts similarity index 100% rename from packages/types/src/type-checks/is-empty.ts rename to packages/utils/types/src/type-checks/is-empty.ts diff --git a/packages/types/src/type-checks/is-equal.ts b/packages/utils/types/src/type-checks/is-equal.ts similarity index 100% rename from packages/types/src/type-checks/is-equal.ts rename to packages/utils/types/src/type-checks/is-equal.ts diff --git a/packages/types/src/type-checks/is-error.ts b/packages/utils/types/src/type-checks/is-error.ts similarity index 100% rename from packages/types/src/type-checks/is-error.ts rename to packages/utils/types/src/type-checks/is-error.ts diff --git a/packages/types/src/type-checks/is-file-result.ts b/packages/utils/types/src/type-checks/is-file-result.ts similarity index 100% rename from packages/types/src/type-checks/is-file-result.ts rename to packages/utils/types/src/type-checks/is-file-result.ts diff --git a/packages/types/src/type-checks/is-float.ts b/packages/utils/types/src/type-checks/is-float.ts similarity index 100% rename from packages/types/src/type-checks/is-float.ts rename to packages/utils/types/src/type-checks/is-float.ts diff --git a/packages/types/src/type-checks/is-function.ts b/packages/utils/types/src/type-checks/is-function.ts similarity index 100% rename from packages/types/src/type-checks/is-function.ts rename to packages/utils/types/src/type-checks/is-function.ts diff --git a/packages/types/src/type-checks/is-integer.ts b/packages/utils/types/src/type-checks/is-integer.ts similarity index 100% rename from packages/types/src/type-checks/is-integer.ts rename to packages/utils/types/src/type-checks/is-integer.ts diff --git a/packages/types/src/type-checks/is-mergeable-object.ts b/packages/utils/types/src/type-checks/is-mergeable-object.ts similarity index 100% rename from packages/types/src/type-checks/is-mergeable-object.ts rename to packages/utils/types/src/type-checks/is-mergeable-object.ts diff --git a/packages/types/src/type-checks/is-non-null-object.ts b/packages/utils/types/src/type-checks/is-non-null-object.ts similarity index 100% rename from packages/types/src/type-checks/is-non-null-object.ts rename to packages/utils/types/src/type-checks/is-non-null-object.ts diff --git a/packages/types/src/type-checks/is-not-empty.ts b/packages/utils/types/src/type-checks/is-not-empty.ts similarity index 100% rename from packages/types/src/type-checks/is-not-empty.ts rename to packages/utils/types/src/type-checks/is-not-empty.ts diff --git a/packages/types/src/type-checks/is-null.ts b/packages/utils/types/src/type-checks/is-null.ts similarity index 100% rename from packages/types/src/type-checks/is-null.ts rename to packages/utils/types/src/type-checks/is-null.ts diff --git a/packages/types/src/type-checks/is-number.ts b/packages/utils/types/src/type-checks/is-number.ts similarity index 100% rename from packages/types/src/type-checks/is-number.ts rename to packages/utils/types/src/type-checks/is-number.ts diff --git a/packages/types/src/type-checks/is-object-index.ts b/packages/utils/types/src/type-checks/is-object-index.ts similarity index 100% rename from packages/types/src/type-checks/is-object-index.ts rename to packages/utils/types/src/type-checks/is-object-index.ts diff --git a/packages/types/src/type-checks/is-object.ts b/packages/utils/types/src/type-checks/is-object.ts similarity index 100% rename from packages/types/src/type-checks/is-object.ts rename to packages/utils/types/src/type-checks/is-object.ts diff --git a/packages/types/src/type-checks/is-plain-object.ts b/packages/utils/types/src/type-checks/is-plain-object.ts similarity index 100% rename from packages/types/src/type-checks/is-plain-object.ts rename to packages/utils/types/src/type-checks/is-plain-object.ts diff --git a/packages/types/src/type-checks/is-primitive.ts b/packages/utils/types/src/type-checks/is-primitive.ts similarity index 100% rename from packages/types/src/type-checks/is-primitive.ts rename to packages/utils/types/src/type-checks/is-primitive.ts diff --git a/packages/types/src/type-checks/is-promise.ts b/packages/utils/types/src/type-checks/is-promise.ts similarity index 100% rename from packages/types/src/type-checks/is-promise.ts rename to packages/utils/types/src/type-checks/is-promise.ts diff --git a/packages/types/src/type-checks/is-react-element.ts b/packages/utils/types/src/type-checks/is-react-element.ts similarity index 100% rename from packages/types/src/type-checks/is-react-element.ts rename to packages/utils/types/src/type-checks/is-react-element.ts diff --git a/packages/types/src/type-checks/is-ref.ts b/packages/utils/types/src/type-checks/is-ref.ts similarity index 100% rename from packages/types/src/type-checks/is-ref.ts rename to packages/utils/types/src/type-checks/is-ref.ts diff --git a/packages/types/src/type-checks/is-regexp.ts b/packages/utils/types/src/type-checks/is-regexp.ts similarity index 100% rename from packages/types/src/type-checks/is-regexp.ts rename to packages/utils/types/src/type-checks/is-regexp.ts diff --git a/packages/types/src/type-checks/is-select-option.ts b/packages/utils/types/src/type-checks/is-select-option.ts similarity index 100% rename from packages/types/src/type-checks/is-select-option.ts rename to packages/utils/types/src/type-checks/is-select-option.ts diff --git a/packages/types/src/type-checks/is-set-object.ts b/packages/utils/types/src/type-checks/is-set-object.ts similarity index 100% rename from packages/types/src/type-checks/is-set-object.ts rename to packages/utils/types/src/type-checks/is-set-object.ts diff --git a/packages/types/src/type-checks/is-set-string.ts b/packages/utils/types/src/type-checks/is-set-string.ts similarity index 100% rename from packages/types/src/type-checks/is-set-string.ts rename to packages/utils/types/src/type-checks/is-set-string.ts diff --git a/packages/types/src/type-checks/is-set.ts b/packages/utils/types/src/type-checks/is-set.ts similarity index 100% rename from packages/types/src/type-checks/is-set.ts rename to packages/utils/types/src/type-checks/is-set.ts diff --git a/packages/types/src/type-checks/is-string.ts b/packages/utils/types/src/type-checks/is-string.ts similarity index 100% rename from packages/types/src/type-checks/is-string.ts rename to packages/utils/types/src/type-checks/is-string.ts diff --git a/packages/types/src/type-checks/is-symbol.ts b/packages/utils/types/src/type-checks/is-symbol.ts similarity index 100% rename from packages/types/src/type-checks/is-symbol.ts rename to packages/utils/types/src/type-checks/is-symbol.ts diff --git a/packages/types/src/type-checks/is-typed-array.ts b/packages/utils/types/src/type-checks/is-typed-array.ts similarity index 100% rename from packages/types/src/type-checks/is-typed-array.ts rename to packages/utils/types/src/type-checks/is-typed-array.ts diff --git a/packages/types/src/type-checks/is-typed.ts b/packages/utils/types/src/type-checks/is-typed.ts similarity index 100% rename from packages/types/src/type-checks/is-typed.ts rename to packages/utils/types/src/type-checks/is-typed.ts diff --git a/packages/types/src/type-checks/is-undefined.ts b/packages/utils/types/src/type-checks/is-undefined.ts similarity index 100% rename from packages/types/src/type-checks/is-undefined.ts rename to packages/utils/types/src/type-checks/is-undefined.ts diff --git a/packages/types/src/type-checks/property-exists.ts b/packages/utils/types/src/type-checks/property-exists.ts similarity index 100% rename from packages/types/src/type-checks/property-exists.ts rename to packages/utils/types/src/type-checks/property-exists.ts diff --git a/packages/types/src/type-checks/type-detect.ts b/packages/utils/types/src/type-checks/type-detect.ts similarity index 100% rename from packages/types/src/type-checks/type-detect.ts rename to packages/utils/types/src/type-checks/type-detect.ts diff --git a/packages/types/src/utility-types/array.ts b/packages/utils/types/src/utility-types/array.ts similarity index 100% rename from packages/types/src/utility-types/array.ts rename to packages/utils/types/src/utility-types/array.ts diff --git a/packages/types/src/utility-types/async.ts b/packages/utils/types/src/utility-types/async.ts similarity index 100% rename from packages/types/src/utility-types/async.ts rename to packages/utils/types/src/utility-types/async.ts diff --git a/packages/types/src/utility-types/base.ts b/packages/utils/types/src/utility-types/base.ts similarity index 100% rename from packages/types/src/utility-types/base.ts rename to packages/utils/types/src/utility-types/base.ts diff --git a/packages/types/src/utility-types/file.ts b/packages/utils/types/src/utility-types/file.ts similarity index 100% rename from packages/types/src/utility-types/file.ts rename to packages/utils/types/src/utility-types/file.ts diff --git a/packages/types/src/utility-types/form.ts b/packages/utils/types/src/utility-types/form.ts similarity index 100% rename from packages/types/src/utility-types/form.ts rename to packages/utils/types/src/utility-types/form.ts diff --git a/packages/types/src/utility-types/index.ts b/packages/utils/types/src/utility-types/index.ts similarity index 100% rename from packages/types/src/utility-types/index.ts rename to packages/utils/types/src/utility-types/index.ts diff --git a/packages/types/src/utility-types/json.ts b/packages/utils/types/src/utility-types/json.ts similarity index 100% rename from packages/types/src/utility-types/json.ts rename to packages/utils/types/src/utility-types/json.ts diff --git a/packages/types/src/utility-types/logic.ts b/packages/utils/types/src/utility-types/logic.ts similarity index 100% rename from packages/types/src/utility-types/logic.ts rename to packages/utils/types/src/utility-types/logic.ts diff --git a/packages/types/src/utility-types/messages.ts b/packages/utils/types/src/utility-types/messages.ts similarity index 100% rename from packages/types/src/utility-types/messages.ts rename to packages/utils/types/src/utility-types/messages.ts diff --git a/packages/types/src/utility-types/navigator.ts b/packages/utils/types/src/utility-types/navigator.ts similarity index 100% rename from packages/types/src/utility-types/navigator.ts rename to packages/utils/types/src/utility-types/navigator.ts diff --git a/packages/types/src/utility-types/number.ts b/packages/utils/types/src/utility-types/number.ts similarity index 100% rename from packages/types/src/utility-types/number.ts rename to packages/utils/types/src/utility-types/number.ts diff --git a/packages/types/src/utility-types/object.ts b/packages/utils/types/src/utility-types/object.ts similarity index 100% rename from packages/types/src/utility-types/object.ts rename to packages/utils/types/src/utility-types/object.ts diff --git a/packages/types/src/utility-types/package-json.ts b/packages/utils/types/src/utility-types/package-json.ts similarity index 100% rename from packages/types/src/utility-types/package-json.ts rename to packages/utils/types/src/utility-types/package-json.ts diff --git a/packages/types/src/utility-types/string.ts b/packages/utils/types/src/utility-types/string.ts similarity index 100% rename from packages/types/src/utility-types/string.ts rename to packages/utils/types/src/utility-types/string.ts diff --git a/packages/types/src/utility-types/tsconfig.ts b/packages/utils/types/src/utility-types/tsconfig.ts similarity index 100% rename from packages/types/src/utility-types/tsconfig.ts rename to packages/utils/types/src/utility-types/tsconfig.ts diff --git a/packages/types/src/utility-types/user.ts b/packages/utils/types/src/utility-types/user.ts similarity index 100% rename from packages/types/src/utility-types/user.ts rename to packages/utils/types/src/utility-types/user.ts diff --git a/packages/types/src/utility-types/utilities.ts b/packages/utils/types/src/utility-types/utilities.ts similarity index 100% rename from packages/types/src/utility-types/utilities.ts rename to packages/utils/types/src/utility-types/utilities.ts diff --git a/packages/types/src/utility-types/validations.ts b/packages/utils/types/src/utility-types/validations.ts similarity index 100% rename from packages/types/src/utility-types/validations.ts rename to packages/utils/types/src/utility-types/validations.ts diff --git a/packages/types/tsconfig.json b/packages/utils/types/tsconfig.json similarity index 69% rename from packages/types/tsconfig.json rename to packages/utils/types/tsconfig.json index 5f31641c..9224c880 100644 --- a/packages/types/tsconfig.json +++ b/packages/utils/types/tsconfig.json @@ -1,7 +1,7 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { - "outDir": "../../dist/out-tsc", + "outDir": "../../../dist/out-tsc", "lib": ["ESNext", "DOM"] }, "include": ["src/**/*.ts", "src/**/*.js", "bin/**/*"], diff --git a/packages/utils/types/tsconfig.spec.json b/packages/utils/types/tsconfig.spec.json new file mode 100644 index 00000000..f8bfbb68 --- /dev/null +++ b/packages/utils/types/tsconfig.spec.json @@ -0,0 +1,13 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../dist/out-tsc", + "types": ["jest", "node"] + }, + "include": [ + "jest.config.ts", + "src/**/*.test.ts", + "src/**/*.spec.ts", + "src/**/*.d.ts" + ] +} diff --git a/packages/unique-identifier/CHANGELOG.md b/packages/utils/unique-identifier/CHANGELOG.md similarity index 89% rename from packages/unique-identifier/CHANGELOG.md rename to packages/utils/unique-identifier/CHANGELOG.md index e64c50c2..8f5aee35 100644 --- a/packages/unique-identifier/CHANGELOG.md +++ b/packages/utils/unique-identifier/CHANGELOG.md @@ -2,199 +2,202 @@ ### Features -- **date-time:** Resolve issue parsing ISO string in `StormDateTime` constructor ([c8032d6](https://github.com/storm-software/storm-stack/commit/c8032d6)) +- **date-time:** Resolve issue parsing ISO string in `StormDateTime` constructor + ([c8032d6](https://github.com/storm-software/storm-stack/commit/c8032d6)) ## 1.32.0 (2024-11-10) ### Features -- **cli:** Added the `execute` and `install` utility functions ([8b04259](https://github.com/storm-software/storm-stack/commit/8b04259)) +- **cli:** Added the `execute` and `install` utility functions + ([8b04259](https://github.com/storm-software/storm-stack/commit/8b04259)) ## 1.31.0 (2024-11-08) ### Features -- **types:** Regenerate packages with upgraded ops packages ([936026a](https://github.com/storm-software/storm-stack/commit/936026a)) +- **types:** Regenerate packages with upgraded ops packages + ([936026a](https://github.com/storm-software/storm-stack/commit/936026a)) ## 1.30.0 (2024-11-07) - ### Features -- **date-time:** Added the `getMonthIndex` helper function ([8d979d2](https://github.com/storm-software/storm-stack/commit/8d979d2)) +- **date-time:** Added the `getMonthIndex` helper function + ([8d979d2](https://github.com/storm-software/storm-stack/commit/8d979d2)) ## 1.29.2 (2024-10-27) - ### Bug Fixes -- **date-time:** Update static function to no longer be constants ([f366ffe](https://github.com/storm-software/storm-stack/commit/f366ffe)) +- **date-time:** Update static function to no longer be constants + ([f366ffe](https://github.com/storm-software/storm-stack/commit/f366ffe)) ## 1.29.1 (2024-10-26) - ### Bug Fixes -- **hooks:** Resolve issue updating element reference in `useHook` hook ([340e2f4](https://github.com/storm-software/storm-stack/commit/340e2f4)) +- **hooks:** Resolve issue updating element reference in `useHook` hook + ([340e2f4](https://github.com/storm-software/storm-stack/commit/340e2f4)) ## 1.29.0 (2024-10-26) - ### Features -- **types:** Added the `isFileResult` type-checker and updated `status` field ([2fc6410](https://github.com/storm-software/storm-stack/commit/2fc6410)) +- **types:** Added the `isFileResult` type-checker and updated `status` field + ([2fc6410](https://github.com/storm-software/storm-stack/commit/2fc6410)) ## 1.28.2 (2024-10-24) - ### Bug Fixes -- **date-time:** Update the conditionals in validate functions ([f5f4e26](https://github.com/storm-software/storm-stack/commit/f5f4e26)) +- **date-time:** Update the conditionals in validate functions + ([f5f4e26](https://github.com/storm-software/storm-stack/commit/f5f4e26)) ## 1.28.1 (2024-10-24) - ### Bug Fixes -- **date-time:** Resolve issue with the date-time format functions ([f385b23](https://github.com/storm-software/storm-stack/commit/f385b23)) +- **date-time:** Resolve issue with the date-time format functions + ([f385b23](https://github.com/storm-software/storm-stack/commit/f385b23)) ## 1.28.0 (2024-10-24) - ### Features -- **hooks:** Added the `composeRefs` function and hook ([80a1379](https://github.com/storm-software/storm-stack/commit/80a1379)) +- **hooks:** Added the `composeRefs` function and hook + ([80a1379](https://github.com/storm-software/storm-stack/commit/80a1379)) ## 1.27.0 (2024-10-22) - ### Features -- **monorepo:** Use latest storm build tools in monorepo ([6bf00c5](https://github.com/storm-software/storm-stack/commit/6bf00c5)) +- **monorepo:** Use latest storm build tools in monorepo + ([6bf00c5](https://github.com/storm-software/storm-stack/commit/6bf00c5)) ## 1.26.2 (2024-10-20) - ### Bug Fixes -- **date-time:** Resolve issue with parsing ISO-8601 string ([a63273e](https://github.com/storm-software/storm-stack/commit/a63273e)) +- **date-time:** Resolve issue with parsing ISO-8601 string + ([a63273e](https://github.com/storm-software/storm-stack/commit/a63273e)) ## 1.26.1 (2024-10-20) - ### Bug Fixes -- **date-time:** Resolved issue with creating date-time in validation function ([2a3c1e8](https://github.com/storm-software/storm-stack/commit/2a3c1e8)) +- **date-time:** Resolved issue with creating date-time in validation function + ([2a3c1e8](https://github.com/storm-software/storm-stack/commit/2a3c1e8)) ## 1.26.0 (2024-10-18) - ### Features -- **date-time:** Provide time zone to the formatting function ([318ab55](https://github.com/storm-software/storm-stack/commit/318ab55)) +- **date-time:** Provide time zone to the formatting function + ([318ab55](https://github.com/storm-software/storm-stack/commit/318ab55)) ## 1.25.0 (2024-10-18) - ### Features -- **date-time:** Added new flags to formatting options for helper functions ([b702d6c](https://github.com/storm-software/storm-stack/commit/b702d6c)) - +- **date-time:** Added new flags to formatting options for helper functions + ([b702d6c](https://github.com/storm-software/storm-stack/commit/b702d6c)) ### Bug Fixes -- **serialization:** Resolved stack overflow issue with `StormParser` class ([f890df9](https://github.com/storm-software/storm-stack/commit/f890df9)) +- **serialization:** Resolved stack overflow issue with `StormParser` class + ([f890df9](https://github.com/storm-software/storm-stack/commit/f890df9)) ## 1.24.0 (2024-10-15) - ### Features -- **types:** Added the `index` and `status` properties to the `SelectOption` type ([7da9603](https://github.com/storm-software/storm-stack/commit/7da9603)) +- **types:** Added the `index` and `status` properties to the `SelectOption` + type ([7da9603](https://github.com/storm-software/storm-stack/commit/7da9603)) ## 1.23.0 (2024-10-14) - ### Features -- **types:** Added the `description` property to the `SelectOption` type ([94c33d2](https://github.com/storm-software/storm-stack/commit/94c33d2)) +- **types:** Added the `description` property to the `SelectOption` type + ([94c33d2](https://github.com/storm-software/storm-stack/commit/94c33d2)) ## 1.22.0 (2024-10-11) - ### Features -- **types:** Added the `help` and `success` ValidationDetail message types ([207bf67](https://github.com/storm-software/storm-stack/commit/207bf67)) +- **types:** Added the `help` and `success` ValidationDetail message types + ([207bf67](https://github.com/storm-software/storm-stack/commit/207bf67)) ## 1.21.0 (2024-10-10) - ### Features -- **utilities:** Added the `toPath` and `toDeepKey` functions ([1977f13](https://github.com/storm-software/storm-stack/commit/1977f13)) +- **utilities:** Added the `toPath` and `toDeepKey` functions + ([1977f13](https://github.com/storm-software/storm-stack/commit/1977f13)) ## 1.20.2 (2024-10-10) - ### Bug Fixes -- **monorepo:** Regenerate markup after token update ([a37ef2a](https://github.com/storm-software/storm-stack/commit/a37ef2a)) +- **monorepo:** Regenerate markup after token update + ([a37ef2a](https://github.com/storm-software/storm-stack/commit/a37ef2a)) ## 1.20.1 (2024-10-10) - ### Bug Fixes -- **types:** Added missing tags and regenerated markdown ([7ab98cc](https://github.com/storm-software/storm-stack/commit/7ab98cc)) +- **types:** Added missing tags and regenerated markdown + ([7ab98cc](https://github.com/storm-software/storm-stack/commit/7ab98cc)) ## 1.20.0 (2024-10-10) - ### Features -- **utilities:** Update the base Nx configuration ([99988e0](https://github.com/storm-software/storm-stack/commit/99988e0)) - +- **utilities:** Update the base Nx configuration + ([99988e0](https://github.com/storm-software/storm-stack/commit/99988e0)) ### Bug Fixes -- **monorepo:** Update the Nx configuration to include release process specifications ([df311f7](https://github.com/storm-software/storm-stack/commit/df311f7)) +- **monorepo:** Update the Nx configuration to include release process + specifications + ([df311f7](https://github.com/storm-software/storm-stack/commit/df311f7)) ## 1.19.4 (2024-10-10) - ### Bug Fixes -- **monorepo:** Regenerate the README file formatting ([b81153c](https://github.com/storm-software/storm-stack/commit/b81153c)) +- **monorepo:** Regenerate the README file formatting + ([b81153c](https://github.com/storm-software/storm-stack/commit/b81153c)) ## 1.19.3 (2024-10-09) - ### Bug Fixes -- **utilities:** Reformatting the README files ([723d68b](https://github.com/storm-software/storm-stack/commit/723d68b)) +- **utilities:** Reformatting the README files + ([723d68b](https://github.com/storm-software/storm-stack/commit/723d68b)) ## 1.19.2 (2024-10-08) - ### Bug Fixes -- **types:** Regenerate the monorepo markdown files ([2b5818e](https://github.com/storm-software/storm-stack/commit/2b5818e)) +- **types:** Regenerate the monorepo markdown files + ([2b5818e](https://github.com/storm-software/storm-stack/commit/2b5818e)) ## 1.19.1 (2024-10-08) - ### Bug Fixes -- **monorepo:** Resolve issue with markdown across entire monorepo ([ee6720c](https://github.com/storm-software/storm-stack/commit/ee6720c)) +- **monorepo:** Resolve issue with markdown across entire monorepo + ([ee6720c](https://github.com/storm-software/storm-stack/commit/ee6720c)) ## 1.19.0 (2024-10-08) - ### Features -- **utilities:** Added the flatten and unflatten utility functions and helper types ([702d44d](https://github.com/storm-software/storm-stack/commit/702d44d)) - - +- **utilities:** Added the flatten and unflatten utility functions and helper + types + ([702d44d](https://github.com/storm-software/storm-stack/commit/702d44d)) ## 1.17.0 (2024-02-10) diff --git a/packages/unique-identifier/README.md b/packages/utils/unique-identifier/README.md similarity index 97% rename from packages/unique-identifier/README.md rename to packages/utils/unique-identifier/README.md index 137c9998..a72b7917 100644 --- a/packages/unique-identifier/README.md +++ b/packages/utils/unique-identifier/README.md @@ -46,6 +46,7 @@ identifiers. It is designed to be used in a browser or NodeJS environment. + ## Table of Contents - [Installing](#installing) @@ -72,14 +73,14 @@ identifiers. It is designed to be used in a browser or NodeJS environment. Using [pnpm](http://pnpm.io): ```bash -pnpm add -D @storm-stack/unique-identifier +pnpm add -D @storm-stack/utils-unique-identifier ```
Using npm ```bash -npm install -D @storm-stack/unique-identifier +npm install -D @storm-stack/utils-unique-identifier ```
@@ -88,7 +89,7 @@ npm install -D @storm-stack/unique-identifier Using yarn ```bash -yarn add -D @storm-stack/unique-identifier +yarn add -D @storm-stack/utils-unique-identifier ``` @@ -120,17 +121,17 @@ commands are available to assist in development. ### Building -Run `nx build unique-identifier` to build the library. +Run `nx build utils-unique-identifier` to build the library. ### Running unit tests -Run `nx test unique-identifier` to execute the unit tests via +Run `nx test utils-unique-identifier` to execute the unit tests via [Jest](https://jestjs.io). ### Linting -Run `nx lint unique-identifier` to run [ESLint](https://eslint.org/) on the -package. +Run `nx lint utils-unique-identifier` to run [ESLint](https://eslint.org/) on +the package. diff --git a/packages/unique-identifier/package.json b/packages/utils/unique-identifier/package.json similarity index 100% rename from packages/unique-identifier/package.json rename to packages/utils/unique-identifier/package.json diff --git a/packages/utils/unique-identifier/project.json b/packages/utils/unique-identifier/project.json new file mode 100644 index 00000000..1ebbca55 --- /dev/null +++ b/packages/utils/unique-identifier/project.json @@ -0,0 +1,35 @@ +{ + "name": "utils-unique-identifier", + "$schema": "../../../node_modules/nx/schemas/project-schema.json", + "projectType": "library", + "sourceRoot": "packages/utils/unique-identifier/src", + "targets": { + "build": { + "cache": true, + "executor": "@storm-software/workspace-tools:unbuild", + "inputs": ["typescript", "^production"], + "outputs": ["{options.outputPath}"], + "defaultConfiguration": "production", + "clean": true, + "options": { + "type": "packages/utils/unique-identifier/src/index.ts", + "outputPath": "dist/packages/utils/unique-identifier", + "tsConfig": "packages/utils/unique-identifier/tsconfig.json", + "project": "packages/utils/unique-identifier/package.json" + }, + "configurations": { + "production": { + "sourceMap": false, + "verbose": false + }, + "development": { + "sourceMap": true, + "verbose": true + } + } + }, + "nx-release-publish": { + "executor": "@storm-software/workspace-tools:npm-publish" + } + } +} diff --git a/packages/unique-identifier/src/cuid.ts b/packages/utils/unique-identifier/src/cuid.ts similarity index 100% rename from packages/unique-identifier/src/cuid.ts rename to packages/utils/unique-identifier/src/cuid.ts diff --git a/packages/unique-identifier/src/index.ts b/packages/utils/unique-identifier/src/index.ts similarity index 100% rename from packages/unique-identifier/src/index.ts rename to packages/utils/unique-identifier/src/index.ts diff --git a/packages/unique-identifier/src/random.ts b/packages/utils/unique-identifier/src/random.ts similarity index 100% rename from packages/unique-identifier/src/random.ts rename to packages/utils/unique-identifier/src/random.ts diff --git a/packages/unique-identifier/src/snowflake.ts b/packages/utils/unique-identifier/src/snowflake.ts similarity index 100% rename from packages/unique-identifier/src/snowflake.ts rename to packages/utils/unique-identifier/src/snowflake.ts diff --git a/packages/unique-identifier/src/uuid.ts b/packages/utils/unique-identifier/src/uuid.ts similarity index 100% rename from packages/unique-identifier/src/uuid.ts rename to packages/utils/unique-identifier/src/uuid.ts diff --git a/packages/unique-identifier/tsconfig.json b/packages/utils/unique-identifier/tsconfig.json similarity index 68% rename from packages/unique-identifier/tsconfig.json rename to packages/utils/unique-identifier/tsconfig.json index 890f403a..0cb8239f 100644 --- a/packages/unique-identifier/tsconfig.json +++ b/packages/utils/unique-identifier/tsconfig.json @@ -1,7 +1,7 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { - "outDir": "../../dist/out-tsc", + "outDir": "../../../dist/out-tsc", "lib": ["ESNext", "DOM"] }, "include": ["src/**/*.ts", "src/**/*.tsx"], diff --git a/packages/utils/unique-identifier/tsconfig.spec.json b/packages/utils/unique-identifier/tsconfig.spec.json new file mode 100644 index 00000000..f8bfbb68 --- /dev/null +++ b/packages/utils/unique-identifier/tsconfig.spec.json @@ -0,0 +1,13 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../dist/out-tsc", + "types": ["jest", "node"] + }, + "include": [ + "jest.config.ts", + "src/**/*.test.ts", + "src/**/*.spec.ts", + "src/**/*.d.ts" + ] +} diff --git a/packages/utilities/CHANGELOG.md b/packages/utils/utilities/CHANGELOG.md similarity index 87% rename from packages/utilities/CHANGELOG.md rename to packages/utils/utilities/CHANGELOG.md index c3781ac9..4b34c73b 100644 --- a/packages/utilities/CHANGELOG.md +++ b/packages/utils/utilities/CHANGELOG.md @@ -2,251 +2,259 @@ ### Features -- **utilities:** Added the `env` parameter to the `isMode` checker utilities ([df847cb](https://github.com/storm-software/storm-stack/commit/df847cb)) +- **utilities:** Added the `env` parameter to the `isMode` checker utilities + ([df847cb](https://github.com/storm-software/storm-stack/commit/df847cb)) ## 1.38.1 (2024-12-04) ### Bug Fixes -- **hooks:** Ensure a consistent typing in `useComposeRefs` hook ([3537a18](https://github.com/storm-software/storm-stack/commit/3537a18)) +- **hooks:** Ensure a consistent typing in `useComposeRefs` hook + ([3537a18](https://github.com/storm-software/storm-stack/commit/3537a18)) ## 1.38.0 (2024-12-03) ### Features -- **hooks:** Added the `useMemoStable` and `useCallbackStable` hooks ([4629ec3](https://github.com/storm-software/storm-stack/commit/4629ec3)) +- **hooks:** Added the `useMemoStable` and `useCallbackStable` hooks + ([4629ec3](https://github.com/storm-software/storm-stack/commit/4629ec3)) ## 1.37.0 (2024-12-02) ### Features -- **utilities:** Added `match-sorter` and `remove-accent` modules ([3eeff01](https://github.com/storm-software/storm-stack/commit/3eeff01)) +- **utilities:** Added `match-sorter` and `remove-accent` modules + ([3eeff01](https://github.com/storm-software/storm-stack/commit/3eeff01)) ## 1.36.0 (2024-11-10) ### Features -- **date-time:** Resolve issue parsing ISO string in `StormDateTime` constructor ([c8032d6](https://github.com/storm-software/storm-stack/commit/c8032d6)) +- **date-time:** Resolve issue parsing ISO string in `StormDateTime` constructor + ([c8032d6](https://github.com/storm-software/storm-stack/commit/c8032d6)) ## 1.35.0 (2024-11-10) ### Features -- **cli:** Added the `execute` and `install` utility functions ([8b04259](https://github.com/storm-software/storm-stack/commit/8b04259)) +- **cli:** Added the `execute` and `install` utility functions + ([8b04259](https://github.com/storm-software/storm-stack/commit/8b04259)) ## 1.34.0 (2024-11-08) ### Features -- **types:** Regenerate packages with upgraded ops packages ([936026a](https://github.com/storm-software/storm-stack/commit/936026a)) +- **types:** Regenerate packages with upgraded ops packages + ([936026a](https://github.com/storm-software/storm-stack/commit/936026a)) ## 1.33.0 (2024-11-07) - ### Features -- **date-time:** Added the `getMonthIndex` helper function ([8d979d2](https://github.com/storm-software/storm-stack/commit/8d979d2)) +- **date-time:** Added the `getMonthIndex` helper function + ([8d979d2](https://github.com/storm-software/storm-stack/commit/8d979d2)) ## 1.32.2 (2024-10-27) - ### Bug Fixes -- **date-time:** Update static function to no longer be constants ([f366ffe](https://github.com/storm-software/storm-stack/commit/f366ffe)) +- **date-time:** Update static function to no longer be constants + ([f366ffe](https://github.com/storm-software/storm-stack/commit/f366ffe)) ## 1.32.1 (2024-10-26) - ### Bug Fixes -- **hooks:** Resolve issue updating element reference in `useHook` hook ([340e2f4](https://github.com/storm-software/storm-stack/commit/340e2f4)) +- **hooks:** Resolve issue updating element reference in `useHook` hook + ([340e2f4](https://github.com/storm-software/storm-stack/commit/340e2f4)) ## 1.32.0 (2024-10-26) - ### Features -- **types:** Added the `isFileResult` type-checker and updated `status` field ([2fc6410](https://github.com/storm-software/storm-stack/commit/2fc6410)) +- **types:** Added the `isFileResult` type-checker and updated `status` field + ([2fc6410](https://github.com/storm-software/storm-stack/commit/2fc6410)) ## 1.31.2 (2024-10-24) - ### Bug Fixes -- **date-time:** Update the conditionals in validate functions ([f5f4e26](https://github.com/storm-software/storm-stack/commit/f5f4e26)) +- **date-time:** Update the conditionals in validate functions + ([f5f4e26](https://github.com/storm-software/storm-stack/commit/f5f4e26)) ## 1.31.1 (2024-10-24) - ### Bug Fixes -- **date-time:** Resolve issue with the date-time format functions ([f385b23](https://github.com/storm-software/storm-stack/commit/f385b23)) +- **date-time:** Resolve issue with the date-time format functions + ([f385b23](https://github.com/storm-software/storm-stack/commit/f385b23)) ## 1.31.0 (2024-10-24) - ### Features -- **hooks:** Added the `composeRefs` function and hook ([80a1379](https://github.com/storm-software/storm-stack/commit/80a1379)) +- **hooks:** Added the `composeRefs` function and hook + ([80a1379](https://github.com/storm-software/storm-stack/commit/80a1379)) ## 1.30.0 (2024-10-22) - ### Features -- **monorepo:** Use latest storm build tools in monorepo ([6bf00c5](https://github.com/storm-software/storm-stack/commit/6bf00c5)) +- **monorepo:** Use latest storm build tools in monorepo + ([6bf00c5](https://github.com/storm-software/storm-stack/commit/6bf00c5)) ## 1.29.2 (2024-10-20) - ### Bug Fixes -- **date-time:** Resolve issue with parsing ISO-8601 string ([a63273e](https://github.com/storm-software/storm-stack/commit/a63273e)) +- **date-time:** Resolve issue with parsing ISO-8601 string + ([a63273e](https://github.com/storm-software/storm-stack/commit/a63273e)) ## 1.29.1 (2024-10-20) - ### Bug Fixes -- **date-time:** Resolved issue with creating date-time in validation function ([2a3c1e8](https://github.com/storm-software/storm-stack/commit/2a3c1e8)) +- **date-time:** Resolved issue with creating date-time in validation function + ([2a3c1e8](https://github.com/storm-software/storm-stack/commit/2a3c1e8)) ## 1.29.0 (2024-10-18) - ### Features -- **date-time:** Provide time zone to the formatting function ([318ab55](https://github.com/storm-software/storm-stack/commit/318ab55)) +- **date-time:** Provide time zone to the formatting function + ([318ab55](https://github.com/storm-software/storm-stack/commit/318ab55)) ## 1.28.0 (2024-10-18) - ### Features -- **date-time:** Added new flags to formatting options for helper functions ([b702d6c](https://github.com/storm-software/storm-stack/commit/b702d6c)) - +- **date-time:** Added new flags to formatting options for helper functions + ([b702d6c](https://github.com/storm-software/storm-stack/commit/b702d6c)) ### Bug Fixes -- **serialization:** Resolved stack overflow issue with `StormParser` class ([f890df9](https://github.com/storm-software/storm-stack/commit/f890df9)) +- **serialization:** Resolved stack overflow issue with `StormParser` class + ([f890df9](https://github.com/storm-software/storm-stack/commit/f890df9)) ## 1.27.0 (2024-10-15) - ### Features -- **types:** Added the `index` and `status` properties to the `SelectOption` type ([7da9603](https://github.com/storm-software/storm-stack/commit/7da9603)) +- **types:** Added the `index` and `status` properties to the `SelectOption` + type ([7da9603](https://github.com/storm-software/storm-stack/commit/7da9603)) ## 1.26.0 (2024-10-14) - ### Features -- **types:** Added the `description` property to the `SelectOption` type ([94c33d2](https://github.com/storm-software/storm-stack/commit/94c33d2)) +- **types:** Added the `description` property to the `SelectOption` type + ([94c33d2](https://github.com/storm-software/storm-stack/commit/94c33d2)) ## 1.25.0 (2024-10-11) - ### Features -- **types:** Added the `help` and `success` ValidationDetail message types ([207bf67](https://github.com/storm-software/storm-stack/commit/207bf67)) +- **types:** Added the `help` and `success` ValidationDetail message types + ([207bf67](https://github.com/storm-software/storm-stack/commit/207bf67)) ## 1.24.0 (2024-10-10) - ### Features -- **utilities:** Added the `toPath` and `toDeepKey` functions ([1977f13](https://github.com/storm-software/storm-stack/commit/1977f13)) +- **utilities:** Added the `toPath` and `toDeepKey` functions + ([1977f13](https://github.com/storm-software/storm-stack/commit/1977f13)) ## 1.23.2 (2024-10-10) - ### Bug Fixes -- **monorepo:** Regenerate markup after token update ([a37ef2a](https://github.com/storm-software/storm-stack/commit/a37ef2a)) +- **monorepo:** Regenerate markup after token update + ([a37ef2a](https://github.com/storm-software/storm-stack/commit/a37ef2a)) ## 1.23.1 (2024-10-10) - ### Bug Fixes -- **types:** Added missing tags and regenerated markdown ([7ab98cc](https://github.com/storm-software/storm-stack/commit/7ab98cc)) +- **types:** Added missing tags and regenerated markdown + ([7ab98cc](https://github.com/storm-software/storm-stack/commit/7ab98cc)) ## 1.23.0 (2024-10-10) - ### Features -- **utilities:** Update the base Nx configuration ([99988e0](https://github.com/storm-software/storm-stack/commit/99988e0)) - +- **utilities:** Update the base Nx configuration + ([99988e0](https://github.com/storm-software/storm-stack/commit/99988e0)) ### Bug Fixes -- **monorepo:** Update the Nx configuration to include release process specifications ([df311f7](https://github.com/storm-software/storm-stack/commit/df311f7)) +- **monorepo:** Update the Nx configuration to include release process + specifications + ([df311f7](https://github.com/storm-software/storm-stack/commit/df311f7)) ## 1.22.4 (2024-10-10) - ### Bug Fixes -- **monorepo:** Regenerate the README file formatting ([b81153c](https://github.com/storm-software/storm-stack/commit/b81153c)) +- **monorepo:** Regenerate the README file formatting + ([b81153c](https://github.com/storm-software/storm-stack/commit/b81153c)) ## 1.22.3 (2024-10-09) - ### Bug Fixes -- **utilities:** Reformatting the README files ([723d68b](https://github.com/storm-software/storm-stack/commit/723d68b)) +- **utilities:** Reformatting the README files + ([723d68b](https://github.com/storm-software/storm-stack/commit/723d68b)) ## 1.22.2 (2024-10-08) - ### Bug Fixes -- **types:** Regenerate the monorepo markdown files ([2b5818e](https://github.com/storm-software/storm-stack/commit/2b5818e)) +- **types:** Regenerate the monorepo markdown files + ([2b5818e](https://github.com/storm-software/storm-stack/commit/2b5818e)) ## 1.22.1 (2024-10-08) - ### Bug Fixes -- **monorepo:** Resolve issue with markdown across entire monorepo ([ee6720c](https://github.com/storm-software/storm-stack/commit/ee6720c)) +- **monorepo:** Resolve issue with markdown across entire monorepo + ([ee6720c](https://github.com/storm-software/storm-stack/commit/ee6720c)) ## 1.22.0 (2024-10-08) - ### Features -- **monorepo:** Upgrade to monorepo base packages ([b1fbbe8](https://github.com/storm-software/storm-stack/commit/b1fbbe8)) +- **monorepo:** Upgrade to monorepo base packages + ([b1fbbe8](https://github.com/storm-software/storm-stack/commit/b1fbbe8)) ## 1.21.0 (2024-10-08) - ### Features -- **utilities:** Added the flatten and unflatten utility functions and helper types ([702d44d](https://github.com/storm-software/storm-stack/commit/702d44d)) - -- **hooks:** Initial check-in of the base reusable React `hooks` package ([6af6750](https://github.com/storm-software/storm-stack/commit/6af6750)) +- **utilities:** Added the flatten and unflatten utility functions and helper + types + ([702d44d](https://github.com/storm-software/storm-stack/commit/702d44d)) +- **hooks:** Initial check-in of the base reusable React `hooks` package + ([6af6750](https://github.com/storm-software/storm-stack/commit/6af6750)) ### Bug Fixes -- **monorepo:** Automated linting resolution on monorepo ([7136dec](https://github.com/storm-software/storm-stack/commit/7136dec)) +- **monorepo:** Automated linting resolution on monorepo + ([7136dec](https://github.com/storm-software/storm-stack/commit/7136dec)) ## 1.20.0 (2024-09-26) - ### Features -- **utilities:** Add helper functions list to README markdown ([c7c70fa](https://github.com/storm-software/storm-stack/commit/c7c70fa)) +- **utilities:** Add helper functions list to README markdown + ([c7c70fa](https://github.com/storm-software/storm-stack/commit/c7c70fa)) ## 1.19.0 (2024-09-26) - ### Features -- **utilities:** Added the types module to exports ([8e930df](https://github.com/storm-software/storm-stack/commit/8e930df)) - - +- **utilities:** Added the types module to exports + ([8e930df](https://github.com/storm-software/storm-stack/commit/8e930df)) ## 1.17.0 (2024-02-10) diff --git a/packages/utilities/README.md b/packages/utils/utilities/README.md similarity index 95% rename from packages/utilities/README.md rename to packages/utils/utilities/README.md index c1c83ee7..79b68ac5 100644 --- a/packages/utilities/README.md +++ b/packages/utils/utilities/README.md @@ -41,9 +41,9 @@ This package is part of the ⚡Storm Stack monorepo. Storm Stack packages # Storm Utilities Package -This package contains various utilities functions that serve a wide range of -purposes. These utilities are used by other packages in the storm-stack monorepo -and any other projects that could benefit from their functionality. +This package contains various utils-utilities functions that serve a wide range +of purposes. These utils-utilities are used by other packages in the storm-stack +monorepo and any other projects that could benefit from their functionality. ## Helper Functions @@ -71,6 +71,7 @@ The following helper functions are included in this package: + ## Table of Contents - [Installing](#installing) @@ -96,14 +97,14 @@ The following helper functions are included in this package: Using [pnpm](http://pnpm.io): ```bash -pnpm add -D @storm-stack/utilities +pnpm add -D @storm-stack/utils-utilities ```
Using npm ```bash -npm install -D @storm-stack/utilities +npm install -D @storm-stack/utils-utilities ```
@@ -112,7 +113,7 @@ npm install -D @storm-stack/utilities Using yarn ```bash -yarn add -D @storm-stack/utilities +yarn add -D @storm-stack/utils-utilities ``` @@ -131,15 +132,17 @@ commands are available to assist in development. ### Building -Run `nx build utilities` to build the library. +Run `nx build utils-utilities` to build the library. ### Running unit tests -Run `nx test utilities` to execute the unit tests via [Jest](https://jestjs.io). +Run `nx test utils-utilities` to execute the unit tests via +[Jest](https://jestjs.io). ### Linting -Run `nx lint utilities` to run [ESLint](https://eslint.org/) on the package. +Run `nx lint utils-utilities` to run [ESLint](https://eslint.org/) on the +package. diff --git a/packages/utilities/package.json b/packages/utils/utilities/package.json similarity index 100% rename from packages/utilities/package.json rename to packages/utils/utilities/package.json diff --git a/packages/utils/utilities/project.json b/packages/utils/utilities/project.json new file mode 100644 index 00000000..b7a73a1b --- /dev/null +++ b/packages/utils/utilities/project.json @@ -0,0 +1,35 @@ +{ + "name": "utils-utilities", + "$schema": "../../../node_modules/nx/schemas/project-schema.json", + "projectType": "library", + "sourceRoot": "packages/utils/utilities/src", + "targets": { + "build": { + "cache": true, + "executor": "@storm-software/workspace-tools:unbuild", + "inputs": ["typescript", "^production"], + "outputs": ["{options.outputPath}"], + "defaultConfiguration": "production", + "clean": true, + "options": { + "type": "packages/utils/utilities/src/index.ts", + "outputPath": "dist/packages/utils/utilities", + "tsConfig": "packages/utils/utilities/tsconfig.json", + "project": "packages/utils/utilities/package.json" + }, + "configurations": { + "production": { + "sourceMap": false, + "verbose": false + }, + "development": { + "sourceMap": true, + "verbose": true + } + } + }, + "nx-release-publish": { + "executor": "@storm-software/workspace-tools:npm-publish" + } + } +} diff --git a/packages/utilities/src/helper-fns/arg-identity.ts b/packages/utils/utilities/src/helper-fns/arg-identity.ts similarity index 100% rename from packages/utilities/src/helper-fns/arg-identity.ts rename to packages/utils/utilities/src/helper-fns/arg-identity.ts diff --git a/packages/utilities/src/helper-fns/debounce.ts b/packages/utils/utilities/src/helper-fns/debounce.ts similarity index 100% rename from packages/utilities/src/helper-fns/debounce.ts rename to packages/utils/utilities/src/helper-fns/debounce.ts diff --git a/packages/utilities/src/helper-fns/deep-clone.ts b/packages/utils/utilities/src/helper-fns/deep-clone.ts similarity index 100% rename from packages/utilities/src/helper-fns/deep-clone.ts rename to packages/utils/utilities/src/helper-fns/deep-clone.ts diff --git a/packages/utilities/src/helper-fns/deep-merge.ts b/packages/utils/utilities/src/helper-fns/deep-merge.ts similarity index 100% rename from packages/utilities/src/helper-fns/deep-merge.ts rename to packages/utils/utilities/src/helper-fns/deep-merge.ts diff --git a/packages/utilities/src/helper-fns/delay.ts b/packages/utils/utilities/src/helper-fns/delay.ts similarity index 100% rename from packages/utilities/src/helper-fns/delay.ts rename to packages/utils/utilities/src/helper-fns/delay.ts diff --git a/packages/utilities/src/helper-fns/flatten-object.ts b/packages/utils/utilities/src/helper-fns/flatten-object.ts similarity index 100% rename from packages/utilities/src/helper-fns/flatten-object.ts rename to packages/utils/utilities/src/helper-fns/flatten-object.ts diff --git a/packages/utilities/src/helper-fns/get-field.ts b/packages/utils/utilities/src/helper-fns/get-field.ts similarity index 100% rename from packages/utilities/src/helper-fns/get-field.ts rename to packages/utils/utilities/src/helper-fns/get-field.ts diff --git a/packages/utilities/src/helper-fns/get-ordered-by.ts b/packages/utils/utilities/src/helper-fns/get-ordered-by.ts similarity index 100% rename from packages/utilities/src/helper-fns/get-ordered-by.ts rename to packages/utils/utilities/src/helper-fns/get-ordered-by.ts diff --git a/packages/utilities/src/helper-fns/get-unique.ts b/packages/utils/utilities/src/helper-fns/get-unique.ts similarity index 100% rename from packages/utilities/src/helper-fns/get-unique.ts rename to packages/utils/utilities/src/helper-fns/get-unique.ts diff --git a/packages/utilities/src/helper-fns/identity.ts b/packages/utils/utilities/src/helper-fns/identity.ts similarity index 100% rename from packages/utilities/src/helper-fns/identity.ts rename to packages/utils/utilities/src/helper-fns/identity.ts diff --git a/packages/utilities/src/helper-fns/index.ts b/packages/utils/utilities/src/helper-fns/index.ts similarity index 100% rename from packages/utilities/src/helper-fns/index.ts rename to packages/utils/utilities/src/helper-fns/index.ts diff --git a/packages/utilities/src/helper-fns/is-equal.ts b/packages/utils/utilities/src/helper-fns/is-equal.ts similarity index 100% rename from packages/utilities/src/helper-fns/is-equal.ts rename to packages/utils/utilities/src/helper-fns/is-equal.ts diff --git a/packages/utilities/src/helper-fns/is-production.ts b/packages/utils/utilities/src/helper-fns/is-production.ts similarity index 100% rename from packages/utilities/src/helper-fns/is-production.ts rename to packages/utils/utilities/src/helper-fns/is-production.ts diff --git a/packages/utilities/src/helper-fns/is-runtime-server.ts b/packages/utils/utilities/src/helper-fns/is-runtime-server.ts similarity index 100% rename from packages/utilities/src/helper-fns/is-runtime-server.ts rename to packages/utils/utilities/src/helper-fns/is-runtime-server.ts diff --git a/packages/utilities/src/helper-fns/match-sorter.ts b/packages/utils/utilities/src/helper-fns/match-sorter.ts similarity index 100% rename from packages/utilities/src/helper-fns/match-sorter.ts rename to packages/utils/utilities/src/helper-fns/match-sorter.ts diff --git a/packages/utilities/src/helper-fns/noop.ts b/packages/utils/utilities/src/helper-fns/noop.ts similarity index 100% rename from packages/utilities/src/helper-fns/noop.ts rename to packages/utils/utilities/src/helper-fns/noop.ts diff --git a/packages/utilities/src/helper-fns/remove-accents.ts b/packages/utils/utilities/src/helper-fns/remove-accents.ts similarity index 100% rename from packages/utilities/src/helper-fns/remove-accents.ts rename to packages/utils/utilities/src/helper-fns/remove-accents.ts diff --git a/packages/utilities/src/helper-fns/remove-empty-items.ts b/packages/utils/utilities/src/helper-fns/remove-empty-items.ts similarity index 100% rename from packages/utilities/src/helper-fns/remove-empty-items.ts rename to packages/utils/utilities/src/helper-fns/remove-empty-items.ts diff --git a/packages/utilities/src/helper-fns/set-field.ts b/packages/utils/utilities/src/helper-fns/set-field.ts similarity index 100% rename from packages/utilities/src/helper-fns/set-field.ts rename to packages/utils/utilities/src/helper-fns/set-field.ts diff --git a/packages/utilities/src/helper-fns/throttle.ts b/packages/utils/utilities/src/helper-fns/throttle.ts similarity index 100% rename from packages/utilities/src/helper-fns/throttle.ts rename to packages/utils/utilities/src/helper-fns/throttle.ts diff --git a/packages/utilities/src/helper-fns/timeout.ts b/packages/utils/utilities/src/helper-fns/timeout.ts similarity index 100% rename from packages/utilities/src/helper-fns/timeout.ts rename to packages/utils/utilities/src/helper-fns/timeout.ts diff --git a/packages/utilities/src/helper-fns/to-deep-key.ts b/packages/utils/utilities/src/helper-fns/to-deep-key.ts similarity index 100% rename from packages/utilities/src/helper-fns/to-deep-key.ts rename to packages/utils/utilities/src/helper-fns/to-deep-key.ts diff --git a/packages/utilities/src/helper-fns/to-path.ts b/packages/utils/utilities/src/helper-fns/to-path.ts similarity index 100% rename from packages/utilities/src/helper-fns/to-path.ts rename to packages/utils/utilities/src/helper-fns/to-path.ts diff --git a/packages/utilities/src/helper-fns/unflatten-object.ts b/packages/utils/utilities/src/helper-fns/unflatten-object.ts similarity index 100% rename from packages/utilities/src/helper-fns/unflatten-object.ts rename to packages/utils/utilities/src/helper-fns/unflatten-object.ts diff --git a/packages/utilities/src/helper-fns/union.ts b/packages/utils/utilities/src/helper-fns/union.ts similarity index 100% rename from packages/utilities/src/helper-fns/union.ts rename to packages/utils/utilities/src/helper-fns/union.ts diff --git a/packages/utilities/src/helper-fns/with-timeout.ts b/packages/utils/utilities/src/helper-fns/with-timeout.ts similarity index 100% rename from packages/utilities/src/helper-fns/with-timeout.ts rename to packages/utils/utilities/src/helper-fns/with-timeout.ts diff --git a/packages/utilities/src/index.ts b/packages/utils/utilities/src/index.ts similarity index 100% rename from packages/utilities/src/index.ts rename to packages/utils/utilities/src/index.ts diff --git a/packages/utilities/src/types.ts b/packages/utils/utilities/src/types.ts similarity index 100% rename from packages/utilities/src/types.ts rename to packages/utils/utilities/src/types.ts diff --git a/packages/utilities/tsconfig.json b/packages/utils/utilities/tsconfig.json similarity index 67% rename from packages/utilities/tsconfig.json rename to packages/utils/utilities/tsconfig.json index 4a7d4ab0..ba575717 100644 --- a/packages/utilities/tsconfig.json +++ b/packages/utils/utilities/tsconfig.json @@ -1,7 +1,7 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { - "outDir": "../../dist/out-tsc", + "outDir": "../../../dist/out-tsc", "lib": ["ESNext", "DOM"] }, "include": ["**/*.ts", "**/*.tsx"], diff --git a/packages/utils/utilities/tsconfig.spec.json b/packages/utils/utilities/tsconfig.spec.json new file mode 100644 index 00000000..f8bfbb68 --- /dev/null +++ b/packages/utils/utilities/tsconfig.spec.json @@ -0,0 +1,13 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../dist/out-tsc", + "types": ["jest", "node"] + }, + "include": [ + "jest.config.ts", + "src/**/*.test.ts", + "src/**/*.spec.ts", + "src/**/*.d.ts" + ] +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 64259486..78601634 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -21,27 +21,28 @@ overrides: nth-check: '>=2.1.1' postcss: '>=8.4.47' follow-redirects: '>=1.15.9' - '@storm-stack/utilities': 1.39.0 - '@storm-stack/unique-identifier': 1.33.0 - '@storm-stack/date-time': 1.46.0 - '@storm-stack/errors': 1.40.0 - '@storm-stack/serialization': 1.46.0 - '@storm-stack/logging': 1.40.0 - '@storm-stack/file-system': 1.39.0 - '@storm-stack/cli': 1.40.0 - '@storm-stack/plugin-system': 1.23.0 - '@storm-stack/telemetry': 1.19.0 - '@storm-stack/server-cache': 0.17.0 - '@storm-stack/string-fns': 0.18.0 - '@storm-stack/types': 0.34.0 - '@storm-stack/hashing': 0.15.0 - '@storm-stack/server-result': 0.18.0 - '@storm-stack/hooks': 0.25.1 - '@storm-stack/env': 0.1.0 - '@storm-stack/build-plugin': 0.1.0 - '@storm-stack/build-nx': 1.3.0 - '@storm-stack/build-core': 0.0.1 - '@storm-stack/tools-config': 0.0.1 + '@storm-stack/utilities': workspace:* + '@storm-stack/unique-identifier': workspace:* + '@storm-stack/date-time': workspace:* + '@storm-stack/errors': workspace:* + '@storm-stack/serialization': workspace:* + '@storm-stack/logging': workspace:* + '@storm-stack/file-system': workspace:* + '@storm-stack/cli': workspace:* + '@storm-stack/plugin-system': workspace:* + '@storm-stack/telemetry': workspace:* + '@storm-stack/server-cache': workspace:* + '@storm-stack/string-fns': workspace:* + '@storm-stack/types': workspace:* + '@storm-stack/hashing': workspace:* + '@storm-stack/server-result': workspace:* + '@storm-stack/hooks': workspace:* + '@storm-stack/env': workspace:* + '@storm-stack/build-plugin': workspace:* + '@storm-stack/build-nx': workspace:* + '@storm-stack/build-core': workspace:* + '@storm-stack/tools-config': workspace:* + '@storm-stack/cli-helpers': workspace:* importers: @@ -339,7 +340,7 @@ importers: specifier: '>=6.0.4' version: 6.0.5(@types/node@22.10.2)(jiti@2.3.3)(less@4.1.3)(sass@1.77.8)(stylus@0.64.0)(terser@5.31.3)(yaml@2.6.1) - packages/cli: + packages/base/cli: dependencies: '@antfu/install-pkg': specifier: ^0.4.1 @@ -385,7 +386,7 @@ importers: specifier: ^22.10.2 version: 22.10.2 - packages/date-time: + packages/base/date-time: dependencies: '@formkit/tempo': specifier: ^0.1.2 @@ -394,7 +395,7 @@ importers: specifier: 0.4.4 version: 0.4.4 - packages/env: + packages/base/env: dependencies: '@storm-software/config': specifier: latest @@ -406,50 +407,7 @@ importers: specifier: ^7.5.0 version: 7.5.0(@samchon/openapi@2.3.1)(typescript@5.6.2) - packages/errors: - dependencies: - '@storm-software/testing-tools': - specifier: latest - version: 1.86.0(@nx/jest@20.3.0(@babel/traverse@7.25.6)(@swc-node/register@1.10.9(@swc/core@1.7.26(@swc/helpers@0.5.13))(@swc/types@0.1.12)(typescript@5.6.2))(@swc/core@1.7.26(@swc/helpers@0.5.13))(@swc/wasm@1.10.1)(@types/node@22.10.2)(nx@20.3.0(@swc-node/register@1.10.9(@swc/core@1.7.26(@swc/helpers@0.5.13))(@swc/types@0.1.12)(typescript@5.6.2))(@swc/core@1.7.26(@swc/helpers@0.5.13)))(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.13))(@swc/wasm@1.10.1)(@types/node@22.10.2)(typescript@5.6.2))(typescript@5.6.2)(verdaccio@5.32.2(typanion@3.14.0)))(jest@29.7.0(@types/node@22.10.2)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.13))(@swc/wasm@1.10.1)(@types/node@22.10.2)(typescript@5.6.2))) - '@storm-software/workspace-tools': - specifier: latest - version: 1.210.2(gyfon4hjbyig4scgkb7pjo5lsa) - devDependencies: - '@types/node': - specifier: ^22.10.2 - version: 22.10.2 - - packages/file-system: - dependencies: - '@storm-software/config-tools': - specifier: latest - version: 1.119.0(typescript@5.6.2) - semver: - specifier: 7.6.3 - version: 7.6.3 - devDependencies: - '@types/node': - specifier: ^22.10.2 - version: 22.10.2 - '@types/semver': - specifier: 7.5.8 - version: 7.5.8 - - packages/hashing: {} - - packages/hooks: - devDependencies: - react: - specifier: 19.0.0-rc-f6cce072-20240723 - version: 19.0.0-rc-f6cce072-20240723 - react-dom: - specifier: 19.0.0-rc-f6cce072-20240723 - version: 19.0.0-rc-f6cce072-20240723(react@19.0.0-rc-f6cce072-20240723) - react-native: - specifier: 0.75.4 - version: 0.75.4(@babel/core@7.25.2)(@babel/preset-env@7.25.4(@babel/core@7.25.2))(bufferutil@4.0.8)(react@19.0.0-rc-f6cce072-20240723)(types-react@19.0.0-rc.1)(typescript@5.6.2)(utf-8-validate@5.0.10) - - packages/logging: + packages/base/logging: dependencies: '@storm-software/config': specifier: latest @@ -464,7 +422,7 @@ importers: specifier: ^7.0.0 version: 7.0.0 - packages/plugin-system: + packages/base/plugin-system: dependencies: '@antfu/ni': specifier: ^0.23.0 @@ -495,33 +453,15 @@ importers: specifier: ^2.0.7 version: 2.0.7 - packages/serialization: - dependencies: - buffer: - specifier: ^6.0.3 - version: 6.0.3 - superjson: - specifier: 2.2.1 - version: 2.2.1 - ufo: - specifier: ^1.5.4 - version: 1.5.4 - devDependencies: - '@types/node': - specifier: ^22.10.2 - version: 22.10.2 - - packages/server-cache: + packages/base/server-cache: dependencies: bentocache: specifier: 1.0.0-beta.9 version: 1.0.0-beta.9(tslib@2.7.0) - packages/server-result: {} - - packages/string-fns: {} + packages/base/server-result: {} - packages/telemetry: + packages/base/telemetry: dependencies: '@opentelemetry/api': specifier: ^1.9.0 @@ -594,19 +534,114 @@ importers: specifier: ^22.10.2 version: 22.10.2 - packages/types: + packages/utils/cli-helpers: + dependencies: + '@antfu/install-pkg': + specifier: ^0.5.0 + version: 0.5.0 + '@antfu/ni': + specifier: ^0.23.0 + version: 0.23.0 + chalk: + specifier: 5.3.0 + version: 5.3.0 + commander: + specifier: 12.1.0 + version: 12.1.0 + execa: + specifier: ^9.4.0 + version: 9.4.0 + figlet: + specifier: ^1.7.0 + version: 1.7.0 + prompts: + specifier: ^2.4.2 + version: 2.4.2 + terminal-link: + specifier: ^3.0.0 + version: 3.0.0 + tinyexec: + specifier: ^0.3.1 + version: 0.3.1 + devDependencies: + '@types/figlet': + specifier: ^1.7.0 + version: 1.7.0 + '@types/node': + specifier: ^22.10.2 + version: 22.10.2 + + packages/utils/errors: + dependencies: + '@storm-software/testing-tools': + specifier: latest + version: 1.86.0(@nx/jest@20.3.0(@babel/traverse@7.25.6)(@swc-node/register@1.10.9(@swc/core@1.7.26(@swc/helpers@0.5.13))(@swc/types@0.1.12)(typescript@5.6.2))(@swc/core@1.7.26(@swc/helpers@0.5.13))(@swc/wasm@1.10.1)(@types/node@22.10.2)(nx@20.3.0(@swc-node/register@1.10.9(@swc/core@1.7.26(@swc/helpers@0.5.13))(@swc/types@0.1.12)(typescript@5.6.2))(@swc/core@1.7.26(@swc/helpers@0.5.13)))(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.13))(@swc/wasm@1.10.1)(@types/node@22.10.2)(typescript@5.6.2))(typescript@5.6.2)(verdaccio@5.32.2(typanion@3.14.0)))(jest@29.7.0(@types/node@22.10.2)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.13))(@swc/wasm@1.10.1)(@types/node@22.10.2)(typescript@5.6.2))) + '@storm-software/workspace-tools': + specifier: latest + version: 1.210.2(gyfon4hjbyig4scgkb7pjo5lsa) + devDependencies: + '@types/node': + specifier: ^22.10.2 + version: 22.10.2 + + packages/utils/file-system: + dependencies: + '@storm-software/config-tools': + specifier: latest + version: 1.119.0(typescript@5.6.2) + semver: + specifier: 7.6.3 + version: 7.6.3 + devDependencies: + '@types/semver': + specifier: 7.5.8 + version: 7.5.8 + + packages/utils/hashing: {} + + packages/utils/hooks: + devDependencies: + react: + specifier: 19.0.0-rc-f6cce072-20240723 + version: 19.0.0-rc-f6cce072-20240723 + react-dom: + specifier: 19.0.0-rc-f6cce072-20240723 + version: 19.0.0-rc-f6cce072-20240723(react@19.0.0-rc-f6cce072-20240723) + react-native: + specifier: 0.75.4 + version: 0.75.4(@babel/core@7.25.2)(@babel/preset-env@7.25.4(@babel/core@7.25.2))(bufferutil@4.0.8)(react@19.0.0-rc-f6cce072-20240723)(types-react@19.0.0-rc.1)(typescript@5.6.2)(utf-8-validate@5.0.10) + + packages/utils/serialization: + dependencies: + buffer: + specifier: ^6.0.3 + version: 6.0.3 + superjson: + specifier: 2.2.1 + version: 2.2.1 + ufo: + specifier: ^1.5.4 + version: 1.5.4 + devDependencies: + '@types/node': + specifier: ^22.10.2 + version: 22.10.2 + + packages/utils/string-fns: {} + + packages/utils/types: devDependencies: '@types/node': specifier: ^22.10.2 version: 22.10.2 - packages/unique-identifier: + packages/utils/unique-identifier: dependencies: '@noble/hashes': specifier: 1.5.0 version: 1.5.0 - packages/utilities: + packages/utils/utilities: dependencies: match-sorter: specifier: ^8.0.0 @@ -652,6 +687,9 @@ packages: '@antfu/install-pkg@0.4.1': resolution: {integrity: sha512-T7yB5QNG29afhWVkVq7XeIMBa5U/vs9mX69YqayXypPRmYzUmzwnYltplHmPtZ4HPCn+sQKeXW8I47wCbuBOjw==} + '@antfu/install-pkg@0.5.0': + resolution: {integrity: sha512-dKnk2xlAyC7rvTkpkHmu+Qy/2Zc3Vm/l8PtNyIOGDBtXPY3kThfU4ORNEp3V7SXw5XSOb+tOJaUYpfquPzL/Tg==} + '@antfu/ni@0.23.0': resolution: {integrity: sha512-R5/GkA3PfGewAXLzz6lN5XagunF6PKeDtWt8dbZQXvHfebLS0qEczV+Azg/d+tKgSh6kRBpxvu8oSjARdPtw0A==} hasBin: true @@ -2814,7 +2852,6 @@ packages: '@ls-lint/ls-lint@2.2.3': resolution: {integrity: sha512-ekM12jNm/7O2I/hsRv9HvYkRdfrHpiV1epVuI2NP+eTIcEgdIdKkKCs9KgQydu/8R5YXTov9aHdOgplmCHLupw==} - cpu: [x64, arm64, s390x] os: [darwin, linux, win32] hasBin: true @@ -5246,8 +5283,8 @@ packages: '@types/node@18.19.42': resolution: {integrity: sha512-d2ZFc/3lnK2YCYhos8iaNIYu9Vfhr92nHiyJHRltXWjXUBjEE+A4I58Tdbnw4VhggSW+2j5y5gTrLs4biNnubg==} - '@types/node@20.14.12': - resolution: {integrity: sha512-r7wNXakLeSsGT0H1AU863vS2wa5wBOK4bWMjZz2wj+8nBx+m5PeIn0k8AloSLpRuiwdRQZwarZqHE4FNArPuJQ==} + '@types/node@20.9.0': + resolution: {integrity: sha512-nekiGu2NDb1BcVofVcEKMIwzlx4NjHlcjhoxxKBNLtz15Y1z7MYf549DFvkHSId02Ax6kGwWntIBPC3l/JZcmw==} '@types/node@22.10.2': resolution: {integrity: sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ==} @@ -11016,6 +11053,9 @@ packages: package-manager-detector@0.2.2: resolution: {integrity: sha512-VgXbyrSNsml4eHWIvxxG/nTL4wgybMTXCV2Un/+yEc3aDKKU6nQBZjbeP3Pl3qm9Qg92X/1ng4ffvCeD/zwHgg==} + package-manager-detector@0.2.8: + resolution: {integrity: sha512-ts9KSdroZisdvKMWVAVCXiKqnqNfXz4+IbrBG8/BWx/TR5le+jfenvoBuIZ6UWM9nz47W7AbD9qYfAwfWMIwzA==} + pako@0.2.9: resolution: {integrity: sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA==} @@ -14412,6 +14452,11 @@ snapshots: package-manager-detector: 0.2.2 tinyexec: 0.3.1 + '@antfu/install-pkg@0.5.0': + dependencies: + package-manager-detector: 0.2.8 + tinyexec: 0.3.1 + '@antfu/ni@0.23.0': {} '@antfu/utils@0.7.10': {} @@ -16234,7 +16279,7 @@ snapshots: '@graphql-tools/code-file-loader': 7.3.23(@babel/core@7.25.2)(graphql@15.9.0) '@graphql-tools/graphql-tag-pluck': 7.5.2(@babel/core@7.25.2)(graphql@15.9.0) '@graphql-tools/utils': 9.2.1(graphql@15.9.0) - chalk: 5.3.0 + chalk: 4.1.2 debug: 4.3.7 fast-glob: 3.3.2 graphql: 15.9.0 @@ -16757,8 +16802,8 @@ snapshots: '@log4brains/cli-common': 1.0.0 '@log4brains/core': 1.0.0 '@material-ui/core': 4.12.4(react-dom@17.0.2(react@17.0.2))(react@17.0.2)(types-react@19.0.0-rc.1) - '@material-ui/icons': 4.11.3(@material-ui/core@4.12.4(react-dom@19.0.0-rc-f6cce072-20240723(react@19.0.0-rc-f6cce072-20240723))(react@19.0.0-rc-f6cce072-20240723)(types-react@19.0.0-rc.1))(react-dom@17.0.2(react@17.0.2))(react@17.0.2)(types-react@19.0.0-rc.1) - '@material-ui/lab': 4.0.0-alpha.61(@material-ui/core@4.12.4(react-dom@19.0.0-rc-f6cce072-20240723(react@19.0.0-rc-f6cce072-20240723))(react@19.0.0-rc-f6cce072-20240723)(types-react@19.0.0-rc.1))(react-dom@17.0.2(react@17.0.2))(react@17.0.2)(types-react@19.0.0-rc.1) + '@material-ui/icons': 4.11.3(@material-ui/core@4.12.4(react-dom@17.0.2(react@17.0.2))(react@17.0.2)(types-react@19.0.0-rc.1))(react-dom@17.0.2(react@17.0.2))(react@17.0.2)(types-react@19.0.0-rc.1) + '@material-ui/lab': 4.0.0-alpha.61(@material-ui/core@4.12.4(react-dom@17.0.2(react@17.0.2))(react@17.0.2)(types-react@19.0.0-rc.1))(react-dom@17.0.2(react@17.0.2))(react@17.0.2)(types-react@19.0.0-rc.1) '@next/bundle-analyzer': 10.2.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) babel-plugin-import: 1.13.8 badge-maker: 3.3.1 @@ -16849,7 +16894,7 @@ snapshots: optionalDependencies: '@types/react': types-react@19.0.0-rc.1 - '@material-ui/icons@4.11.3(@material-ui/core@4.12.4(react-dom@19.0.0-rc-f6cce072-20240723(react@19.0.0-rc-f6cce072-20240723))(react@19.0.0-rc-f6cce072-20240723)(types-react@19.0.0-rc.1))(react-dom@17.0.2(react@17.0.2))(react@17.0.2)(types-react@19.0.0-rc.1)': + '@material-ui/icons@4.11.3(@material-ui/core@4.12.4(react-dom@17.0.2(react@17.0.2))(react@17.0.2)(types-react@19.0.0-rc.1))(react-dom@17.0.2(react@17.0.2))(react@17.0.2)(types-react@19.0.0-rc.1)': dependencies: '@babel/runtime': 7.24.8 '@material-ui/core': 4.12.4(react-dom@17.0.2(react@17.0.2))(react@17.0.2)(types-react@19.0.0-rc.1) @@ -16858,7 +16903,7 @@ snapshots: optionalDependencies: '@types/react': types-react@19.0.0-rc.1 - '@material-ui/lab@4.0.0-alpha.61(@material-ui/core@4.12.4(react-dom@19.0.0-rc-f6cce072-20240723(react@19.0.0-rc-f6cce072-20240723))(react@19.0.0-rc-f6cce072-20240723)(types-react@19.0.0-rc.1))(react-dom@17.0.2(react@17.0.2))(react@17.0.2)(types-react@19.0.0-rc.1)': + '@material-ui/lab@4.0.0-alpha.61(@material-ui/core@4.12.4(react-dom@17.0.2(react@17.0.2))(react@17.0.2)(types-react@19.0.0-rc.1))(react-dom@17.0.2(react@17.0.2))(react@17.0.2)(types-react@19.0.0-rc.1)': dependencies: '@babel/runtime': 7.24.8 '@material-ui/core': 4.12.4(react-dom@17.0.2(react@17.0.2))(react@17.0.2)(types-react@19.0.0-rc.1) @@ -20939,7 +20984,7 @@ snapshots: dependencies: undici-types: 5.26.5 - '@types/node@20.14.12': + '@types/node@20.9.0': dependencies: undici-types: 5.26.5 @@ -28939,6 +28984,8 @@ snapshots: package-manager-detector@0.2.2: {} + package-manager-detector@0.2.8: {} + pako@0.2.9: {} parent-module@1.0.1: @@ -32228,7 +32275,7 @@ snapshots: '@types/concat-stream': 2.0.3 '@types/debug': 4.1.12 '@types/is-empty': 1.2.3 - '@types/node': 20.14.12 + '@types/node': 20.9.0 '@types/unist': 3.0.2 concat-stream: 2.0.0 debug: 4.3.7 diff --git a/tsconfig.base.json b/tsconfig.base.json index 0e57891a..9fee177e 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -14,44 +14,54 @@ "@storm-stack/build-nx/*": ["build/nx/src/*"], "@storm-stack/build-plugin": ["build/plugin/src/index.ts"], "@storm-stack/build-plugin/*": ["build/plugin/src/*"], - "@storm-stack/cli": ["packages/cli/src/index.ts"], - "@storm-stack/cli/*": ["packages/cli/src/*"], - "@storm-stack/date-time": ["packages/date-time/src/index.ts"], - "@storm-stack/date-time/*": ["packages/date-time/src/*"], - "@storm-stack/env": ["packages/env/src/index.ts"], - "@storm-stack/env/*": ["packages/env/src/*"], - "@storm-stack/errors": ["packages/errors/src/index.ts"], - "@storm-stack/errors/*": ["packages/errors/src/*"], - "@storm-stack/file-system": ["packages/file-system/src/index.ts"], - "@storm-stack/file-system/*": ["packages/file-system/src/*"], - "@storm-stack/hashing": ["packages/hashing/src/index.ts"], - "@storm-stack/hashing/*": ["packages/hashing/src/*"], - "@storm-stack/hooks": ["packages/hooks/src/index.ts"], - "@storm-stack/hooks/*": ["packages/hooks/src/*"], - "@storm-stack/logging": ["packages/logging/src/index.ts"], - "@storm-stack/logging/*": ["packages/logging/src/*"], - "@storm-stack/plugin-system": ["packages/plugin-system/src/index.ts"], - "@storm-stack/plugin-system/*": ["packages/plugin-system/src/*"], - "@storm-stack/serialization": ["packages/serialization/src/index.ts"], - "@storm-stack/serialization/*": ["packages/serialization/src/*"], - "@storm-stack/server-cache": ["packages/server-cache/src/index.ts"], - "@storm-stack/server-cache/*": ["packages/server-cache/src/*"], - "@storm-stack/server-result": ["packages/server-result/src/index.ts"], - "@storm-stack/server-result/*": ["packages/server-result/src/*"], - "@storm-stack/string-fns": ["packages/string-fns/src/index.ts"], - "@storm-stack/string-fns/*": ["packages/string-fns/src/*"], - "@storm-stack/telemetry": ["packages/telemetry/src/index.ts"], - "@storm-stack/telemetry/*": ["packages/telemetry/src/*"], + "@storm-stack/cli": ["packages/base/cli/src/index.ts"], + "@storm-stack/cli-helpers": ["packages/utils/cli-helpers/src/index.ts"], + "@storm-stack/cli-helpers/*": ["packages/utils/cli-helpers/src/*"], + "@storm-stack/cli/*": ["packages/base/cli/src/*"], + "@storm-stack/date-time": ["packages/base/date-time/src/index.ts"], + "@storm-stack/date-time/*": ["packages/base/date-time/src/*"], + "@storm-stack/env": ["packages/base/env/src/index.ts"], + "@storm-stack/env/*": ["packages/base/env/src/*"], + "@storm-stack/errors": ["packages/utils/errors/src/index.ts"], + "@storm-stack/errors/*": ["packages/utils/errors/src/*"], + "@storm-stack/file-system": ["packages/utils/file-system/src/index.ts"], + "@storm-stack/file-system/*": ["packages/utils/file-system/src/*"], + "@storm-stack/hashing": ["packages/utils/hashing/src/index.ts"], + "@storm-stack/hashing/*": ["packages/utils/hashing/src/*"], + "@storm-stack/hooks": ["packages/utils/hooks/src/index.ts"], + "@storm-stack/hooks/*": ["packages/utils/hooks/src/*"], + "@storm-stack/logging": ["packages/base/logging/src/index.ts"], + "@storm-stack/logging/*": ["packages/base/logging/src/*"], + "@storm-stack/plugin-system": [ + "packages/base/plugin-system/src/index.ts" + ], + "@storm-stack/plugin-system/*": ["packages/base/plugin-system/src/*"], + "@storm-stack/serialization": [ + "packages/utils/serialization/src/index.ts" + ], + "@storm-stack/serialization/*": ["packages/utils/serialization/src/*"], + "@storm-stack/server-cache": ["packages/base/server-cache/src/index.ts"], + "@storm-stack/server-cache/*": ["packages/base/server-cache/src/*"], + "@storm-stack/server-result": [ + "packages/base/server-result/src/index.ts" + ], + "@storm-stack/server-result/*": ["packages/base/server-result/src/*"], + "@storm-stack/string-fns": ["packages/utils/string-fns/src/index.ts"], + "@storm-stack/string-fns/*": ["packages/utils/string-fns/src/*"], + "@storm-stack/telemetry": ["packages/base/telemetry/src/index.ts"], + "@storm-stack/telemetry/*": ["packages/base/telemetry/src/*"], "@storm-stack/tools-config": ["tools/config/src/index.ts"], "@storm-stack/tools-config/*": ["tools/config/src/*"], - "@storm-stack/types": ["packages/types/src/index.ts"], - "@storm-stack/types/*": ["packages/types/src/*"], + "@storm-stack/types": ["packages/utils/types/src/index.ts"], + "@storm-stack/types/*": ["packages/utils/types/src/*"], "@storm-stack/unique-identifier": [ - "packages/unique-identifier/src/index.ts" + "packages/utils/unique-identifier/src/index.ts" + ], + "@storm-stack/unique-identifier/*": [ + "packages/utils/unique-identifier/src/*" ], - "@storm-stack/unique-identifier/*": ["packages/unique-identifier/src/*"], - "@storm-stack/utilities": ["packages/utilities/src/index.ts"], - "@storm-stack/utilities/*": ["packages/utilities/src/*"] + "@storm-stack/utilities": ["packages/utils/utilities/src/index.ts"], + "@storm-stack/utilities/*": ["packages/utils/utilities/src/*"] } }, "include": ["**/*.ts", "**/*.tsx", "**/*.d.ts", "**/*.js", "**/*.jsx"],