-
-
Notifications
You must be signed in to change notification settings - Fork 322
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added cwex package for manifest version 3 extensions
- Loading branch information
Showing
45 changed files
with
2,404 additions
and
485 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ out/ | |
*.nex | ||
extension-builds/ | ||
coverage | ||
.coverage/ | ||
|
||
dist | ||
build | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
include: | ||
- packages/altair-app/dist/* | ||
- chrome-ext-files/* | ||
exclude: | ||
- dist\/stats\.json | ||
- dist\/assets\/img\/readme | ||
outDir: extension-builds | ||
outFile: build.zip | ||
beforeCompile: bin/ext-update-index.js | ||
manifestOptions: | ||
name: Altair GraphQL Client | ||
short_name: Altair | ||
description: A beautiful feature-rich GraphQL client for all platforms | ||
version: 6.4.2 | ||
icons: | ||
16: assets/img/altair_logo_128.png | ||
48: assets/img/altair_logo_128.png | ||
128: assets/img/altair_logo_128.png | ||
browser_action: | ||
default_icon: assets/img/altair_logo_128.png | ||
permissions: | ||
- http://*/ | ||
- https://*/ | ||
- tabs | ||
- storage | ||
- notifications | ||
# this CSP has been modified to allow unsafe-eval but the CSP in the index.html remains strict. This allows the web worker to have the less strict CSP. | ||
# Note: firefox ignores the CSP if it contains unsafe-inline | ||
content_security_policy: "script-src 'self' 'sha256-765ndVO8s0mJNdlCDVQJVuWyBpugFWusu1COU8BNbI8=' 'sha256-kFTKSG2YSVB69S6DWzferO6LmwbqfHmYBTqvVbPEp4I=' 'unsafe-eval' https://cdn.jsdelivr.net https://apis.google.com https://www.gstatic.com/ https://*.firebaseio.com https://www.googleapis.com localhost:* http://localhost:8002 http://localhost:8080; object-src 'self';" | ||
background: | ||
scripts: | ||
- js/background.js | ||
options_ui: | ||
page: options.html | ||
open_in_tab: false | ||
offline_enabled: true | ||
browser_specific_settings: | ||
gecko: | ||
strict_min_version: '60.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"name": "altair-cwex", | ||
"version": "6.4.2", | ||
"description": "A CLI tool for creating and managing cross-platform browser extensions", | ||
"bin": { | ||
"cwex": "dist/cli.js" | ||
}, | ||
"type": "module", | ||
"main": "dist/index.js", | ||
"license": "MIT", | ||
"private": true, | ||
"dependencies": { | ||
"archiver": "^7.0.1", | ||
"commander": "^12.0.0", | ||
"debug": "^4.3.4", | ||
"find-up": "^7.0.0", | ||
"fs-extra": "^11.2.0", | ||
"globby": "^14.0.1", | ||
"web-ext": "^7.11.0", | ||
"yaml": "^2.4.1" | ||
}, | ||
"devDependencies": { | ||
"@types/archiver": "^6.0.2", | ||
"@types/chrome": "^0.0.266", | ||
"@types/debug": "^4.1.12", | ||
"@types/firefox-webext-browser": "^120.0.3", | ||
"@types/node": "^20.12.7" | ||
}, | ||
"scripts": { | ||
"build": "tsc", | ||
"prepare": "yarn build" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = { | ||
default: { | ||
cmd: { | ||
build: jest.fn(), | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`config getConfig should merge config from config file with default config 1`] = ` | ||
Object { | ||
"beforeCompile": "./new/before-compile.js", | ||
"exclude": Array [ | ||
"new.exclude.pattern", | ||
], | ||
"include": Array [ | ||
"file1", | ||
"file2", | ||
], | ||
"manifestOptions": Object { | ||
"name": "New test", | ||
}, | ||
"outDir": "out", | ||
"rootDir": "./new/root", | ||
"targets": Array [ | ||
"new-target1", | ||
"new-target2", | ||
], | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// import commander from 'commander'; | ||
// import { buildProject } from './index'; | ||
|
||
// jest.mock('./index'); | ||
// jest.mock('commander', () => { | ||
|
||
// const commandInstance = {} as any; | ||
// const commandInstanceMethod = jest.fn(() => commandInstance); | ||
// commandInstance.command = commandInstanceMethod; | ||
// commandInstance.description = commandInstanceMethod; | ||
// commandInstance.option = commandInstanceMethod; | ||
// commandInstance.action = jest.fn(cb => cb({}) || commandInstance); | ||
// commandInstance.parse = commandInstanceMethod; | ||
|
||
// return { | ||
// Command: jest.fn(() => { | ||
// return commandInstance; | ||
// }) | ||
// }; | ||
// }); | ||
|
||
// describe('cli', () => { | ||
// it('executes successfully', () => { | ||
// require('./cli'); | ||
// }); | ||
// }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/usr/bin/env node | ||
|
||
import { Command } from 'commander'; | ||
import { setLogging } from './utils/logger.js'; | ||
|
||
import { buildProject } from './index.js'; | ||
|
||
const program = new Command(); | ||
program | ||
.command('build') | ||
.description('builds extensions') | ||
.option('-c, --config <config path>', 'specify the config file') | ||
.option('--debug', 'show debugging information') | ||
.action((cmd) => { | ||
setLogging(cmd.debug); | ||
return buildProject({ | ||
configPath: cmd.config, | ||
}); | ||
}); | ||
program.parse(process.argv); | ||
|
||
export default program; | ||
|
||
// build project | ||
// Compile assets: | ||
/* | ||
out/ | ||
chrome-extension/ | ||
includes** | ||
manifest.json | ||
mozilla-extension/ | ||
includes** | ||
manifest.json | ||
*/ |
Oops, something went wrong.