File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Change Log
2+
3+ All notable changes to this project will be documented in this file.
4+ See [ Conventional Commits] ( https://conventionalcommits.org ) for commit guidelines.
5+
6+ # [ 1.0.0-beta.1] ( https://github.com/zendesk/zcli/compare/v1.0.0-beta.0...v1.0.0-beta.1 ) (2026-01-12)
7+
8+ ** Note:** Initial version for zcli-connectors package
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env node
2+
3+ const oclif = require ( '@oclif/core' )
4+
5+ oclif . run ( ) . catch ( require ( '@oclif/core/handle' ) )
Original file line number Diff line number Diff line change 1+ @ echo off
2+
3+ node " %~dp0 \run" %*
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " @zendesk/zcli-connectors" ,
3+ "description" : " zcli connectors commands live here" ,
4+ "version" : " 1.0.0-beta.1" ,
5+ "author" : " @vegemite" ,
6+ "npmRegistry" : " https://registry.npmjs.org" ,
7+ "publishConfig" : {
8+ "access" : " public"
9+ },
10+ "bin" : {
11+ "zcli-connectors" : " ./bin/run"
12+ },
13+ "scripts" : {
14+ "build" : " tsc" ,
15+ "prepack" : " tsc && ../../scripts/prepack.sh" ,
16+ "postpack" : " rm -f oclif.manifest.json npm-shrinkwrap.json && rm -rf ./dist && git checkout ./package.json" ,
17+ "type:check" : " tsc"
18+ },
19+ "dependencies" : {
20+ "adm-zip" : " 0.5.10" ,
21+ "archiver" : " ^5.3.1" ,
22+ "axios" : " ^1.7.5" ,
23+ "chalk" : " ^4.1.2" ,
24+ "fs-extra" : " ^10.0.0" ,
25+ "rimraf" : " ^3.0.2" ,
26+ "tslib" : " ^2.4.0"
27+ },
28+ "devDependencies" : {
29+ "@oclif/test" : " =2.1.0" ,
30+ "@types/adm-zip" : " ^0.5.5" ,
31+ "@types/archiver" : " ^5.3.1" ,
32+ "@types/chai" : " ^4" ,
33+ "@types/mocha" : " ^9.1.1" ,
34+ "@types/rimraf" : " ^3.0.2" ,
35+ "chai" : " ^4" ,
36+ "eslint" : " ^8.18.0" ,
37+ "eslint-config-oclif" : " ^4.0.0" ,
38+ "eslint-config-oclif-typescript" : " ^1.0.2" ,
39+ "lerna" : " ^5.6.2" ,
40+ "mocha" : " ^10.8.2" ,
41+ "sinon" : " ^14.0.0"
42+ },
43+ "files" : [
44+ " /bin" ,
45+ " /dist" ,
46+ " /oclif.manifest.json" ,
47+ " /npm-shrinkwrap.json"
48+ ],
49+ "keywords" : [
50+ " zcli" ,
51+ " zendesk" ,
52+ " cli" ,
53+ " command"
54+ ],
55+ "license" : " MIT" ,
56+ "main" : " src/index.js" ,
57+ "oclif" : {
58+ "commands" : " ./src/commands" ,
59+ "bin" : " zcli-connectors"
60+ },
61+ "types" : " lib/index.d.ts"
62+ }
Original file line number Diff line number Diff line change 1+ import { Command } from '@oclif/core'
2+ import * as path from 'path'
3+ import * as chalk from 'chalk'
4+
5+ export default class Bundle extends Command {
6+ static description = 'bundles your connector package (Note: This command is not yet available for customers)'
7+
8+ static args = [
9+ { name : 'connectorDirectory' , default : '.' , description : 'connector path where configuration exists' }
10+ ]
11+
12+ static examples = [
13+ '$ zcli connectors:bundle .' ,
14+ '$ zcli connectors:bundle ./connector1'
15+ ]
16+
17+ async run ( ) {
18+ const { args } = await this . parse ( Bundle )
19+ const { connectorDirectory } = args
20+
21+ const connectorPath = path . resolve ( connectorDirectory )
22+
23+ this . log ( chalk . yellow ( `Bundling connector from: ${ connectorPath } ` ) )
24+ // Placeholder for actual bundling logic
25+ this . log ( chalk . green ( 'Connector bundle created successfully!' ) )
26+ }
27+ }
Original file line number Diff line number Diff line change 1+ export const DEFAULT_CONNECTORS_CONFIG_FILE = 'zcli.connectors.config.json'
Original file line number Diff line number Diff line change 1+ export default { }
Original file line number Diff line number Diff line change 1+ export interface ConfigParameters {
2+ [ parameterKey : string ] : string | number | boolean ;
3+ }
4+
5+ export interface ZcliConfigFileContent {
6+ connection_id ?: string ;
7+ parameters ?: ConfigParameters ;
8+ }
9+
10+ export type Dictionary < T > = {
11+ [ key : string ] : T ;
12+ }
13+
14+ export interface FileList {
15+ name : string ;
16+ time : number ;
17+ }
18+
19+ export interface FsExtraError extends Error {
20+ code : string ;
21+ }
Original file line number Diff line number Diff line change 1+ import { test } from '@oclif/test'
2+ import BundleCommand from '../../src/commands/connectors/bundle'
3+
4+ describe ( 'bundle' , ( ) => {
5+ describe ( 'with default directory' , ( ) => {
6+ test
7+ . it ( 'should run bundle command with default directory' , async ( ) => {
8+ await BundleCommand . run ( [ '.' ] )
9+ // Test passes if no error is thrown
10+ } )
11+ } )
12+
13+ describe ( 'with custom directory' , ( ) => {
14+ test
15+ . it ( 'should run bundle command with custom directory' , async ( ) => {
16+ await BundleCommand . run ( [ './custom' ] )
17+ // Test passes if no error is thrown
18+ } )
19+ } )
20+ } )
Original file line number Diff line number Diff line change 1+ {
2+ "compilerOptions" : {
3+ "declaration" : true ,
4+ "importHelpers" : true ,
5+ "module" : " commonjs" ,
6+ "outDir" : " dist" ,
7+ "rootDir" : " src" ,
8+ "strict" : true ,
9+ "target" : " es2017" ,
10+ "skipLibCheck" : true ,
11+ "esModuleInterop" : true
12+ },
13+ "include" : [
14+ " src/**/*"
15+ ]
16+ }
You can’t perform that action at this time.
0 commit comments