Skip to content

feat: add config #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jan 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
/bin
!.vscode
node_modules
lock.json
lock.json
.pspace
26 changes: 26 additions & 0 deletions .graphql/deployments/mutations.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
mutation CreateDeployment($createDeploymentInput: CreateDeploymentInput!) {
createDeployment(input: $createDeploymentInput) {
deployment {
id
}
}
}

mutation UpdateDeployment($updateDeploymentInput: UpdateDeploymentInput!) {
updateDeployment(input: $updateDeploymentInput) {
deployment {
id
}
}
}

mutation DeleteDeploymentMutation(
$deleteDeploymentInput: DeleteDeploymentInput!
) {
deleteDeployment(input: $deleteDeploymentInput) {
deployment {
id
name
}
}
}
187 changes: 187 additions & 0 deletions .graphql/deployments/queries.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
query Deployment(
$deploymentId: UUID!
$first: Int
$after: String
$runOrderBy: DeploymentRunOrder
$instanceOrderBy: DeploymentRunInstanceOrder
) {
deployment(id: $deploymentId) {
id
name
dtCreated
dtModified
deploymentSpecs(first: $first, after: $after) {
nodes {
id
endpointUrl
externalApplied
dtCreated
dtInvalid
error
actor {
avatarUrl
fullName
email
}
cluster {
name
fqdn
}
data {
image
containerRegistry
port
command
env {
name
value
}
models {
id
path
}
repositories {
dataset
mountPath
repositories {
url
name
ref
username
password
}
}
resources {
replicas
autoscaling {
enabled
maxReplicas
metrics {
metric
summary
value
}
}
instanceType
}
}
deploymentRuns(first: $first, orderBy: $runOrderBy) {
nodes {
id
availableReplicas
readyReplicas
replicas
dtDeleted
dtModified
dtCreated
deploymentRunInstances(first: $first, orderBy: $instanceOrderBy) {
nodes {
id
externalApplied
dtStarted
dtFinished
dtDeleted
phase
state
stateMessage
}
}
}
}
}

edges {
cursor
}

pageInfo {
hasNextPage
}
}
}
}

query DeploymentList($projectHandle: String!, $first: Int, $after: String) {
deployments(projectId: $projectHandle, first: $first, after: $after) {
nodes {
id
name
deploymentSpecs(first: 10) {
nodes {
deploymentRuns(first: 10) {
nodes {
id
dtDeleted
availableReplicas
readyReplicas
replicas
deploymentRunInstances(first: 10) {
nodes {
id
externalApplied
dtStarted
dtFinished
phase
state
stateMessage
}
}
}
}
data {
image
containerRegistry
port
command
env {
name
value
}
models {
id
path
}
repositories {
dataset
mountPath
repositories {
url
name
ref
username
password
}
}
resources {
replicas
instanceType
autoscaling {
enabled
maxReplicas
metrics {
metric
summary
value
}
}
}
}
id
externalApplied
dtCreated
dtInvalid
error
}
}
dtCreated
}

edges {
cursor
}

pageInfo {
hasNextPage
}
}
}
6 changes: 5 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{
"recommendations": ["denoland.vscode-deno"]
"recommendations": [
"esbenp.prettier-vscode",
"denoland.vscode-deno",
"GraphQL.vscode-graphql"
]
}
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"deno.inlayHints.functionLikeReturnTypes.enabled": false,
"deno.inlayHints.parameterNames.enabled": "none",
"editor.formatOnSave": true,
"editor.defaultFormatter": "denoland.vscode-deno"
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[typescript]": {
"editor.defaultFormatter": "denoland.vscode-deno"
}
}
20 changes: 15 additions & 5 deletions deno.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,21 @@
"cache": "deno cache --reload --lock=deno.lock --lock-write main.ts",
"check": "deno check --lock=deno.lock main.ts",
"compile": "deno task compile:macos && deno task compile:macos-arm && deno task compile:linux && deno task compile:windows",
"compile:macos": "deno compile --allow-env --allow-sys --allow-net --allow-run --lock=lock.json --target x86_64-apple-darwin --output bin/macos/pspace main.ts",
"compile:macos-arm": "deno compile --allow-env --allow-sys --allow-net --allow-run --lock=lock.json --target aarch64-apple-darwin --output bin/macos-arm/pspace main.ts",
"compile:linux": "deno compile --allow-env --allow-sys --allow-net --allow-run --lock=lock.json --target x86_64-unknown-linux-gnu --output bin/linux/pspace main.ts",
"compile:windows": "deno compile --allow-env --allow-sys --allow-net --allow-run --lock=lock.json --target x86_64-pc-windows-msvc --output bin/windows/pspace main.ts",
"compile:macos": "deno compile --allow-env --allow-read --allow-write --allow-sys --allow-net --allow-run --lock=lock.json --target x86_64-apple-darwin --output bin/macos/pspace main.ts",
"compile:macos-arm": "deno compile --allow-env --allow-read --allow-write --allow-sys --allow-net --allow-run --lock=lock.json --target aarch64-apple-darwin --output bin/macos-arm/pspace main.ts",
"compile:linux": "deno compile --allow-env --allow-read --allow-write --allow-sys --allow-net --allow-run --lock=lock.json --target x86_64-unknown-linux-gnu --output bin/linux/pspace main.ts",
"compile:windows": "deno compile --allow-env --allow-read --allow-write --allow-sys --allow-net --allow-run --lock=lock.json --target x86_64-pc-windows-msvc --output bin/windows/pspace main.ts",
"generate": "cd .graphql && pnpm install && pnpm generate && cd .. && mv .graphql/paperspace-graphql.ts lib && npx replace-in-files-cli --string='@graphql-typed-document-node/core' --replacement='https://esm.sh/@graphql-typed-document-node/[email protected]' lib/paperspace-graphql.ts",
"run": "deno run --allow-env --allow-sys --allow-net --allow-run main.ts"
"run": "deno run --allow-env --allow-sys --allow-read --allow-write --allow-net --allow-run main.ts"
},
"lint": {
"rules": {
"exclude": ["no-explicit-any"]
}
},
"fmt": {
"files": {
"include": ["main.ts", "lib"]
}
}
}
Loading