-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
236 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/bower_components/ | ||
/node_modules/ | ||
/.pulp-cache/ | ||
/output/ | ||
/generated-docs/ | ||
/.psc-package/ | ||
/.psc* | ||
/.purs* | ||
/.psa* | ||
/.spago |
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 @@ | ||
@jsr:registry=https://npm.jsr.io |
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,15 @@ | ||
# demo-dagger | ||
|
||
To install dependencies: | ||
|
||
```bash | ||
bun install | ||
``` | ||
|
||
To run: | ||
|
||
```bash | ||
dagger run bun run index.ts | ||
``` | ||
|
||
This project was created using `bun init` in bun v1.1.22. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. |
Binary file not shown.
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,3 @@ | ||
import { main } from "./output/Main"; | ||
|
||
main(); |
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,14 @@ | ||
{ | ||
"name": "demo-dagger", | ||
"module": "index.ts", | ||
"type": "module", | ||
"devDependencies": { | ||
"@types/bun": "latest" | ||
}, | ||
"peerDependencies": { | ||
"typescript": "^5.0.0" | ||
}, | ||
"dependencies": { | ||
"@fluentci/sdk": "npm:@jsr/fluentci__sdk" | ||
} | ||
} |
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,117 @@ | ||
{- | ||
Welcome to your new Dhall package-set! | ||
Below are instructions for how to edit this file for most use | ||
cases, so that you don't need to know Dhall to use it. | ||
## Use Cases | ||
Most will want to do one or both of these options: | ||
1. Override/Patch a package's dependency | ||
2. Add a package not already in the default package set | ||
This file will continue to work whether you use one or both options. | ||
Instructions for each option are explained below. | ||
### Overriding/Patching a package | ||
Purpose: | ||
- Change a package's dependency to a newer/older release than the | ||
default package set's release | ||
- Use your own modified version of some dependency that may | ||
include new API, changed API, removed API by | ||
using your custom git repo of the library rather than | ||
the package set's repo | ||
Syntax: | ||
where `entityName` is one of the following: | ||
- dependencies | ||
- repo | ||
- version | ||
------------------------------- | ||
let upstream = -- | ||
in upstream | ||
with packageName.entityName = "new value" | ||
------------------------------- | ||
Example: | ||
------------------------------- | ||
let upstream = -- | ||
in upstream | ||
with halogen.version = "master" | ||
with halogen.repo = "https://example.com/path/to/git/repo.git" | ||
with halogen-vdom.version = "v4.0.0" | ||
with halogen-vdom.dependencies = [ "extra-dependency" ] # halogen-vdom.dependencies | ||
------------------------------- | ||
### Additions | ||
Purpose: | ||
- Add packages that aren't already included in the default package set | ||
Syntax: | ||
where `<version>` is: | ||
- a tag (i.e. "v4.0.0") | ||
- a branch (i.e. "master") | ||
- commit hash (i.e. "701f3e44aafb1a6459281714858fadf2c4c2a977") | ||
------------------------------- | ||
let upstream = -- | ||
in upstream | ||
with new-package-name = | ||
{ dependencies = | ||
[ "dependency1" | ||
, "dependency2" | ||
] | ||
, repo = | ||
"https://example.com/path/to/git/repo.git" | ||
, version = | ||
"<version>" | ||
} | ||
------------------------------- | ||
Example: | ||
------------------------------- | ||
let upstream = -- | ||
in upstream | ||
with benchotron = | ||
{ dependencies = | ||
[ "arrays" | ||
, "exists" | ||
, "profunctor" | ||
, "strings" | ||
, "quickcheck" | ||
, "lcg" | ||
, "transformers" | ||
, "foldable-traversable" | ||
, "exceptions" | ||
, "node-fs" | ||
, "node-buffer" | ||
, "node-readline" | ||
, "datetime" | ||
, "now" | ||
] | ||
, repo = | ||
"https://github.com/hdgarrood/purescript-benchotron.git" | ||
, version = | ||
"v7.0.0" | ||
} | ||
------------------------------- | ||
-} | ||
let upstream = | ||
https://github.com/purescript/package-sets/releases/download/psc-0.15.15-20240815/packages.dhall | ||
sha256:24a8c447cfcc2a98c6e5c6988e10d3be1d4829afe4e09b44923dd9228e44ad0f | ||
|
||
in upstream | ||
with fluentci = | ||
{ dependencies = | ||
[ "aff" | ||
, "console" | ||
, "effect" | ||
, "prelude" | ||
] | ||
, repo = | ||
"https://github.com/fluentci-io/purescript-fluentci.git" | ||
, version = | ||
"22961269c542b67d8c442829fdba816ef65e1da5" | ||
} |
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,17 @@ | ||
{- | ||
Welcome to a Spago project! | ||
You can edit this file as you like. | ||
Need help? See the following resources: | ||
- Spago documentation: https://github.com/purescript/spago | ||
- Dhall language tour: https://docs.dhall-lang.org/tutorials/Language-Tour.html | ||
When creating a new Spago project, you can use | ||
`spago init --no-comments` or `spago init -C` | ||
to generate this file without the comments in this block. | ||
-} | ||
{ name = "my-project" | ||
, dependencies = [ "aff", "console", "effect", "prelude", "fluentci" ] | ||
, packages = ./packages.dhall | ||
, sources = [ "src/**/*.purs", "test/**/*.purs" ] | ||
} |
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,21 @@ | ||
module Main where | ||
|
||
import Prelude | ||
|
||
import Dagger.Class (id) | ||
import Dagger.Client (container, dag) | ||
import Dagger.Container (from, stdout, withExec) | ||
import Effect (Effect) | ||
import Effect.Aff (launchAff_) | ||
import Effect.Class (liftEffect) | ||
import Effect.Class.Console (log) | ||
|
||
main :: Effect Unit | ||
main = launchAff_ do | ||
hello <- liftEffect $ do | ||
c <- container dag | ||
c1 <- from c "alpine:latest" | ||
withExec c1 ["echo", "Hello from Dagger!"] | ||
|
||
stdout hello >>= log | ||
id hello >>= log |
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,11 @@ | ||
module Test.Main where | ||
|
||
import Prelude | ||
|
||
import Effect (Effect) | ||
import Effect.Class.Console (log) | ||
|
||
main :: Effect Unit | ||
main = do | ||
log "🍝" | ||
log "You should add some tests." |
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,27 @@ | ||
{ | ||
"compilerOptions": { | ||
// Enable latest features | ||
"lib": ["ESNext", "DOM"], | ||
"target": "ESNext", | ||
"module": "ESNext", | ||
"moduleDetection": "force", | ||
"jsx": "react-jsx", | ||
"allowJs": true, | ||
|
||
// Bundler mode | ||
"moduleResolution": "bundler", | ||
"allowImportingTsExtensions": true, | ||
"verbatimModuleSyntax": true, | ||
"noEmit": true, | ||
|
||
// Best practices | ||
"strict": true, | ||
"skipLibCheck": true, | ||
"noFallthroughCasesInSwitch": true, | ||
|
||
// Some stricter flags (disabled by default) | ||
"noUnusedLocals": false, | ||
"noUnusedParameters": false, | ||
"noPropertyAccessFromIndexSignature": false | ||
} | ||
} |