Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
packages/**/node_modules
packages/**/dist
packages/zcli-connectors/src/templates
9 changes: 8 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@
],
"env": {
"node": true,
"mocha": true
"mocha": true,
"es2021": true
},
"globals": {
"Headers": "readonly",
"Request": "readonly",
"Response": "readonly",
"fetch": "readonly"
},
"plugins": [
"@typescript-eslint"
Expand Down
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,12 @@ packages/zcli-apps/tests/functional/mocks/*/tmp
packages/**/dist
.DS_Store
.idea

# Yarn Berry
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
.pnp.*
6 changes: 5 additions & 1 deletion .mocharc.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,9 @@
"watch-ignore": ["lib/vendor"],
"require": ["ts-node/register"],
"recursive": true,
"ignore": ["packages/zcli-connectors/src/templates/**"]
"ignore": [
"packages/zcli-connectors/src/templates/**",
"packages/zcli-connectors/src/lib/manifest-generator/generator.test.ts",
"packages/zcli-connectors/src/lib/vite/vite-config.test.ts"
]
}
940 changes: 940 additions & 0 deletions .yarn/releases/yarn-4.13.0.cjs

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
compressionLevel: mixed

enableGlobalCache: false

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.13.0.cjs
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@
"@oclif/test": "=2.1.0",
"@types/chai": "^4",
"@types/express": "^4.17.3",
"@types/glob": "^8.1.0",
"@types/mocha": "^9.1.1",
"@types/node": "^14.0.14",
"@types/glob": "^8.1.0",
"@types/sinon-chai": "^4.0.0",
"@typescript-eslint/eslint-plugin": "^5.30.0",
"@typescript-eslint/parser": "^5.30.0",
"chai": "^4",
Expand All @@ -32,8 +33,7 @@
"standard": "^17.0.0",
"ts-node": "^10.9.1",
"typescript": "~4.7.4",
"yarn-audit-fix": "^10.1.1",
"@types/sinon-chai": "^4.0.0"
"yarn-audit-fix": "^10.1.1"
},
"engines": {
"node": ">=20.17.0"
Expand All @@ -46,13 +46,12 @@
],
"scripts": {
"audit:fix": "yarn-audit-fix",
"postinstall": "lerna bootstrap",
"dev": "ts-node ./packages/zcli/bin/run",
"git:check": "./scripts/git_check.sh",
"link:bin": "bash ./scripts/link_dev.sh",
"lint": "eslint . --ext .ts --config .eslintrc",
"test": "nyc --extension .ts mocha --config=.mocharc.json --forbid-only packages/**/src/**/*.test.ts",
"test:functional": "mocha --config=.mocharc.json -r ts-node/register packages/**/tests/**/*.test.ts",
"test:functional": "mocha --config=.mocharc.json -r ts-node/register packages/zcli-apps/tests/**/*.test.ts packages/zcli-themes/tests/**/*.test.ts",
"changelog": "lerna-changelog",
"type:check": "lerna run type:check"
},
Expand All @@ -66,6 +65,7 @@
"repository": "zendesk/zcli",
"types": "lib/index.d.ts",
"resolutions": {
"@types/glob": "^8.1.0"
}
"@types/glob": "8.1.0"
},
"packageManager": "yarn@4.13.0"
}
4 changes: 1 addition & 3 deletions packages/zcli-apps/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
"publishConfig": {
"access": "public"
},
"bin": {
"zcli-apps": "./bin/run"
},
"bin": "./bin/run",
"scripts": {
"build": "tsc",
"prepack": "tsc && ../../scripts/prepack.sh",
Expand Down
4 changes: 2 additions & 2 deletions packages/zcli-apps/src/commands/apps/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
const { job_id } = await deployApp('PUT', `api/v2/apps/${appID}`, uploadId)

try {
const { app_id }: any = await getUploadJobStatus(job_id, appPath)

Check warning on line 33 in packages/zcli-apps/src/commands/apps/update.ts

View workflow job for this annotation

GitHub Actions / build-and-check (windows-latest, 20.x)

Unexpected any. Specify a different type

Check warning on line 33 in packages/zcli-apps/src/commands/apps/update.ts

View workflow job for this annotation

GitHub Actions / build-and-check (ubuntu-latest, 20.x)

Unexpected any. Specify a different type

Check warning on line 33 in packages/zcli-apps/src/commands/apps/update.ts

View workflow job for this annotation

GitHub Actions / build-and-check (macos-latest, 20.x)

Unexpected any. Specify a different type
CliUx.ux.action.stop('Deployed')
if (!manifest.requirementsOnly && manifest.location) {
Object.keys(manifest.location).forEach(async product => {
Expand All @@ -42,7 +42,7 @@
this.log(chalk.green(`Successfully updated app: ${manifest.name} with app_id: ${app_id}`))
} catch (error) {
CliUx.ux.action.stop('Failed')
this.error(chalk.red(error))
this.error(chalk.red(error instanceof Error ? error.message : String(error)))
}
}

Expand All @@ -68,7 +68,7 @@
try {
await this.installApp(appConfig, upload_id, appPath, manifest, appID)
} catch (error) {
this.error(chalk.red(error))
this.error(chalk.red(error instanceof Error ? error.message : String(error)))
}
}
}
Expand Down
4 changes: 1 addition & 3 deletions packages/zcli-connectors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
"publishConfig": {
"access": "public"
},
"bin": {
"zcli-connectors": "./bin/run"
},
"bin": "./bin/run",
"scripts": {
"build": "tsc",
"prepack": "tsc && ../../scripts/prepack.sh",
Expand Down
3 changes: 2 additions & 1 deletion packages/zcli-core/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"outDir": "dist",
"rootDir": "src",
"strict": true,
"target": "es2017"
"target": "es2017",
"skipLibCheck": true
},
"include": [
"src/**/*"
Expand Down
4 changes: 1 addition & 3 deletions packages/zcli-themes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
"publishConfig": {
"access": "public"
},
"bin": {
"zcli-themes": "./bin/run"
},
"bin": "./bin/run",
"scripts": {
"build": "tsc",
"prepack": "tsc && ../../scripts/prepack.sh",
Expand Down
2 changes: 1 addition & 1 deletion packages/zcli-themes/src/lib/rewriteManifest.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ describe('rewriteManifest', () => {
.returns(manifestContent)

writeFileSyncStub
.withArgs('theme/path/manifest.json')
.withArgs('theme/path/manifest.json', sinon.match.any)
.throws(new Error('EACCES: permission denied'))

expect(() => {
Expand Down
4 changes: 1 addition & 3 deletions packages/zcli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
"publishConfig": {
"access": "public"
},
"bin": {
"zcli": "./bin/run"
},
"bin": "./bin/run",
"dependencies": {
"@oclif/plugin-autocomplete": "=1.3.10",
"@oclif/plugin-help": "=5.1.23",
Expand Down
3 changes: 2 additions & 1 deletion packages/zcli/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"outDir": "dist",
"rootDir": "src",
"strict": true,
"target": "es2017"
"target": "es2017",
"skipLibCheck": true
},
"include": [
"src/**/*"
Expand Down
Loading
Loading