From 6c3e9b372c106fbd098aa4af55bca171dfc46448 Mon Sep 17 00:00:00 2001 From: angelespejo Date: Mon, 13 Jan 2025 19:33:13 +0100 Subject: [PATCH] :truck: chore(env): change env files --- .github/workflows/release-docs.yml | 1 + docs/guide/core/api.md | 70 ++++++++++++++++++++++-------- docs/guide/lib/api.md | 70 ++++++++++++++++++++++-------- package.json | 4 +- packages/docs/dovenv.config.js | 1 + 5 files changed, 110 insertions(+), 36 deletions(-) diff --git a/.github/workflows/release-docs.yml b/.github/workflows/release-docs.yml index 2f71cdf..15bee06 100644 --- a/.github/workflows/release-docs.yml +++ b/.github/workflows/release-docs.yml @@ -44,6 +44,7 @@ jobs: run: | export npm_config_build_from_source=false pnpm install --no-frozen-lockfile --ignore-scripts + pnpm i sharp --platform=linux --arch=x64 pnpm i -g wrangler ######################################################################### diff --git a/docs/guide/core/api.md b/docs/guide/core/api.md index 81736fc..08f8b7a 100644 --- a/docs/guide/core/api.md +++ b/docs/guide/core/api.md @@ -260,20 +260,24 @@ const data = await size.get() ##### new SiziumLocal() ```ts -new SiziumLocal(packagePath: string): SiziumLocal +new SiziumLocal(input: string, opts?: { + skipError: boolean; + }): SiziumLocal ``` ###### Parameters -| Parameter | Type | -| ------ | ------ | -| `packagePath` | `string` | +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `input` | `string` | - | +| `opts`? | `object` | - | +| `opts.skipError`? | `boolean` | Skip error on package dependence and return undefined | ###### Returns [`SiziumLocal`](#siziumlocal) -###### Overrides +###### Inherited from `PackageSuper.constructor` @@ -291,9 +295,17 @@ get(): Promise #### Properties -| Property | Modifier | Type | -| ------ | ------ | ------ | -| `packagePath` | `public` | `string` | +| Property | Modifier | Type | Default value | Description | Inherited from | +| ------ | ------ | ------ | ------ | ------ | ------ | +| `Error` | `public` | *typeof* `SiziumError` | `SiziumError` | - | `PackageSuper.Error` | +| `ERROR_ID` | `public` | \{ `GETTING_LOCAL_DATA`: `'GETTING_LOCAL_DATA'`; `GETTING_PKG_NAME`: `'GETTING_PKG_NAME'`; `GETTING_REGISTRY_DATA`: `'GETTING_REGISTRY_DATA'`; `INVALID_PKG_NAME`: `'INVALID_PKG_NAME'`; \} | `ERROR_ID` | - | `PackageSuper.ERROR_ID` | +| `ERROR_ID.GETTING_LOCAL_DATA` | `readonly` | `"GETTING_LOCAL_DATA"` | `'GETTING_LOCAL_DATA'` | - | - | +| `ERROR_ID.GETTING_PKG_NAME` | `readonly` | `"GETTING_PKG_NAME"` | `'GETTING_PKG_NAME'` | - | - | +| `ERROR_ID.GETTING_REGISTRY_DATA` | `readonly` | `"GETTING_REGISTRY_DATA"` | `'GETTING_REGISTRY_DATA'` | - | - | +| `ERROR_ID.INVALID_PKG_NAME` | `readonly` | `"INVALID_PKG_NAME"` | `'INVALID_PKG_NAME'` | - | - | +| `input` | `public` | `string` | `undefined` | - | `PackageSuper.input` | +| `opts?` | `public` | \{ `skipError`: `boolean`; \} | `undefined` | - | `PackageSuper.opts` | +| `opts.skipError` | `public` | `boolean` | `undefined` | Skip error on package dependence and return undefined | - | *** @@ -320,20 +332,24 @@ console.log(data.size) // total size on bytes ##### new SiziumRegistry() ```ts -new SiziumRegistry(name: string): SiziumRegistry +new SiziumRegistry(input: string, opts?: { + skipError: boolean; + }): SiziumRegistry ``` ###### Parameters -| Parameter | Type | -| ------ | ------ | -| `name` | `string` | +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `input` | `string` | - | +| `opts`? | `object` | - | +| `opts.skipError`? | `boolean` | Skip error on package dependence and return undefined | ###### Returns [`SiziumRegistry`](#siziumregistry) -###### Overrides +###### Inherited from `PackageSuper.constructor` @@ -351,9 +367,17 @@ get(): Promise #### Properties -| Property | Modifier | Type | -| ------ | ------ | ------ | -| `name` | `public` | `string` | +| Property | Modifier | Type | Default value | Description | Inherited from | +| ------ | ------ | ------ | ------ | ------ | ------ | +| `Error` | `public` | *typeof* `SiziumError` | `SiziumError` | - | `PackageSuper.Error` | +| `ERROR_ID` | `public` | \{ `GETTING_LOCAL_DATA`: `'GETTING_LOCAL_DATA'`; `GETTING_PKG_NAME`: `'GETTING_PKG_NAME'`; `GETTING_REGISTRY_DATA`: `'GETTING_REGISTRY_DATA'`; `INVALID_PKG_NAME`: `'INVALID_PKG_NAME'`; \} | `ERROR_ID` | - | `PackageSuper.ERROR_ID` | +| `ERROR_ID.GETTING_LOCAL_DATA` | `readonly` | `"GETTING_LOCAL_DATA"` | `'GETTING_LOCAL_DATA'` | - | - | +| `ERROR_ID.GETTING_PKG_NAME` | `readonly` | `"GETTING_PKG_NAME"` | `'GETTING_PKG_NAME'` | - | - | +| `ERROR_ID.GETTING_REGISTRY_DATA` | `readonly` | `"GETTING_REGISTRY_DATA"` | `'GETTING_REGISTRY_DATA'` | - | - | +| `ERROR_ID.INVALID_PKG_NAME` | `readonly` | `"INVALID_PKG_NAME"` | `'INVALID_PKG_NAME'` | - | - | +| `input` | `public` | `string` | `undefined` | - | `PackageSuper.input` | +| `opts?` | `public` | \{ `skipError`: `boolean`; \} | `undefined` | - | `PackageSuper.opts` | +| `opts.skipError` | `public` | `boolean` | `undefined` | Skip error on package dependence and return undefined | - | ## Functions @@ -404,12 +428,16 @@ type PackageInfo: { isESM: boolean; level: number; license: string; + lifeCycleScripts: { [key in lifeCycleScripts]?: string }; name: string; types: boolean; unpackedSize: number; + unpackedSizeKB: number; + unpackedSizeMB: number; url: { funding: string; homepage: string; + npm: string; repository: string; unpkg: string; }; @@ -432,12 +460,16 @@ type PackageInfo: { | `isESM` | `boolean` | - | | `level` | `number` | Level of the dependence installation. Main packages is 0 | | `license`? | `string` | - | +| `lifeCycleScripts`? | `{ [key in lifeCycleScripts]?: string }` | - | | `name` | `string` | - | | `types` | `boolean` | - | | `unpackedSize` | `number` | Unpacked size in bytes | -| `url` | \{ `funding`: `string`; `homepage`: `string`; `repository`: `string`; `unpkg`: `string`; \} | - | +| `unpackedSizeKB` | `number` | - | +| `unpackedSizeMB` | `number` | - | +| `url` | \{ `funding`: `string`; `homepage`: `string`; `npm`: `string`; `repository`: `string`; `unpkg`: `string`; \} | - | | `url.funding`? | `string` | - | | `url.homepage`? | `string` | - | +| `url.npm` | `string` | - | | `url.repository`? | `string` | - | | `url.unpkg`? | `string` | - | | `version` | `string` | - | @@ -470,6 +502,8 @@ type SiziumResponse: { packageNum: number; packages: PackageInfo[]; size: number; + sizeKB: number; + sizeMB: number; }; ``` @@ -481,3 +515,5 @@ type SiziumResponse: { | `packageNum` | `number` | - | | `packages` | [`PackageInfo`](#packageinfo)[] | - | | `size` | `number` | Size in bytes | +| `sizeKB` | `number` | - | +| `sizeMB` | `number` | - | diff --git a/docs/guide/lib/api.md b/docs/guide/lib/api.md index e9a6ae6..d6c38cd 100644 --- a/docs/guide/lib/api.md +++ b/docs/guide/lib/api.md @@ -260,20 +260,24 @@ const data = await size.get() ##### new SiziumLocal() ```ts -new SiziumLocal(packagePath: string): SiziumLocal +new SiziumLocal(input: string, opts?: { + skipError: boolean; + }): SiziumLocal ``` ###### Parameters -| Parameter | Type | -| ------ | ------ | -| `packagePath` | `string` | +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `input` | `string` | - | +| `opts`? | `object` | - | +| `opts.skipError`? | `boolean` | Skip error on package dependence and return undefined | ###### Returns [`SiziumLocal`](#siziumlocal) -###### Overrides +###### Inherited from `PackageSuper.constructor` @@ -291,9 +295,17 @@ get(): Promise #### Properties -| Property | Type | -| ------ | ------ | -| `packagePath` | `string` | +| Property | Modifier | Type | Description | Inherited from | +| ------ | ------ | ------ | ------ | ------ | +| `Error` | `public` | *typeof* `SiziumError` | - | `PackageSuper.Error` | +| `ERROR_ID` | `public` | \{ `GETTING_LOCAL_DATA`: `"GETTING_LOCAL_DATA"`; `GETTING_PKG_NAME`: `"GETTING_PKG_NAME"`; `GETTING_REGISTRY_DATA`: `"GETTING_REGISTRY_DATA"`; `INVALID_PKG_NAME`: `"INVALID_PKG_NAME"`; \} | - | `PackageSuper.ERROR_ID` | +| `ERROR_ID.GETTING_LOCAL_DATA` | `readonly` | `"GETTING_LOCAL_DATA"` | - | - | +| `ERROR_ID.GETTING_PKG_NAME` | `readonly` | `"GETTING_PKG_NAME"` | - | - | +| `ERROR_ID.GETTING_REGISTRY_DATA` | `readonly` | `"GETTING_REGISTRY_DATA"` | - | - | +| `ERROR_ID.INVALID_PKG_NAME` | `readonly` | `"INVALID_PKG_NAME"` | - | - | +| `input` | `public` | `string` | - | `PackageSuper.input` | +| `opts?` | `public` | \{ `skipError`: `boolean`; \} | - | `PackageSuper.opts` | +| `opts.skipError` | `public` | `boolean` | Skip error on package dependence and return undefined | - | *** @@ -320,20 +332,24 @@ console.log(data.size) // total size on bytes ##### new SiziumRegistry() ```ts -new SiziumRegistry(name: string): SiziumRegistry +new SiziumRegistry(input: string, opts?: { + skipError: boolean; + }): SiziumRegistry ``` ###### Parameters -| Parameter | Type | -| ------ | ------ | -| `name` | `string` | +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `input` | `string` | - | +| `opts`? | `object` | - | +| `opts.skipError`? | `boolean` | Skip error on package dependence and return undefined | ###### Returns [`SiziumRegistry`](#siziumregistry) -###### Overrides +###### Inherited from `PackageSuper.constructor` @@ -351,9 +367,17 @@ get(): Promise #### Properties -| Property | Type | -| ------ | ------ | -| `name` | `string` | +| Property | Modifier | Type | Description | Inherited from | +| ------ | ------ | ------ | ------ | ------ | +| `Error` | `public` | *typeof* `SiziumError` | - | `PackageSuper.Error` | +| `ERROR_ID` | `public` | \{ `GETTING_LOCAL_DATA`: `"GETTING_LOCAL_DATA"`; `GETTING_PKG_NAME`: `"GETTING_PKG_NAME"`; `GETTING_REGISTRY_DATA`: `"GETTING_REGISTRY_DATA"`; `INVALID_PKG_NAME`: `"INVALID_PKG_NAME"`; \} | - | `PackageSuper.ERROR_ID` | +| `ERROR_ID.GETTING_LOCAL_DATA` | `readonly` | `"GETTING_LOCAL_DATA"` | - | - | +| `ERROR_ID.GETTING_PKG_NAME` | `readonly` | `"GETTING_PKG_NAME"` | - | - | +| `ERROR_ID.GETTING_REGISTRY_DATA` | `readonly` | `"GETTING_REGISTRY_DATA"` | - | - | +| `ERROR_ID.INVALID_PKG_NAME` | `readonly` | `"INVALID_PKG_NAME"` | - | - | +| `input` | `public` | `string` | - | `PackageSuper.input` | +| `opts?` | `public` | \{ `skipError`: `boolean`; \} | - | `PackageSuper.opts` | +| `opts.skipError` | `public` | `boolean` | Skip error on package dependence and return undefined | - | ## Functions @@ -404,12 +428,16 @@ type PackageInfo: { isESM: boolean; level: number; license: string; + lifeCycleScripts: { [key in lifeCycleScripts]?: string }; name: string; types: boolean; unpackedSize: number; + unpackedSizeKB: number; + unpackedSizeMB: number; url: { funding: string; homepage: string; + npm: string; repository: string; unpkg: string; }; @@ -432,12 +460,16 @@ type PackageInfo: { | `isESM` | `boolean` | - | | `level` | `number` | Level of the dependence installation. Main packages is 0 | | `license`? | `string` | - | +| `lifeCycleScripts`? | `{ [key in lifeCycleScripts]?: string }` | - | | `name` | `string` | - | | `types` | `boolean` | - | | `unpackedSize` | `number` | Unpacked size in bytes | -| `url` | \{ `funding`: `string`; `homepage`: `string`; `repository`: `string`; `unpkg`: `string`; \} | - | +| `unpackedSizeKB` | `number` | - | +| `unpackedSizeMB` | `number` | - | +| `url` | \{ `funding`: `string`; `homepage`: `string`; `npm`: `string`; `repository`: `string`; `unpkg`: `string`; \} | - | | `url.funding`? | `string` | - | | `url.homepage`? | `string` | - | +| `url.npm` | `string` | - | | `url.repository`? | `string` | - | | `url.unpkg`? | `string` | - | | `version` | `string` | - | @@ -470,6 +502,8 @@ type SiziumResponse: { packageNum: number; packages: PackageInfo[]; size: number; + sizeKB: number; + sizeMB: number; }; ``` @@ -481,3 +515,5 @@ type SiziumResponse: { | `packageNum` | `number` | - | | `packages` | [`PackageInfo`](#packageinfo)[] | - | | `size` | `number` | Size in bytes | +| `sizeKB` | `number` | - | +| `sizeMB` | `number` | - | diff --git a/package.json b/package.json index 98d6c1d..170bd38 100644 --- a/package.json +++ b/package.json @@ -55,8 +55,8 @@ }, "devDependencies": { "@changesets/changelog-github": "0.5.0", - "@dovenv/core": "1.1.5", - "@dovenv/theme-pigeonposse": "1.1.5", + "@dovenv/core": "1.2.0", + "@dovenv/theme-pigeonposse": "1.2.0", "@playwright/test": "1.49.1", "@types/node": "22.10.5", "binarium": "2.0.5", diff --git a/packages/docs/dovenv.config.js b/packages/docs/dovenv.config.js index 2873b4a..d606c13 100644 --- a/packages/docs/dovenv.config.js +++ b/packages/docs/dovenv.config.js @@ -113,6 +113,7 @@ export default defineConfig( link : core.pkg.homepage, }, ], + // pwa : { pwaAssets: false }, download : { groups : { bin: 'Executables' }, items : {