From 625ca70414b73ff5d4059f2158c78977bfc06cd8 Mon Sep 17 00:00:00 2001 From: William XING Date: Thu, 10 Nov 2022 12:50:55 +1030 Subject: [PATCH] Revert "Zcli package ignore" (#144) --- .gitignore | 1 - docs/apps.md | 25 +++----- packages/zcli-apps/src/lib/package.ts | 12 +--- .../mocks/single_product_ignore/.zcliignore | 6 -- .../assets/icon_nav_bar.svg | Bin 9241 -> 0 bytes .../assets/icon_ticket_editor.svg | 0 .../single_product_ignore/assets/iframe.html | 1 - .../assets/logo-small.png | 0 .../assets/testFolder/1gn0r3m3.jpg | 0 .../mocks/single_product_ignore/manifest.json | 18 ------ .../zcli.apps.config.json | 1 - .../tests/functional/package.test.ts | 55 +----------------- packages/zcli-core/.DS_Store | Bin 0 -> 6148 bytes packages/zcli-core/src/.DS_Store | Bin 0 -> 6148 bytes 14 files changed, 11 insertions(+), 108 deletions(-) delete mode 100644 packages/zcli-apps/tests/functional/mocks/single_product_ignore/.zcliignore delete mode 100644 packages/zcli-apps/tests/functional/mocks/single_product_ignore/assets/icon_nav_bar.svg delete mode 100644 packages/zcli-apps/tests/functional/mocks/single_product_ignore/assets/icon_ticket_editor.svg delete mode 100644 packages/zcli-apps/tests/functional/mocks/single_product_ignore/assets/iframe.html delete mode 100644 packages/zcli-apps/tests/functional/mocks/single_product_ignore/assets/logo-small.png delete mode 100644 packages/zcli-apps/tests/functional/mocks/single_product_ignore/assets/testFolder/1gn0r3m3.jpg delete mode 100644 packages/zcli-apps/tests/functional/mocks/single_product_ignore/manifest.json delete mode 100644 packages/zcli-apps/tests/functional/mocks/single_product_ignore/zcli.apps.config.json create mode 100644 packages/zcli-core/.DS_Store create mode 100644 packages/zcli-core/src/.DS_Store diff --git a/.gitignore b/.gitignore index 20ad0087..b4ed01bf 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,3 @@ yarn-error.log .vscode packages/zcli-apps/tests/functional/mocks/*/tmp packages/**/dist -.DS_Store diff --git a/docs/apps.md b/docs/apps.md index 14b543d4..60aa171f 100644 --- a/docs/apps.md +++ b/docs/apps.md @@ -3,17 +3,6 @@ zcli apps commands helps with managing Zendesk apps workflow. -* [`zcli apps:bump [APPPATH]`](#zcli-appsbump-apppath) -* [`zcli apps:clean [APPPATH]`](#zcli-appsclean-apppath) -* [`zcli apps:create APPDIRECTORIES`](#zcli-appscreate-appdirectories) -* [`zcli apps:new`](#zcli-appsnew) -* [`zcli apps:package APPDIRECTORY`](#zcli-appspackage-appdirectory) -* [`zcli apps:server APPDIRECTORIES`](#zcli-appsserver-appdirectories) -* [`zcli apps:update APPDIRECTORIES`](#zcli-appsupdate-appdirectories) -* [`zcli apps:validate APPDIRECTORY`](#zcli-appsvalidate-appdirectory) - -## Configuration - NOTE: You can set your apps config/settings in `zcli.apps.config.json` at the root of your app directory ie ``` @@ -31,12 +20,14 @@ NOTE: You can set your apps config/settings in `zcli.apps.config.json` at the ro See [these mock apps](https://github.com/zendesk/zcli/tree/master/packages/zcli-apps/tests/functional/mocks) for more references of `zcli.apps.config.json`. -If you wish to specify files/folders to be ignored as part of the packaging process, create a .zcliignore file in your apps root directory. Patterns following the gitignore specification included in a .zcliignore file will be excluded from packaging when any of the following commands are executed: - -* zcli apps:package -* zcli apps:create -* zcli apps:update -* zcli apps:validate +* [`zcli apps:bump [APPPATH]`](#zcli-appsbump-apppath) +* [`zcli apps:clean [APPPATH]`](#zcli-appsclean-apppath) +* [`zcli apps:create APPDIRECTORIES`](#zcli-appscreate-appdirectories) +* [`zcli apps:new`](#zcli-appsnew) +* [`zcli apps:package APPDIRECTORY`](#zcli-appspackage-appdirectory) +* [`zcli apps:server APPDIRECTORIES`](#zcli-appsserver-appdirectories) +* [`zcli apps:update APPDIRECTORIES`](#zcli-appsupdate-appdirectories) +* [`zcli apps:validate APPDIRECTORY`](#zcli-appsvalidate-appdirectory) ## `zcli apps:bump [APPPATH]` diff --git a/packages/zcli-apps/src/lib/package.ts b/packages/zcli-apps/src/lib/package.ts index 8243fc89..fb84810b 100644 --- a/packages/zcli-apps/src/lib/package.ts +++ b/packages/zcli-apps/src/lib/package.ts @@ -24,19 +24,11 @@ export const createAppPkg = async ( archive.pipe(output) - let archiveIgnore = ['tmp/**'] - - if (fs.pathExistsSync(`${appPath}/.zcliignore`)) { - archiveIgnore = archiveIgnore.concat(fs.readFileSync(`${appPath}/.zcliignore`).toString().replace(/\r\n/g, '\n').split('\n').filter((item) => { - return (item.trim().startsWith('#') ? null : item.trim()) - })) - } - + // ignore tmp dir archive.glob('**', { cwd: appPath, - ignore: archiveIgnore + ignore: ['tmp/**'] }) - await archive.finalize() if (!fs.pathExistsSync(pkgPath)) { diff --git a/packages/zcli-apps/tests/functional/mocks/single_product_ignore/.zcliignore b/packages/zcli-apps/tests/functional/mocks/single_product_ignore/.zcliignore deleted file mode 100644 index c1da21d6..00000000 --- a/packages/zcli-apps/tests/functional/mocks/single_product_ignore/.zcliignore +++ /dev/null @@ -1,6 +0,0 @@ -assets/logo-small.png -assets/iframe.html -assets/icon_nav_bar.svg -manifest.json -testFolder/ignoreFolder -testFolder/1gn0r3m3.jpg diff --git a/packages/zcli-apps/tests/functional/mocks/single_product_ignore/assets/icon_nav_bar.svg b/packages/zcli-apps/tests/functional/mocks/single_product_ignore/assets/icon_nav_bar.svg deleted file mode 100644 index 1ea7391276f3dcea38f54ef58bcade2cc8afedc2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9241 zcmeHMWl)=4w@n~LT1uf5D8-9AEmGXw-L(|gVksU!`9U_S#@1yJ=6-3AE6GN!I1Z}bYhlS|n0KzTCy-a8@!lP3k7+$v;#au2j* zxz}rplwy;GIOEi)$XJPAGl{Dul{{wGit9%rl*r}v^pch2eMh@0q4tpJU0m=6=QqP-OXTWiJUwx~ZRGD%Ie&*1Ie!Y&+p*^oZIJKg4O+dl&@8~~2QsdT|$a?5X6%FxC`Pqja-Q_|6M)5Ya%Qv`bt zbG4YAKln?ZKH#AS2rN8aCqLM~(morqUVa<9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&xJTk#tP-1s!$ioXJ5Lg!g uF2|#%z`HSkRsUZ6Hz5Cl;s22cH}?vPXA49pyZu4HLtR-%sanDA^?w2AdC2wv diff --git a/packages/zcli-apps/tests/functional/mocks/single_product_ignore/assets/icon_ticket_editor.svg b/packages/zcli-apps/tests/functional/mocks/single_product_ignore/assets/icon_ticket_editor.svg deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/zcli-apps/tests/functional/mocks/single_product_ignore/assets/iframe.html b/packages/zcli-apps/tests/functional/mocks/single_product_ignore/assets/iframe.html deleted file mode 100644 index 8119fb7f..00000000 --- a/packages/zcli-apps/tests/functional/mocks/single_product_ignore/assets/iframe.html +++ /dev/null @@ -1 +0,0 @@ -app 1 Iframe diff --git a/packages/zcli-apps/tests/functional/mocks/single_product_ignore/assets/logo-small.png b/packages/zcli-apps/tests/functional/mocks/single_product_ignore/assets/logo-small.png deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/zcli-apps/tests/functional/mocks/single_product_ignore/assets/testFolder/1gn0r3m3.jpg b/packages/zcli-apps/tests/functional/mocks/single_product_ignore/assets/testFolder/1gn0r3m3.jpg deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/zcli-apps/tests/functional/mocks/single_product_ignore/manifest.json b/packages/zcli-apps/tests/functional/mocks/single_product_ignore/manifest.json deleted file mode 100644 index d523e0de..00000000 --- a/packages/zcli-apps/tests/functional/mocks/single_product_ignore/manifest.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "Test App 1", - "author": { - "name": "Zendesk", - "email": "support@zendesk.com", - "url": "https://help.zendesk.com" - }, - "defaultLocale": "en", - "private": true, - "location": { - "support": { - "ticket_editor": "assets/iframe.html", - "nav_bar": "assets/iframe.html" - } - }, - "version": "1.0", - "frameworkVersion": "2.0" -} diff --git a/packages/zcli-apps/tests/functional/mocks/single_product_ignore/zcli.apps.config.json b/packages/zcli-apps/tests/functional/mocks/single_product_ignore/zcli.apps.config.json deleted file mode 100644 index 67bb252a..00000000 --- a/packages/zcli-apps/tests/functional/mocks/single_product_ignore/zcli.apps.config.json +++ /dev/null @@ -1 +0,0 @@ -{"app_id":123456} diff --git a/packages/zcli-apps/tests/functional/package.test.ts b/packages/zcli-apps/tests/functional/package.test.ts index 31a2c4e7..cc933923 100644 --- a/packages/zcli-apps/tests/functional/package.test.ts +++ b/packages/zcli-apps/tests/functional/package.test.ts @@ -1,8 +1,5 @@ import { expect, test } from '@oclif/test' import * as path from 'path' -import * as fs from 'fs' -import * as readline from 'readline' -import * as AdmZip from 'adm-zip' describe('package', function () { const appPath = path.join(__dirname, 'mocks/single_product_app') @@ -19,7 +16,7 @@ describe('package', function () { }) .stdout() .command(['apps:package', appPath]) - .it('should display success message if package is created', ctx => { + .it('should display success message package is created', ctx => { const pkgPath = path.join(path.relative(process.cwd(), appPath), 'tmp', 'app') expect(ctx.stdout).to.contain(`Package created at ${pkgPath}`) }) @@ -39,53 +36,3 @@ describe('package', function () { .catch(err => expect(err.message).to.contain('Error: invalid location')) .it('should display error message if package fails to create') }) - -describe('zcliignore', function () { - const appPath = path.join(__dirname, 'mocks/single_product_ignore') - const tmpPath = path.join(appPath, 'tmp') - - const file = readline.createInterface({ - input: fs.createReadStream(path.join(appPath, '.zcliignore')), - output: process.stdout, - terminal: false - }) - - const ignoreArr: string[] = [] // array that holds each line of the .ignore file - - file.on('line', (line) => { - ignoreArr.push(line) // add to array dynamically - }) - - after(async () => { - fs.readdir(tmpPath, (err, files) => { - if (err) throw err - - for (const file of files) { - fs.unlink(path.join(tmpPath, file), (err) => { - if (err) throw err - }) - } - }) - }) - - test - .env({ - ZENDESK_SUBDOMAIN: 'z3ntest', - ZENDESK_EMAIL: 'admin@z3ntest.com', - ZENDESK_PASSWORD: '123456' // the universal password - }) - .nock('https://z3ntest.zendesk.com', api => { - api - .post('/api/v2/apps/validate') - .reply(200) - }) - .stdout() - .command(['apps:package', appPath]) - .it('should not include certain files as specified in .zcliignore', async () => { - const packagePath = path.join(tmpPath, (fs.readdirSync(tmpPath).find(fn => fn.startsWith('app'))) + '') - const zip = new AdmZip(packagePath) - for (const zipEntry of zip.getEntries()) { - expect(ignoreArr.includes(zipEntry.name)).to.eq(false) - } - }) -}) diff --git a/packages/zcli-core/.DS_Store b/packages/zcli-core/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..4d976ee110aa26675810a6ce7f486bda7652bd04 GIT binary patch literal 6148 zcmeHK%}&BV5Z)Ek1!Lr3BFDXW;{d2|GHDPG-b`xrpaxn?qzSf!78}KyzJ|V$PvGk~ zv%57CIe0QgW|G}+W@l!%^CjIM#u)ERy#`|y#+ZPH$Wd7!IK0rcVuBGl&Jm5>QRss8 z=8lc;uLFL2fkkY>ZrtSS_mBK2uGioBN};&Awk||jlsC)Q_ApHB*omi6$C+HBb?U@J z*XURnIm~_Hv;6-X4TRVg(iBhjpoy}U! zR!tr>TWL+s+Urk}ZQdynQru?7+j~rxHNH=!Azr0XI!le^O%+M#|u}h!?;x8j9VJ1CkBXt zc?JsFtl;^748P36NB(>YS;PP_@Xr|F#jf4$KvCvw{Z<~HwGvt%8Vbf`sDOYzcL@Lk h_mQe{YQIDs;w*!iMw|u5RXQMD1Qa3E5d*)#zz0HLPu>6k literal 0 HcmV?d00001 diff --git a/packages/zcli-core/src/.DS_Store b/packages/zcli-core/src/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0