Skip to content

Commit

Permalink
Merge pull request #3 from fluent-ci-templates/chore/default-exports
Browse files Browse the repository at this point in the history
update default exports
  • Loading branch information
tsirysndr authored Sep 15, 2023
2 parents 0f53ff9 + 7617c6f commit b553cf7
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 13 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,8 @@ dagger run fluentci .
You can also use this pipeline programmatically:

```ts
import Client, { connect } from "https://sdk.fluentci.io/v0.1.4/mod.ts";
import { Dagger } from "https://pkg.fluentci.io/terraform_pipeline/mod.ts";

const { init, validate, plan, apply } = Dagger;
import Client, { connect } from "https://sdk.fluentci.io/v0.1.7/mod.ts";
import { init, validate, plan, apply } from "https://pkg.fluentci.io/terraform_pipeline@v0.3.0/mod.ts";

function pipeline(src = ".") {
connect(async (client: Client) => {
Expand Down
10 changes: 9 additions & 1 deletion deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion import_map.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"imports": {
"@fluentci.io/dagger": "https://sdk.fluentci.io/v0.1.4/mod.ts",
"@fluentci.io/dagger": "https://sdk.fluentci.io/v0.1.7/mod.ts",
"@dagger.io/dagger": "https://esm.sh/v128/*@dagger.io/dagger@0.8.4",
"graphql-tag": "https://esm.sh/v128/graphql-tag@2.12.6",
"graphql-request": "https://esm.sh/v128/graphql-request@6.1.0",
Expand Down
4 changes: 1 addition & 3 deletions mod.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
import * as Dagger from "./src/dagger/index.ts";

export { Dagger };
export * from "./src/dagger/index.ts";
2 changes: 1 addition & 1 deletion src/dagger/jobs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export enum Job {
apply = "apply",
}

const exclude = [".terraform", ".git", ".fluentci", "plan"];
export const exclude = [".terraform", ".git", ".fluentci", "plan"];

const envs = filterObjectByPrefix(Deno.env.toObject(), ["TF_", "AWS_"]);

Expand Down
9 changes: 6 additions & 3 deletions src/dagger/pipeline.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import Client, { connect } from "@fluentci.io/dagger";
import Client, { connect, uploadContext } from "@fluentci.io/dagger";
import * as jobs from "./jobs.ts";

const { init, validate, plan, runnableJobs } = jobs;
const { init, validate, plan, runnableJobs, exclude } = jobs;

export default function pipeline(_src = ".", args: string[] = []) {
export default async function pipeline(src = ".", args: string[] = []) {
if (Deno.env.has("FLUENTCI_SESSION_ID")) {
await uploadContext(src, exclude);
}
connect(async (client: Client) => {
if (args.length > 0) {
await runSpecificJobs(client, args as jobs.Job[]);
Expand Down

0 comments on commit b553cf7

Please sign in to comment.