From d77e355f98747c90891102491115d4ec2f1a0186 Mon Sep 17 00:00:00 2001 From: Tsiry Sandratraina Date: Fri, 1 Dec 2023 18:01:58 +0000 Subject: [PATCH] remove GraphQL, use jsdocs for exported functions --- deno.lock | 90 +++++++++++++-------------- deps.ts | 9 --- gen/nexus.ts | 135 ----------------------------------------- mod.ts | 2 - schema.graphql | 7 --- src/dagger/jobs.ts | 29 +++++---- src/dagger/pipeline.ts | 4 +- src/dagger/queries.ts | 7 --- src/dagger/schema.ts | 39 ------------ 9 files changed, 63 insertions(+), 259 deletions(-) delete mode 100644 gen/nexus.ts delete mode 100644 schema.graphql delete mode 100644 src/dagger/queries.ts delete mode 100644 src/dagger/schema.ts diff --git a/deno.lock b/deno.lock index 9bddc42..43965f7 100644 --- a/deno.lock +++ b/deno.lock @@ -196,10 +196,10 @@ "https://deno.land/x/zod@v3.22.1/locales/en.ts": "a7a25cd23563ccb5e0eed214d9b31846305ddbcdb9c5c8f508b108943366ab4c", "https://deno.land/x/zod@v3.22.1/mod.ts": "64e55237cb4410e17d968cd08975566059f27638ebb0b86048031b987ba251c4", "https://deno.land/x/zod@v3.22.1/types.ts": "4edc1823385f446532c8c9f676d84550c6dc54b17135e34508576647d9612d0e", - "https://esm.sh/@dagger.io/dagger@0.9.3": "f95136f15787d9ccebca6bfb65f90c20ea99bc049eecf1e97a7a93ab1aee68cd", - "https://esm.sh/graphql-tag@2.12.6": "ccc89a9ceaca1c90a0a6a6f5a16a7f27ddcb775694d54d6d2bebf21c4ca0390c", - "https://esm.sh/nanoid@4.0.2": "c07546eb2eb7ad25443674c93290550bf717c9c4082493df7493ba01f206abe4", - "https://esm.sh/stringify-tree@1.1.1": "12f69388b35fe7dc950f02a1c70759b83c097f60801f5acc6088fa2b7589a108", + "https://esm.sh/@dagger.io/dagger@0.9.3": "9bd1df6375031727868e2a7aa24e7517d1eba916b49529a412f9a214a0d58992", + "https://esm.sh/graphql-tag@2.12.6": "132ebb1ed959bb4dac146160b0cd0fa678c7b9e6bd04f349bf4cacbfb46d0b53", + "https://esm.sh/nanoid@4.0.2": "eb872595ebf6390181971c3e477d1b0fe7ea8383d9b66ced7d09ac8f9c4cf2c7", + "https://esm.sh/stringify-tree@1.1.1": "bb68a933167b8d80b88481df0beff172fc9b645db0c32fbe7dc2d822f61ebaea", "https://esm.sh/v128/cross-fetch@3.1.8/denonext/cross-fetch.mjs": "8fba9e7c3fbaf0d2168beb63ce0cd21b5bfbfbd77e2fcbf8d957d533a71222f6", "https://esm.sh/v128/graphql-request@6.1.0": "17f00c323eb825811ce14e2b0e88a0c873acb666c382ac963d1edeb03e01f372", "https://esm.sh/v128/graphql-request@6.1.0/denonext/graphql-request.mjs": "0b15f49d44489423ae6f06004725b6d050b6359da4969e6569bd6ad45065bd94", @@ -208,47 +208,47 @@ "https://esm.sh/v128/yaml@2.3.1/denonext/yaml.mjs": "71f677b4bfc69271af9d98db5194e354f9a1863955e208e26d32a9ef78bd89f5", "https://esm.sh/v131/yaml@2.3.1": "1fe2490feb3d9c6d2c71c64dbdbed90acd4164b00628b3c68a311b6731ca38b5", "https://esm.sh/v131/yaml@2.3.1/denonext/yaml.mjs": "71f677b4bfc69271af9d98db5194e354f9a1863955e208e26d32a9ef78bd89f5", - "https://esm.sh/v134/@dagger.io/dagger@0.9.3/denonext/dagger.mjs": "b65dc071629f2548d4272905e30ef78e564653c5e2792ac8313d024a0894222a", - "https://esm.sh/v134/adm-zip@0.5.10/denonext/adm-zip.mjs": "cb72de3ffa08bfed32a38f3f30fa8801ca9abb0af23961cdb95a50cbf3d7d5f8", - "https://esm.sh/v134/chownr@2.0.0/denonext/chownr.mjs": "d7282b2612a9f13c62084c76fc72cdfb20503bccce959178b77b6def14d3ffd2", - "https://esm.sh/v134/cross-fetch@3.1.8/denonext/cross-fetch.mjs": "8fba9e7c3fbaf0d2168beb63ce0cd21b5bfbfbd77e2fcbf8d957d533a71222f6", - "https://esm.sh/v134/cross-spawn@7.0.3/denonext/cross-spawn.mjs": "d40c21770a464edbe15410e12d4423123aaf01ae9f836a1bf4a8507036b3e473", - "https://esm.sh/v134/env-paths@3.0.0/denonext/env-paths.mjs": "77984a05eb16450087f25060a070ed500ec546719d471143e16d976ca73ca956", - "https://esm.sh/v134/execa@8.0.1/denonext/execa.mjs": "278a76b88174ba2aa2f117cc04c4344311710df17bda0bd9e0791efd1884b186", - "https://esm.sh/v134/fs-minipass@2.1.0/denonext/fs-minipass.mjs": "6f650802d6b8c607ec5ebfb63d1dbf90a059b5342829ccd471b0d94a381e451a", - "https://esm.sh/v134/get-stream@8.0.1/denonext/get-stream.mjs": "b8ab640bf2638c1ae704a217b79e0a56e7a1f97bb48bbe40d723d5ea87eb0ecb", - "https://esm.sh/v134/graphql-request@6.1.0/denonext/graphql-request.mjs": "c84659c89223b5594b5ef5bfde8ed0cbc3ff4b3477aa369433e94a12f19d6401", - "https://esm.sh/v134/graphql-tag@2.12.6/denonext/graphql-tag.mjs": "f6dfd75d3e055bb10d3fcc44bcd14c2a9c596b4abbf76a4e63a18b854ecee57b", - "https://esm.sh/v134/graphql@16.8.1/denonext/graphql.mjs": "585b84022623b931e27a7a8134cd24ec50b33ea12fd18b43254527628a0fddac", - "https://esm.sh/v134/human-signals@5.0.0/denonext/human-signals.mjs": "8d8663d92280b1ed15bb1b1a0a79601e17f6b165335e85f94c40e56129542077", - "https://esm.sh/v134/is-stream@3.0.0/denonext/is-stream.mjs": "5c8b65f2fa051c4b18e88bbae11dac8bba9caf57752577d69bcea86d1f05c5b7", - "https://esm.sh/v134/isexe@2.0.0/denonext/isexe.mjs": "4675d9d53a332f096efd344cb1418dbda8e6f2effc8a5c81edd43cdd56636be7", - "https://esm.sh/v134/lodash.flatten@4.4.0/denonext/lodash.flatten.mjs": "8e86ab607deea15cc3c1acfb5eae278ecbc5b80f24167b4e8f4c56df3278cd55", - "https://esm.sh/v134/merge-stream@2.0.0/denonext/merge-stream.mjs": "2c2af22401c294158d6bff659d157e3d2c028c218cc1bd2246534a45a4c03c61", - "https://esm.sh/v134/mimic-fn@4.0.0/denonext/mimic-fn.mjs": "10bcf0f2f20cbbba0c289ef7bf4d2422639bbc1c36c247be876afd6fe2d67138", - "https://esm.sh/v134/minipass@3.3.6/denonext/minipass.mjs": "195894c7a7f1fb71de48b4a41af182cd3ad0e357cadc0ad9d8b5340cda895cc0", - "https://esm.sh/v134/minipass@5.0.0/denonext/minipass.mjs": "de0e049728f8c387b58c86439eb9d69a16b6a88756a6bc694e2fecbd7fd00401", - "https://esm.sh/v134/minizlib@2.1.2/denonext/minizlib.mjs": "8a77f339dd275b82703366164dfbcd9c0089896a3ac5fe11e248e28348f4fcf9", - "https://esm.sh/v134/mkdirp@1.0.4/denonext/mkdirp.mjs": "66f5bf329f183d39374fe923604cdeab7981634cea4354a7983c61003dbd4d29", - "https://esm.sh/v134/nanoid@4.0.2/denonext/nanoid.mjs": "4f26e89bc0867e6a838069435b3d75af305017d87ce5b51c9d6edc680954b52f", - "https://esm.sh/v134/node-color-log@10.0.2/denonext/node-color-log.mjs": "2504391bd0ce1dd4c2bf0ed0b839b8a3ad84c028d9dd17cc58dccd2e14dacfde", - "https://esm.sh/v134/node_fetch.js": "b11355358cf61343a3c30bd5942df60a3586d13e2c979b515164bfe851662798", - "https://esm.sh/v134/npm-run-path@5.1.0/denonext/npm-run-path.mjs": "f2a2940a856720c07e3b7ecc24271f5f54b4cf733085269ba2ac5ed603f7b671", - "https://esm.sh/v134/onetime@6.0.0/denonext/onetime.mjs": "1aeb698de7b5a7adecd6916696dcdd26e5ae76305433c72840b2c7a3c0562e33", - "https://esm.sh/v134/original-fs@1.2.0/denonext/original-fs.mjs": "2b1098818e54d2c6748ff5b0dd9ea5f6a61b4b6d0f63fb625f21773d11cfc667", - "https://esm.sh/v134/path-key@3.1.1/denonext/path-key.mjs": "add83c631278b7df9b33ae84e41142db88bb291295bcc27eb4e77a1cbdfa71d0", - "https://esm.sh/v134/path-key@4.0.0/denonext/path-key.mjs": "2c2e3922bd0e6e414fa2752ff800bdc6b9208035ce797fa22e49b859f8259417", - "https://esm.sh/v134/shebang-command@2.0.0/denonext/shebang-command.mjs": "f7ec13a30db7b40ebf26cce54ebaa9dd8ab0f0aea86ee3393f14eed7e0478e6f", - "https://esm.sh/v134/shebang-regex@3.0.0/denonext/shebang-regex.mjs": "03983ba59dd2cba9402935e21b46d05f5249364cba9f5757aef23c6c2fea65b9", - "https://esm.sh/v134/signal-exit@4.1.0/denonext/signal-exit.mjs": "c450b9024df3b59ded71e7b52aada1ac4b3856aad93e9d64bbc6ea3cdd181824", - "https://esm.sh/v134/stringify-tree@1.1.1/denonext/stringify-tree.mjs": "bc1b80ea933554c779decb74d4e3fddcaeabf03cd40089a0e116ef990ef6dd9a", - "https://esm.sh/v134/strip-final-newline@3.0.0/denonext/strip-final-newline.mjs": "03d9be4e8a249d63cbbddeb2fb675a1bbbcb335283e604d4ce56c88c90e6f102", - "https://esm.sh/v134/tar@6.2.0/denonext/tar.mjs": "8f60795202fb96f8b3965583a93aad7f34de186fa40447dce2ccdde2fbde8f8a", - "https://esm.sh/v134/tslib@2.6.2/denonext/tslib.mjs": "29782bcd3139f77ec063dc5a9385c0fff4a8d0a23b6765c73d9edeb169a04bf1", - "https://esm.sh/v134/which@2.0.2/denonext/which.mjs": "fcef5b237d348d13461fe8b8f488d49dc98065bb4c77e184336c755ab6a26da0", - "https://esm.sh/v134/yallist@4.0.0/denonext/yallist.mjs": "61f180d807dda50bac17028eda05d5722a3fecef6e98a9064e2353ea6864fd82", - "https://esm.sh/v134/yaml@2.3.1/denonext/yaml.mjs": "71f677b4bfc69271af9d98db5194e354f9a1863955e208e26d32a9ef78bd89f5", - "https://esm.sh/yaml@v2.3.1": "9689357882f365e29af1f7b2015cd08c7e01fe5d0a8363132216b6b9b905a337", + "https://esm.sh/v135/@dagger.io/dagger@0.9.3/denonext/dagger.mjs": "998e8e63729621141c0a9b74128db8f81ab7446d1a5d4ff41a6a6b0944db4ddf", + "https://esm.sh/v135/adm-zip@0.5.10/denonext/adm-zip.mjs": "9441de5c60a276046d55945f45775d674a319e8e5fd3a8ab7131d8d192d9abb3", + "https://esm.sh/v135/chownr@2.0.0/denonext/chownr.mjs": "d7282b2612a9f13c62084c76fc72cdfb20503bccce959178b77b6def14d3ffd2", + "https://esm.sh/v135/cross-fetch@3.1.8/denonext/cross-fetch.mjs": "8fba9e7c3fbaf0d2168beb63ce0cd21b5bfbfbd77e2fcbf8d957d533a71222f6", + "https://esm.sh/v135/cross-spawn@7.0.3/denonext/cross-spawn.mjs": "4d5a257de3627fb09c512b23fed30f1b393e29a2c13f8325e89720b8ca6673c1", + "https://esm.sh/v135/env-paths@3.0.0/denonext/env-paths.mjs": "77984a05eb16450087f25060a070ed500ec546719d471143e16d976ca73ca956", + "https://esm.sh/v135/execa@8.0.1/denonext/execa.mjs": "cfcca6be54deae22c8d7c4d8be8df397a9506a54d9af9171519b9eea8daea9a5", + "https://esm.sh/v135/fs-minipass@2.1.0/denonext/fs-minipass.mjs": "4b5b69251541833f5a1035be0e98d46bd6d02843fd7d40720577baf6caca21ce", + "https://esm.sh/v135/get-stream@8.0.1/denonext/get-stream.mjs": "b8ab640bf2638c1ae704a217b79e0a56e7a1f97bb48bbe40d723d5ea87eb0ecb", + "https://esm.sh/v135/graphql-request@6.1.0/denonext/graphql-request.mjs": "c97af0ff1802c36ae6fdf544153140ef4d950bf164f0e5e839e71aa599ea1555", + "https://esm.sh/v135/graphql-tag@2.12.6/denonext/graphql-tag.mjs": "ebaceefc216cba74424ddc55fde9e677f6e5a3e9d556a250faa1b53483574f03", + "https://esm.sh/v135/graphql@16.8.1/denonext/graphql.mjs": "585b84022623b931e27a7a8134cd24ec50b33ea12fd18b43254527628a0fddac", + "https://esm.sh/v135/human-signals@5.0.0/denonext/human-signals.mjs": "ab3130133ac5943273c909d7887e3c16b8374f66d72c38caeea2c44d659af023", + "https://esm.sh/v135/is-stream@3.0.0/denonext/is-stream.mjs": "5c8b65f2fa051c4b18e88bbae11dac8bba9caf57752577d69bcea86d1f05c5b7", + "https://esm.sh/v135/isexe@2.0.0/denonext/isexe.mjs": "4675d9d53a332f096efd344cb1418dbda8e6f2effc8a5c81edd43cdd56636be7", + "https://esm.sh/v135/lodash.flatten@4.4.0/denonext/lodash.flatten.mjs": "8e86ab607deea15cc3c1acfb5eae278ecbc5b80f24167b4e8f4c56df3278cd55", + "https://esm.sh/v135/merge-stream@2.0.0/denonext/merge-stream.mjs": "2c2af22401c294158d6bff659d157e3d2c028c218cc1bd2246534a45a4c03c61", + "https://esm.sh/v135/mimic-fn@4.0.0/denonext/mimic-fn.mjs": "10bcf0f2f20cbbba0c289ef7bf4d2422639bbc1c36c247be876afd6fe2d67138", + "https://esm.sh/v135/minipass@3.3.6/denonext/minipass.mjs": "195894c7a7f1fb71de48b4a41af182cd3ad0e357cadc0ad9d8b5340cda895cc0", + "https://esm.sh/v135/minipass@5.0.0/denonext/minipass.mjs": "de0e049728f8c387b58c86439eb9d69a16b6a88756a6bc694e2fecbd7fd00401", + "https://esm.sh/v135/minizlib@2.1.2/denonext/minizlib.mjs": "67abb7d83dacd0de153cce5d03ee3bfd68988c992306ff843370b68f038b43e0", + "https://esm.sh/v135/mkdirp@1.0.4/denonext/mkdirp.mjs": "41bc43ec9478e772660e2b0edf998f27f0158388c94003b7292d8093e699eb7b", + "https://esm.sh/v135/nanoid@4.0.2/denonext/nanoid.mjs": "4f26e89bc0867e6a838069435b3d75af305017d87ce5b51c9d6edc680954b52f", + "https://esm.sh/v135/node-color-log@10.0.2/denonext/node-color-log.mjs": "2504391bd0ce1dd4c2bf0ed0b839b8a3ad84c028d9dd17cc58dccd2e14dacfde", + "https://esm.sh/v135/node_fetch.js": "b11355358cf61343a3c30bd5942df60a3586d13e2c979b515164bfe851662798", + "https://esm.sh/v135/npm-run-path@5.1.0/denonext/npm-run-path.mjs": "4772cda227b5c18f4293db7edf53998879c75d48e776533009ce1a8daa464bf5", + "https://esm.sh/v135/onetime@6.0.0/denonext/onetime.mjs": "5326fe5207b076a7ebc96740b4c3dcec7a2522a1aa5985e3b4157c1b9cb1e2dd", + "https://esm.sh/v135/original-fs@1.2.0/denonext/original-fs.mjs": "2b1098818e54d2c6748ff5b0dd9ea5f6a61b4b6d0f63fb625f21773d11cfc667", + "https://esm.sh/v135/path-key@3.1.1/denonext/path-key.mjs": "add83c631278b7df9b33ae84e41142db88bb291295bcc27eb4e77a1cbdfa71d0", + "https://esm.sh/v135/path-key@4.0.0/denonext/path-key.mjs": "2c2e3922bd0e6e414fa2752ff800bdc6b9208035ce797fa22e49b859f8259417", + "https://esm.sh/v135/shebang-command@2.0.0/denonext/shebang-command.mjs": "245674cc2dffa2d06fcef0540b81040b626227485e5f41d76e77d386b30b18e0", + "https://esm.sh/v135/shebang-regex@3.0.0/denonext/shebang-regex.mjs": "03983ba59dd2cba9402935e21b46d05f5249364cba9f5757aef23c6c2fea65b9", + "https://esm.sh/v135/signal-exit@4.1.0/denonext/signal-exit.mjs": "c450b9024df3b59ded71e7b52aada1ac4b3856aad93e9d64bbc6ea3cdd181824", + "https://esm.sh/v135/stringify-tree@1.1.1/denonext/stringify-tree.mjs": "6cacda15ffe7dc2e1343636549956877e1bd830be5bd56587f40f94ca7becda4", + "https://esm.sh/v135/strip-final-newline@3.0.0/denonext/strip-final-newline.mjs": "139c0958b1fb9387d8ae5b95941682245a3f3d9ae531f5de9638c2e9109831e0", + "https://esm.sh/v135/tar@6.2.0/denonext/tar.mjs": "e13b56d41286f4935cb29acae60a040148af6e2649326a70e04c5ca6fe5ef04d", + "https://esm.sh/v135/tslib@2.6.2/denonext/tslib.mjs": "29782bcd3139f77ec063dc5a9385c0fff4a8d0a23b6765c73d9edeb169a04bf1", + "https://esm.sh/v135/which@2.0.2/denonext/which.mjs": "360f7d0aa13233975c86f120e2b1aa9695252b16e287ccdc651d3123473a3482", + "https://esm.sh/v135/yallist@4.0.0/denonext/yallist.mjs": "61f180d807dda50bac17028eda05d5722a3fecef6e98a9064e2353ea6864fd82", + "https://esm.sh/v135/yaml@2.3.1/denonext/yaml.mjs": "71f677b4bfc69271af9d98db5194e354f9a1863955e208e26d32a9ef78bd89f5", + "https://esm.sh/yaml@v2.3.1": "0b42df3dec58b0999df5639390c02346de67b8dae76717a156189855fb616858", "https://nix.fluentci.io/v0.5.3/deps.ts": "469c1f084eda8d2ee78135b0bf4f9490b80b36d8d0bdb88594167133a918da8e", "https://nix.fluentci.io/v0.5.3/src/dagger/steps.ts": "b766f4fa9624a032e7af884a5ca47bc666a529c4a472d38b74b55ca0d63cf81d", "https://sdk.fluentci.io/v0.3.0/deps.ts": "3a145e76b4345a9a7888f09b1b48cb54523ebfa43247a1abebc40a9e82d555f4", diff --git a/deps.ts b/deps.ts index dd84efb..7c4bcee 100644 --- a/deps.ts +++ b/deps.ts @@ -10,15 +10,6 @@ export { withDevbox } from "https://nix.fluentci.io/v0.5.3/src/dagger/steps.ts"; export { stringifyTree } from "https://esm.sh/stringify-tree@1.1.1"; import gql from "https://esm.sh/graphql-tag@2.12.6"; export { gql }; -export { - arg, - queryType, - stringArg, - booleanArg, - intArg, - nonNull, - makeSchema, -} from "npm:nexus"; export { dirname, join, diff --git a/gen/nexus.ts b/gen/nexus.ts deleted file mode 100644 index e0e20d7..0000000 --- a/gen/nexus.ts +++ /dev/null @@ -1,135 +0,0 @@ -/** - * This file was generated by Nexus Schema - * Do not make changes to this file directly - */ - - - - - - - -declare global { - interface NexusGen extends NexusGenTypes {} -} - -export interface NexusGenInputs { -} - -export interface NexusGenEnums { -} - -export interface NexusGenScalars { - String: string - Int: number - Float: number - Boolean: boolean - ID: string -} - -export interface NexusGenObjects { - Query: {}; -} - -export interface NexusGenInterfaces { -} - -export interface NexusGenUnions { -} - -export type NexusGenRootTypes = NexusGenObjects - -export type NexusGenAllTypes = NexusGenRootTypes & NexusGenScalars - -export interface NexusGenFieldTypes { - Query: { // field return type - upload: string | null; // String - } -} - -export interface NexusGenFieldTypeNames { - Query: { // field return type name - upload: 'String' - } -} - -export interface NexusGenArgTypes { - Query: { - upload: { // args - src?: string | null; // String - token: string; // String! - } - } -} - -export interface NexusGenAbstractTypeMembers { -} - -export interface NexusGenTypeInterfaces { -} - -export type NexusGenObjectNames = keyof NexusGenObjects; - -export type NexusGenInputNames = never; - -export type NexusGenEnumNames = never; - -export type NexusGenInterfaceNames = never; - -export type NexusGenScalarNames = keyof NexusGenScalars; - -export type NexusGenUnionNames = never; - -export type NexusGenObjectsUsingAbstractStrategyIsTypeOf = never; - -export type NexusGenAbstractsUsingStrategyResolveType = never; - -export type NexusGenFeaturesConfig = { - abstractTypeStrategies: { - isTypeOf: false - resolveType: true - __typename: false - } -} - -export interface NexusGenTypes { - context: any; - inputTypes: NexusGenInputs; - rootTypes: NexusGenRootTypes; - inputTypeShapes: NexusGenInputs & NexusGenEnums & NexusGenScalars; - argTypes: NexusGenArgTypes; - fieldTypes: NexusGenFieldTypes; - fieldTypeNames: NexusGenFieldTypeNames; - allTypes: NexusGenAllTypes; - typeInterfaces: NexusGenTypeInterfaces; - objectNames: NexusGenObjectNames; - inputNames: NexusGenInputNames; - enumNames: NexusGenEnumNames; - interfaceNames: NexusGenInterfaceNames; - scalarNames: NexusGenScalarNames; - unionNames: NexusGenUnionNames; - allInputTypes: NexusGenTypes['inputNames'] | NexusGenTypes['enumNames'] | NexusGenTypes['scalarNames']; - allOutputTypes: NexusGenTypes['objectNames'] | NexusGenTypes['enumNames'] | NexusGenTypes['unionNames'] | NexusGenTypes['interfaceNames'] | NexusGenTypes['scalarNames']; - allNamedTypes: NexusGenTypes['allInputTypes'] | NexusGenTypes['allOutputTypes'] - abstractTypes: NexusGenTypes['interfaceNames'] | NexusGenTypes['unionNames']; - abstractTypeMembers: NexusGenAbstractTypeMembers; - objectsUsingAbstractStrategyIsTypeOf: NexusGenObjectsUsingAbstractStrategyIsTypeOf; - abstractsUsingStrategyResolveType: NexusGenAbstractsUsingStrategyResolveType; - features: NexusGenFeaturesConfig; -} - - -declare global { - interface NexusGenPluginTypeConfig { - } - interface NexusGenPluginInputTypeConfig { - } - interface NexusGenPluginFieldConfig { - } - interface NexusGenPluginInputFieldConfig { - } - interface NexusGenPluginSchemaConfig { - } - interface NexusGenPluginArgConfig { - } -} \ No newline at end of file diff --git a/mod.ts b/mod.ts index 52470dd..fbc1f17 100644 --- a/mod.ts +++ b/mod.ts @@ -1,3 +1 @@ export * from "./src/dagger/index.ts"; -export * as queries from "./src/dagger/queries.ts"; -export { schema } from "./src/dagger/schema.ts"; diff --git a/schema.graphql b/schema.graphql deleted file mode 100644 index d96a710..0000000 --- a/schema.graphql +++ /dev/null @@ -1,7 +0,0 @@ -### This file was generated by Nexus Schema -### Do not make changes to this file directly - - -type Query { - upload(src: String, token: String!): String -} \ No newline at end of file diff --git a/src/dagger/jobs.ts b/src/dagger/jobs.ts index 91754bd..c2325a6 100644 --- a/src/dagger/jobs.ts +++ b/src/dagger/jobs.ts @@ -8,10 +8,17 @@ export enum Job { export const exclude = [".devbox", "node_modules", ".fluentci"]; -export const upload = async ( - src: string | Directory | undefined = ".", - token?: string | Secret -) => { +/** + * @function + * @description Uploads code coverage to Codecov + * @param {string} src + * @param {string} token + * @returns {string} + */ +export async function upload( + src: string | Directory, + token: string | Secret +): Promise { await connect(async (client: Client) => { const context = getDirectory(client, src); const secret = getCodecovToken(client, token); @@ -55,16 +62,12 @@ export const upload = async ( console.log(result); }); return "Codecov upload complete."; -}; +} -export type JobExec = (src?: string) => - | Promise - | (( - src?: string, - options?: { - ignore: string[]; - } - ) => Promise); +export type JobExec = ( + src: string | Directory, + token: string | Secret +) => Promise; export const runnableJobs: Record = { [Job.upload]: upload, diff --git a/src/dagger/pipeline.ts b/src/dagger/pipeline.ts index 5a6007a..9cf034e 100644 --- a/src/dagger/pipeline.ts +++ b/src/dagger/pipeline.ts @@ -12,7 +12,7 @@ export default async function pipeline(src = ".", args: string[] = []) { return; } - await upload(); + await upload(src, Deno.env.get("CODECOV_TOKEN") || ""); } async function runSpecificJobs(args: jobs.Job[]) { @@ -21,6 +21,6 @@ async function runSpecificJobs(args: jobs.Job[]) { if (!job) { throw new Error(`Job ${name} not found`); } - await job(); + await job(".", Deno.env.get("CODECOV_TOKEN") || ""); } } diff --git a/src/dagger/queries.ts b/src/dagger/queries.ts deleted file mode 100644 index e09369b..0000000 --- a/src/dagger/queries.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { gql } from "../../deps.ts"; - -export const upload = gql` - query Upload($src: String, $token: String!) { - upload(src: $src, token: $token) - } -`; diff --git a/src/dagger/schema.ts b/src/dagger/schema.ts deleted file mode 100644 index 70869cc..0000000 --- a/src/dagger/schema.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { - queryType, - makeSchema, - dirname, - join, - resolve, - stringArg, - nonNull, -} from "../../deps.ts"; - -import { upload } from "./jobs.ts"; - -const Query = queryType({ - definition(t) { - t.string("upload", { - args: { - src: stringArg(), - token: nonNull(stringArg()), - }, - resolve: async (_root, args, _ctx) => - await upload(args.src || undefined, args.token), - }); - }, -}); - -const schema = makeSchema({ - types: [Query], - outputs: { - schema: resolve(join(dirname(".."), dirname(".."), "schema.graphql")), - typegen: resolve(join(dirname(".."), dirname(".."), "gen", "nexus.ts")), - }, -}); - -schema.description = JSON.stringify({ - "upload.src": "directory", - "upload.token": "secret", -}); - -export { schema };