Skip to content

Commit 8991932

Browse files
authored
chore: Update publish docs (#2)
1 parent 5713ec5 commit 8991932

File tree

5 files changed

+13
-15
lines changed

5 files changed

+13
-15
lines changed

README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,9 @@ This will create db.sql file (a Sqlite database) with a table `Names` and two re
2929

3030
## Building and publishing the plugin
3131

32-
Use the following command to build a container with the plugin:
32+
1. Update the plugin metadata in [src/plugins.ts](src/plugin.ts#L99) to match your team and plugin name.
33+
2. Run `npm run build` to build the plugin.
34+
3. Run `node dist/main.js package -m "Initial release" v0.0.1 .`. `-m` specifies changelog and `v0.0.1` is the version.
35+
4. Run `cloudquery plugin publish -f` to publish the plugin to the CloudQuery registry.
3336

34-
```shell
35-
npm run package:container
36-
```
37-
38-
Check out the [Releasing and Deploying Your Plugin
39-
](https://www.cloudquery.io/docs/developers/creating-new-plugin/javascript-source#releasing-and-deploying-your-plugin) in our documentation to learn more about publishing your own plugin for wider use.
37+
> More about publishing plugins [here](https://docs.cloudquery.io/docs/developers/publishing-an-addon-to-the-hub)

docs/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# JavaScript Source Plugin Template
2+
3+
This is the plugin documentation that will get published to Hub. Read more about publishing at [CloudQuery Docs](https://docs.cloudquery.io/docs/developers/publishing-a-plugin-to-the-hub)

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
"scripts": {
2828
"dev": "ts-node --esm src/main.ts serve",
2929
"build": "rm -rf dist && tsc",
30-
"package:container": "docker build -t cq-js-sample:latest .",
3130
"format": "prettier --write 'src/**/*.ts'",
3231
"format:check": "prettier --check 'src/**/*.ts'",
3332
"lint": "eslint --max-warnings 0 --ext .ts src",

src/plugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,12 @@ export const newSamplePlugin = () => {
8585
spec,
8686
{ noConnection },
8787
) => {
88-
pluginClient.spec = parseSpec(spec);
89-
pluginClient.client = { id: () => "cq-js-sample" };
9088
if (noConnection) {
9189
pluginClient.allTables = [];
9290
return pluginClient;
9391
}
92+
pluginClient.spec = parseSpec(spec);
93+
pluginClient.client = { id: () => "cq-js-sample" };
9494
pluginClient.allTables = await getTables();
9595

9696
return pluginClient;

sync-packaged.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@ kind: source
22
spec:
33
name: "cq-js-sample"
44
registry: "docker"
5-
path: "cq-js-sample:latest"
6-
version: "v1.0.0"
7-
tables:
8-
["*"]
5+
path: "docker.cloudquery.io/cloudquery/source-cq-js-sample:v0.0.1-linux-arm64"
6+
tables: ["*"]
97
destinations:
108
- "sqlite"
119
spec: {}
@@ -16,4 +14,4 @@ spec:
1614
path: cloudquery/sqlite
1715
version: "v2.4.9"
1816
spec:
19-
connection_string: ./db.sql
17+
connection_string: ./db.sql

0 commit comments

Comments
 (0)