Skip to content

Commit

Permalink
feat: change CLI package name (#665)
Browse files Browse the repository at this point in the history
  • Loading branch information
clample authored Apr 28, 2023
1 parent 78ea3ff commit 125b363
Show file tree
Hide file tree
Showing 18 changed files with 130 additions and 130 deletions.
220 changes: 110 additions & 110 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { BrowserCheck } = require('@checkly/cli/constructs')
const { BrowserCheck } = require('checkly/constructs')
new BrowserCheck('browser-check', {
name: 'Browser Check',
code: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable */
import { ApiCheck, Frequency } from '@checkly/cli/constructs'
import { ApiCheck, Frequency } from 'checkly/constructs'
new ApiCheck('api-check', {
name: 'Api Check',
activated: false,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable */
import { ApiCheck, BrowserCheck, CheckGroup } from '@checkly/cli/constructs'
import { ApiCheck, BrowserCheck, CheckGroup } from 'checkly/constructs'

const group2 = new CheckGroup('my-check-group', {
name: 'My Group',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable */
import { ApiCheck, BrowserCheck, CheckGroup } from '@checkly/cli/constructs'
import { ApiCheck, BrowserCheck, CheckGroup } from 'checkly/constructs'

const group1 = new CheckGroup('my-check-group', {
name: 'My Group',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable */
import { ApiCheck, BrowserCheck } from '@checkly/cli/constructs'
import { ApiCheck, BrowserCheck } from 'checkly/constructs'

new ApiCheck('not-testonly-default-check', {
name: 'TestOnly=false (default) Check',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineConfig } from '@checkly/cli'
import { defineConfig } from 'checkly'

const config = defineConfig({
projectName: 'Test Project',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineConfig } from '@checkly/cli'
import { defineConfig } from 'checkly'

const config = defineConfig({
projectName: 'Test Staging Project',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CheckGroup, BrowserCheck } from '@checkly/cli/constructs'
import { CheckGroup, BrowserCheck } from 'checkly/constructs'
import { smsChannel, emailChannel } from '../alert-channels'
const alertChannels = [smsChannel, emailChannel]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BrowserCheck } from '@checkly/cli/constructs'
import { BrowserCheck } from 'checkly/constructs'

const browserCheck = new BrowserCheck('secret-browser-check', {
name: 'Show SECRET_ENV value',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
EmailAlertChannel,
SlackAlertChannel,
WebhookAlertChannel,
} from '@checkly/cli/constructs'
} from 'checkly/constructs'

const sendDefaults = {
sendFailure: true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ApiCheck, AssertionBuilder } from '@checkly/cli/constructs'
import { ApiCheck, AssertionBuilder } from 'checkly/constructs'
import { slackChannel, webhookChannel } from '../../alert-channels'

const apiCheck = new ApiCheck('homepage-api-check-1', {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ApiCheck } from '@checkly/cli/constructs'
import { ApiCheck } from 'checkly/constructs'

const apiCheck = new ApiCheck('not-included-typo-api-check-1', {
name: 'File extension type example',
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@checkly/cli",
"version": "0.4.13",
"name": "checkly",
"version": "4.0.0",
"description": "Checkly CLI",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export default class Login extends BaseCommand {

private _isLoginSuccess = async () => {
await api.validateAuthentication()
this.log('Welcome to @checkly/cli')
this.log('Welcome to the Checkly CLI')
}

async run (): Promise<void> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineConfig } from '@checkly/cli'
import { defineConfig } from 'checkly'

const config = defineConfig({
projectName: 'test-config-project',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineConfig } from '@checkly/cli'
import { defineConfig } from 'checkly'

const config = defineConfig({
projectName: 'test-config-project',
Expand Down
6 changes: 3 additions & 3 deletions packages/cli/src/services/check-parser/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ export class DependencyParseError extends Error {
}
}
if (unsupportedNpmDependencies.length) {
if (unsupportedNpmDependencies.some(d => d.unsupportedDependencies.some(ud => ud === '@checkly/cli/constructs'))) {
message += '\n\nIt looks like you\'re trying to use @checkly/cli/constructs in a browser check file. ' +
'@checkly/cli/constructs should only be used in check files: files ending in .check.ts and .check.js, ' +
if (unsupportedNpmDependencies.some(d => d.unsupportedDependencies.some(ud => ud === 'checkly/constructs'))) {
message += '\n\nIt looks like you\'re trying to use checkly/constructs in a browser check file. ' +
'checkly/constructs should only be used in check files: files ending in .check.ts and .check.js, ' +
'or the checkMatch pattern set in your configuration. For more information see on the difference between ' +
'test files and check files, see https://www.checklyhq.com/docs/cli/\n'
} else {
Expand Down

0 comments on commit 125b363

Please sign in to comment.