Skip to content

Commit

Permalink
Upgrade to node 22
Browse files Browse the repository at this point in the history
  • Loading branch information
Corentin Mors committed Nov 21, 2024
1 parent 07f4293 commit 4c13489
Show file tree
Hide file tree
Showing 48 changed files with 5,924 additions and 3,862 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/documentation-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 22

- name: Build
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/manual-test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ jobs:
- host: ubuntu-latest
target: linux-x64
runs-on: ${{ matrix.settings.host }}
name: dev build - ${{ matrix.settings.target }} - node@18
name: dev build - ${{ matrix.settings.target }} - node@22
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 22.x

- if: matrix.settings.host == 'macos-14'
run: brew install python-setuptools
Expand All @@ -35,7 +35,7 @@ jobs:
- run: yarn workspaces focus --all --production
# package final binaries
- run: |
yarn dlx @yao-pkg/pkg@5.12.0 ./dist -t node18-${{ matrix.settings.target }} -o bundle/dcli-${{ matrix.settings.target }}${{ matrix.settings.extension }} -C Brotli "--public" "--public-packages" "tslib,thirty-two,node-hkdf-sync,vows" "--no-bytecode"
yarn dlx @yao-pkg/pkg@6.1.1 ./dist -t node22-${{ matrix.settings.target }} -o bundle/dcli-${{ matrix.settings.target }}${{ matrix.settings.extension }} -C Brotli "--public" "--public-packages" "tslib,thirty-two,node-hkdf-sync,vows" "--no-bytecode"
- name: Archive binary artifact
uses: actions/upload-artifact@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ jobs:
- host: ubuntu-latest
target: linux-x64
runs-on: ${{ matrix.settings.host }}
name: dev build - ${{ matrix.settings.target }} - node@18
name: dev build - ${{ matrix.settings.target }} - node@22
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 22.x

- if: matrix.settings.host == 'macos-14'
run: brew install python-setuptools
Expand All @@ -38,7 +38,7 @@ jobs:
- run: yarn workspaces focus --all --production
# package final binaries
- run: |
yarn dlx @yao-pkg/pkg@5.12.0 ./dist -t node18-${{ matrix.settings.target }} -o bundle/dcli-${{ matrix.settings.target }}${{ matrix.settings.extension }} -C Brotli "--public" "--public-packages" "tslib,thirty-two,node-hkdf-sync,vows" "--no-bytecode"
yarn dlx @yao-pkg/pkg@6.1.1 ./dist -t node22-${{ matrix.settings.target }} -o bundle/dcli-${{ matrix.settings.target }}${{ matrix.settings.extension }} -C Brotli "--public" "--public-packages" "tslib,thirty-two,node-hkdf-sync,vows" "--no-bytecode"
- name: Archive binary artifact
uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 22.x
- run: yarn
- run: yarn run lint
- run: yarn run test
Expand Down
894 changes: 0 additions & 894 deletions .yarn/releases/yarn-4.2.2.cjs

This file was deleted.

2,056 changes: 2,056 additions & 0 deletions .yarn/releases/yarn-4.5.1.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ enableGlobalCache: false

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.2.2.cjs
yarnPath: .yarn/releases/yarn-4.5.1.cjs
2 changes: 2 additions & 0 deletions documentation/components/player.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ export const YoutubePlayer = (props: { videoId: string }) => {
></iframe>
);
};

export default YoutubePlayer;
5 changes: 5 additions & 0 deletions documentation/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
11 changes: 6 additions & 5 deletions documentation/next.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
const withNextra = require('nextra')({
import nextra from 'nextra';

const withNextra = nextra({
theme: 'nextra-theme-docs',
themeConfig: './theme.config.jsx',
themeConfig: './theme.config.jsx'
});

let assetPrefix = '';
let basePath = '';

module.exports = {
...withNextra(),
export default withNextra({
images: {
unoptimized: true,
},
assetPrefix: assetPrefix,
basePath: basePath,
output: 'export'
};
});
14 changes: 9 additions & 5 deletions documentation/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
{
"name": "@dashlane/cli-documentation",
"packageManager": "[email protected]",
"type": "module",
"packageManager": "[email protected]",
"dependencies": {
"next": "^14.2.10",
"nextra": "^2.13.4",
"nextra-theme-docs": "^2.13.4",
"next": "^15.0.3",
"nextra": "^3.2.3",
"nextra-theme-docs": "^3.2.3",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"sharp": "^0.33.4"
"sharp": "^0.33.5"
},
"devDependencies": {
"@types/react": "18.3.12"
}
}
5 changes: 5 additions & 0 deletions documentation/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import type { AppProps } from 'next/app';

export default function MyApp({ Component, pageProps }: AppProps) {
return <Component {...pageProps} />;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
export default {
"index": {
"title": "Introduction",
"theme": {
Expand Down
7 changes: 0 additions & 7 deletions documentation/pages/business/_meta.json

This file was deleted.

7 changes: 7 additions & 0 deletions documentation/pages/business/_meta.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default {
index: 'Get Started',
'audit-logs': 'Audit Logs',
dwi: 'Dark Web Insights',
members: 'Members',
reports: 'Reports',
};
18 changes: 11 additions & 7 deletions documentation/pages/index.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import { Card, Cards } from 'nextra-theme-docs';
import { Cards } from 'nextra/components';

# Documentation

<Cards>
<Card title="⚙️ Setup the CLI" href="/install" />
<Card title="💬 Discuss with us" href="https://github.com/Dashlane/dashlane-cli/discussions" target="_blank" />
<Card title="👩‍💻 Contribute on Github" href="https://github.com/Dashlane/dashlane-cli" target="_blank" />
<Cards.Card title="⚙️ Setup the CLI" href="/install" />
<Cards.Card
title="💬 Discuss with us"
href="https://github.com/Dashlane/dashlane-cli/discussions"
target="_blank"
/>
<Cards.Card title="👩‍💻 Contribute on Github" href="https://github.com/Dashlane/dashlane-cli" target="_blank" />
</Cards>

![Dashlane CLI](../public/main.png)
Expand All @@ -17,7 +21,7 @@ Dashlane CLI also allows you to access team admin related features such as acces
This documentation is separated in three parts:

<Cards>
<Card title="👤 Personal Commands" href="/personal" />
<Card title="👔 Business Commands" href="/business" />
<Card title="🧩 Integrations" href="/integrations" />
<Cards.Card title="👤 Personal Commands" href="/personal" />
<Cards.Card title="👔 Business Commands" href="/business" />
<Cards.Card title="🧩 Integrations" href="/integrations" />
</Cards>
14 changes: 7 additions & 7 deletions documentation/pages/install.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Callout, Tab, Tabs } from 'nextra-theme-docs'
import { Callout, Tabs } from 'nextra/components'

# Install

Expand All @@ -11,7 +11,7 @@ You can either install it using :
- manually with [Yarn](https://yarnpkg.com/)

<Tabs items={['Homebrew', 'Packaged Executables (x64 only)', 'Manually with Yarn']}>
<Tab>
<Tabs.Tab>
You can install the Dashlane CLI using [Homebrew](https://brew.sh/), a package manager for __macOS__ and __Linux__.

To install Homebrew, run the following command in your terminal:
Expand All @@ -27,8 +27,8 @@ You can either install it using :
```

The CLI is now installed on your machine, it will be updated automatically when a new version is released.
</Tab>
<Tab>
</Tabs.Tab>
<Tabs.Tab>
Head to the [releases page](https://github.com/Dashlane/dashlane-cli/releases) and download the latest version of the CLI for your platform (Windows, macOS or Linux).

You may need to mark the binary as executable (on macOS and Linux):
Expand Down Expand Up @@ -60,8 +60,8 @@ You can either install it using :
To do so, go to `System Preferences > Security & Privacy > General` and click on "Allow Anyway" next to the message "dcli-macos was blocked from use because it is not from an identified developer".

You will need to get the latest version of the CLI manually by downloading the latest release and replacing the binary in your bin folder.
</Tab>
<Tab>
</Tabs.Tab>
<Tabs.Tab>
<Callout type="warning">We do not recommend the manual install for personal computers, if you plan to use the local keychain, as the NodeJS process will be the owner of your secrets, we recommend to use a packaged version.</Callout>

This method is available on every environment that supports [Node.js](https://nodejs.org/en/) and Yarn.
Expand All @@ -87,7 +87,7 @@ You can either install it using :
```

Make sure to pull the latest changes and rebuild the project to get the latest version of the CLI.
</Tab>
</Tabs.Tab>

</Tabs>

Expand Down
8 changes: 4 additions & 4 deletions documentation/pages/integrations.mdx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { Card, Cards } from 'nextra/components';
import { Cards } from 'nextra/components';

# Integrations

We support several integrations with popular services and tools.
Explore the integrations below to learn how to improve your development workflows.

<Cards>
<Card title="🐙 GitHub Action" href="/integrations/github-action" />
<Card title="💻 VS Code Extension" href="/integrations/vscode" />
<Card title="🗂️ Logs to SIEM" href="/integrations/siem" />
<Cards.Card title="🐙 GitHub Action" href="/integrations/github-action" />
<Cards.Card title="💻 VS Code Extension" href="/integrations/vscode" />
<Cards.Card title="🗂️ Logs to SIEM" href="/integrations/siem" />
</Cards>
5 changes: 0 additions & 5 deletions documentation/pages/integrations/_meta.json

This file was deleted.

5 changes: 5 additions & 0 deletions documentation/pages/integrations/_meta.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default {
'github-action': 'GitHub Action',
vscode: 'Visual Studio Code',
siem: 'SIEM',
};
12 changes: 6 additions & 6 deletions documentation/pages/personal.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Card, Cards } from 'nextra-theme-docs';
import { Cards } from 'nextra/components';

# Get started with Personal Commands

Expand All @@ -7,9 +7,9 @@ Accessing your personal vault allows you to view your passwords, secure notes an
![Dashlane CLI examples](../public/cli-examples.png)

<Cards>
<Card title="🔑 Authentication" href="/personal/authentication" />
<Card title="🔒 Accessing your vault" href="/personal/vault" />
<Card title="📱 Manage your devices" href="/personal/devices" />
<Card title="🔎 Load your secrets" href="/personal/secrets/read" />
<Card title="🛟 Backup your local vault" href="/personal/backup" />
<Cards.Card title="🔑 Authentication" href="/personal/authentication" />
<Cards.Card title="🔒 Accessing your vault" href="/personal/vault" />
<Cards.Card title="📱 Manage your devices" href="/personal/devices" />
<Cards.Card title="🔎 Load your secrets" href="/personal/secrets/read" />
<Cards.Card title="🛟 Backup your local vault" href="/personal/backup" />
</Cards>
8 changes: 0 additions & 8 deletions documentation/pages/personal/_meta.json

This file was deleted.

8 changes: 8 additions & 0 deletions documentation/pages/personal/_meta.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export default {
authentication: 'Authentication',
devices: 'Managing your Devices',
vault: 'Accessing your Vault',
secrets: 'Load secrets',
backup: 'Backup your local Vault',
logout: 'Logout',
};
5 changes: 0 additions & 5 deletions documentation/pages/personal/secrets/_meta.json

This file was deleted.

5 changes: 5 additions & 0 deletions documentation/pages/personal/secrets/_meta.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default {
read: 'Read secrets references',
exec: 'Load secrets into environment variables',
inject: 'Load secrets into templated files',
};
2 changes: 1 addition & 1 deletion documentation/pages/personal/secrets/exec.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Steps } from 'nextra/components';
import { YoutubePlayer } from '../../../components/player';
import { YoutubePlayer } from '../../../components/player.tsx';

# Load secrets into environment variables

Expand Down
2 changes: 1 addition & 1 deletion documentation/pages/personal/secrets/inject.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Steps, Callout } from 'nextra/components';
import { YoutubePlayer } from '../../../components/player';
import { YoutubePlayer } from '../../../components/player.tsx';

# Load secrets into templated files

Expand Down
2 changes: 1 addition & 1 deletion documentation/pages/personal/secrets/read.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { YoutubePlayer } from '../../../components/player';
import { YoutubePlayer } from '../../../components/player.tsx';

# Read secrets references

Expand Down
2 changes: 1 addition & 1 deletion documentation/pages/personal/vault.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Callout } from 'nextra/components';
import { YoutubePlayer } from '../../components/player';
import YoutubePlayer from '../../components/player.tsx';

# Accessing your Vault

Expand Down
14 changes: 7 additions & 7 deletions documentation/pages/troubleshooting.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Tab, Tabs } from 'nextra-theme-docs';
import { Tabs } from 'nextra/components';

# Troubleshooting

Expand All @@ -22,27 +22,27 @@ In NodeJS the list of certificate authorities is hardcoded, read more here: [nod
You can use an environment variable to add custom certs ([see documentation](https://nodejs.org/docs/latest-v16.x/api/cli.html#node_extra_ca_certsfile)):

<Tabs items={['Bash', 'Powershell', 'Batch']}>
<Tab>
<Tabs.Tab>

```sh copy
export NODE_EXTRA_CA_CERTS="/path/to/cert.pem"
```

</Tab>
<Tab>
</Tabs.Tab>
<Tabs.Tab>

```powershell copy
$Env:NODE_EXTRA_CA_CERTS="C:\certs\root.crt"
```

</Tab>
<Tab>
</Tabs.Tab>
<Tabs.Tab>

```batch copy
set NODE_EXTRA_CA_CERTS="C:\certs\root.crt"
```

</Tab>
</Tabs.Tab>

</Tabs>

Expand Down
2 changes: 1 addition & 1 deletion documentation/theme.config.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default {
link: 'https://github.com/Dashlane/dashlane-cli'
},
docsRepositoryBase: 'https://github.com/Dashlane/dashlane-cli/blob/master/documentation',
footer: { text: (<span>Apache {new Date().getFullYear()} © Dashlane, Inc.</span>) },
footer: { content: (<span>Apache {new Date().getFullYear()} © Dashlane, Inc.</span>) },
useNextSeoProps() {
const { asPath } = useRouter();
if (asPath !== '/') {
Expand Down
Loading

0 comments on commit 4c13489

Please sign in to comment.