graze-client 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/build/dts/GrazeClient.d.ts +153 -0
  2. package/build/dts/GrazeClient.d.ts.map +1 -0
  3. package/build/dts/index.d.ts +17 -0
  4. package/build/dts/index.d.ts.map +1 -0
  5. package/build/dts/schema/UpdateAlgorithmPayload.d.ts +328 -0
  6. package/build/dts/schema/UpdateAlgorithmPayload.d.ts.map +1 -0
  7. package/build/dts/schema/index.d.ts +3 -0
  8. package/build/dts/schema/index.d.ts.map +1 -0
  9. package/build/dts/schema/shared.d.ts +147 -0
  10. package/build/dts/schema/shared.d.ts.map +1 -0
  11. package/build/esm/GrazeClient.js +67 -0
  12. package/build/esm/GrazeClient.js.map +1 -0
  13. package/build/esm/index.js +41 -0
  14. package/build/esm/index.js.map +1 -0
  15. package/build/esm/schema/UpdateAlgorithmPayload.js +101 -0
  16. package/build/esm/schema/UpdateAlgorithmPayload.js.map +1 -0
  17. package/build/esm/schema/index.js +3 -0
  18. package/build/esm/schema/index.js.map +1 -0
  19. package/build/esm/schema/shared.js +63 -0
  20. package/build/esm/schema/shared.js.map +1 -0
  21. package/package.json +14 -9
  22. package/.changeset/config.json +0 -16
  23. package/.github/actions/setup/action.yml +0 -21
  24. package/.github/workflows/check.yml +0 -57
  25. package/.github/workflows/release.yml +0 -34
  26. package/.github/workflows/snapshot.yml +0 -24
  27. package/.vscode/effect.code-snippets +0 -72
  28. package/.vscode/extensions.json +0 -6
  29. package/.vscode/settings.json +0 -5
  30. package/CHANGELOG.md +0 -19
  31. package/eslint.config.mjs +0 -120
  32. package/patches/@changesets__get-github-info@0.6.0.patch +0 -48
  33. package/patches/babel-plugin-annotate-pure-calls@0.4.0.patch +0 -13
  34. package/scratchpad/tsconfig.json +0 -10
  35. package/setupTests.ts +0 -3
  36. package/test/Dummy.test.ts +0 -7
  37. package/vitest.config.ts +0 -17
@@ -1,24 +0,0 @@
1
- name: Snapshot
2
-
3
- on:
4
- pull_request:
5
- branches: [main, next-minor, next-major]
6
- workflow_dispatch:
7
-
8
- permissions: {}
9
-
10
- jobs:
11
- snapshot:
12
- name: Snapshot
13
- if: github.repository_owner == 'Effect-Ts'
14
- runs-on: ubuntu-latest
15
- timeout-minutes: 10
16
- steps:
17
- - uses: actions/checkout@v4
18
- - name: Install dependencies
19
- uses: ./.github/actions/setup
20
- - name: Build package
21
- run: pnpm build
22
- - name: Create snapshot
23
- id: snapshot
24
- run: pnpx pkg-pr-new@0.0.24 publish --pnpm --comment=off
@@ -1,72 +0,0 @@
1
- {
2
- // Place your cadence workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
3
- // description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
4
- // is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
5
- // used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
6
- // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
7
- // Placeholders with the same ids are connected.
8
- // Example:
9
- // "Print to console": {
10
- // "scope": "javascript,typescript",
11
- // "prefix": "log",
12
- // "body": [
13
- // "console.log('$1');",
14
- // "$2"
15
- // ],
16
- // "description": "Log output to console"
17
- // }
18
- "Gen Function $": {
19
- "prefix": "gg",
20
- "body": [
21
- "function* () {\n\t$0\n}"
22
- ],
23
- "description": "Generator function"
24
- },
25
- "Gen Function $ (wrapped)": {
26
- "prefix": "egg",
27
- "body": [
28
- "Effect.gen(function* () {\n\t$0\n})"
29
- ],
30
- "description": "Generator function"
31
- },
32
- "Gen Yield $": {
33
- "prefix": "yy",
34
- "body": [
35
- "yield* $0"
36
- ],
37
- "description": "Yield generator"
38
- },
39
- "Gen Yield $ (const)": {
40
- "prefix": "cyy",
41
- "body": [
42
- "const $1 = yield* $0"
43
- ],
44
- "description": "Yield generator constant"
45
- },
46
- "Tagged Class $": {
47
- "prefix": "etc",
48
- "body": [
49
- "export class $1 extends Context.Tag(\"$1\")<$1,I$1> (){",
50
- "}"
51
- ]
52
- },
53
- "Tagged Error $": {
54
- "prefix": "ete",
55
- "body": [
56
- "export class $1 extends Data.TaggedError(\"$1\")<{",
57
- "\tmessage: string",
58
- "\tcause?: unknown",
59
- "}> {}"
60
- ]
61
- },
62
- "Effect Service $": {
63
- "prefix": "effs",
64
- "body": [
65
- "export class $1 extends Effect.Service<$1>()(\"$1\", {",
66
- "\teffect: Effect.gen(function* () {",
67
- "\t\t$0",
68
- "\t}),",
69
- "}) {}"
70
- ]
71
- },
72
- }
@@ -1,6 +0,0 @@
1
- {
2
- "recommendations": [
3
- "effectful-tech.effect-vscode",
4
- "dbaeumer.vscode-eslint"
5
- ]
6
- }
@@ -1,5 +0,0 @@
1
- {
2
- "typescript.tsdk": "node_modules/typescript/lib",
3
- "editor.defaultFormatter": "esbenp.prettier-vscode",
4
- "editor.formatOnSave": true,
5
- }
package/CHANGELOG.md DELETED
@@ -1,19 +0,0 @@
1
- # graze-client
2
-
3
- ## 0.2.0
4
-
5
- ### Minor Changes
6
-
7
- - f0bdfd5: Build TS code into ESM and .d.ts files
8
-
9
- ## 0.1.1
10
-
11
- ### Patch Changes
12
-
13
- - Readme updates
14
-
15
- ## 0.1.0
16
-
17
- ### Minor Changes
18
-
19
- - Initialize GrazeClient
package/eslint.config.mjs DELETED
@@ -1,120 +0,0 @@
1
- import { fixupPluginRules } from "@eslint/compat"
2
- import { FlatCompat } from "@eslint/eslintrc"
3
- import js from "@eslint/js"
4
- import tsParser from "@typescript-eslint/parser"
5
- import codegen from "eslint-plugin-codegen"
6
- import _import from "eslint-plugin-import"
7
- import simpleImportSort from "eslint-plugin-simple-import-sort"
8
- import sortDestructureKeys from "eslint-plugin-sort-destructure-keys"
9
- import path from "node:path"
10
- import { fileURLToPath } from "node:url"
11
-
12
- const __filename = fileURLToPath(import.meta.url)
13
- const __dirname = path.dirname(__filename)
14
- const compat = new FlatCompat({
15
- baseDirectory: __dirname,
16
- recommendedConfig: js.configs.recommended,
17
- allConfig: js.configs.all
18
- })
19
-
20
- export default [
21
- {
22
- ignores: ["**/dist", "**/build", "**/docs", "**/*.md"]
23
- },
24
- ...compat.extends(
25
- "eslint:recommended",
26
- "plugin:@typescript-eslint/eslint-recommended",
27
- "plugin:@typescript-eslint/recommended",
28
- "plugin:@effect/recommended"
29
- ),
30
- {
31
- plugins: {
32
- import: fixupPluginRules(_import),
33
- "sort-destructure-keys": sortDestructureKeys,
34
- "simple-import-sort": simpleImportSort,
35
- codegen
36
- },
37
-
38
- languageOptions: {
39
- parser: tsParser,
40
- ecmaVersion: 2018,
41
- sourceType: "module"
42
- },
43
-
44
- settings: {
45
- "import/parsers": {
46
- "@typescript-eslint/parser": [".ts", ".tsx"]
47
- },
48
-
49
- "import/resolver": {
50
- typescript: {
51
- alwaysTryTypes: true
52
- }
53
- }
54
- },
55
-
56
- rules: {
57
- "codegen/codegen": "error",
58
- "no-fallthrough": "off",
59
- "no-irregular-whitespace": "off",
60
- "object-shorthand": "error",
61
- "prefer-destructuring": "off",
62
- "sort-imports": "off",
63
-
64
- "no-restricted-syntax": ["error", {
65
- selector: "CallExpression[callee.property.name='push'] > SpreadElement.arguments",
66
- message: "Do not use spread arguments in Array.push"
67
- }],
68
-
69
- "no-unused-vars": "off",
70
- "prefer-rest-params": "off",
71
- "prefer-spread": "off",
72
- "import/first": "error",
73
- "import/newline-after-import": "error",
74
- "import/no-duplicates": "error",
75
- "import/no-unresolved": "off",
76
- "import/order": "off",
77
- "simple-import-sort/imports": "off",
78
- "sort-destructure-keys/sort-destructure-keys": "error",
79
- "deprecation/deprecation": "off",
80
-
81
- "@typescript-eslint/array-type": ["warn", {
82
- default: "generic",
83
- readonly: "generic"
84
- }],
85
-
86
- "@typescript-eslint/member-delimiter-style": 0,
87
- "@typescript-eslint/no-non-null-assertion": "off",
88
- "@typescript-eslint/ban-types": "off",
89
- "@typescript-eslint/no-explicit-any": "off",
90
- "@typescript-eslint/no-empty-interface": "off",
91
- "@typescript-eslint/consistent-type-imports": "warn",
92
-
93
- "@typescript-eslint/no-unused-vars": ["error", {
94
- argsIgnorePattern: "^_",
95
- varsIgnorePattern: "^_"
96
- }],
97
-
98
- "@typescript-eslint/ban-ts-comment": "off",
99
- "@typescript-eslint/camelcase": "off",
100
- "@typescript-eslint/explicit-function-return-type": "off",
101
- "@typescript-eslint/explicit-module-boundary-types": "off",
102
- "@typescript-eslint/interface-name-prefix": "off",
103
- "@typescript-eslint/no-array-constructor": "off",
104
- "@typescript-eslint/no-use-before-define": "off",
105
- "@typescript-eslint/no-namespace": "off",
106
-
107
- "@effect/dprint": ["error", {
108
- config: {
109
- indentWidth: 2,
110
- lineWidth: 120,
111
- semiColons: "asi",
112
- quoteStyle: "alwaysDouble",
113
- trailingCommas: "never",
114
- operatorPosition: "maintain",
115
- "arrowFunction.useParentheses": "force"
116
- }
117
- }]
118
- }
119
- }
120
- ]
@@ -1,48 +0,0 @@
1
- diff --git a/dist/changesets-get-github-info.cjs.js b/dist/changesets-get-github-info.cjs.js
2
- index a74df59f8a5988f458a3476087399f5e6dfe4818..ce5e60ef9916eb0cb76ab1e9dd422abcad752bf6 100644
3
- --- a/dist/changesets-get-github-info.cjs.js
4
- +++ b/dist/changesets-get-github-info.cjs.js
5
- @@ -251,18 +251,13 @@ async function getInfo(request) {
6
- b = new Date(b.mergedAt);
7
- return a > b ? 1 : a < b ? -1 : 0;
8
- })[0] : null;
9
- -
10
- - if (associatedPullRequest) {
11
- - user = associatedPullRequest.author;
12
- - }
13
- -
14
- return {
15
- user: user ? user.login : null,
16
- pull: associatedPullRequest ? associatedPullRequest.number : null,
17
- links: {
18
- commit: `[\`${request.commit.slice(0, 7)}\`](${data.commitUrl})`,
19
- pull: associatedPullRequest ? `[#${associatedPullRequest.number}](${associatedPullRequest.url})` : null,
20
- - user: user ? `[@${user.login}](${user.url})` : null
21
- + user: user ? `@${user.login}` : null
22
- }
23
- };
24
- }
25
- diff --git a/dist/changesets-get-github-info.esm.js b/dist/changesets-get-github-info.esm.js
26
- index 27e5c972ab1202ff16f5124b471f4bbcc46be2b5..3940a8fe86e10cb46d8ff6436dea1103b1839927 100644
27
- --- a/dist/changesets-get-github-info.esm.js
28
- +++ b/dist/changesets-get-github-info.esm.js
29
- @@ -242,18 +242,13 @@ async function getInfo(request) {
30
- b = new Date(b.mergedAt);
31
- return a > b ? 1 : a < b ? -1 : 0;
32
- })[0] : null;
33
- -
34
- - if (associatedPullRequest) {
35
- - user = associatedPullRequest.author;
36
- - }
37
- -
38
- return {
39
- user: user ? user.login : null,
40
- pull: associatedPullRequest ? associatedPullRequest.number : null,
41
- links: {
42
- commit: `[\`${request.commit.slice(0, 7)}\`](${data.commitUrl})`,
43
- pull: associatedPullRequest ? `[#${associatedPullRequest.number}](${associatedPullRequest.url})` : null,
44
- - user: user ? `[@${user.login}](${user.url})` : null
45
- + user: user ? `@${user.login}` : null
46
- }
47
- };
48
- }
@@ -1,13 +0,0 @@
1
- diff --git a/lib/index.js b/lib/index.js
2
- index 2182884e21874ebb37261e2375eec08ad956fc9a..ef5630199121c2830756e00c7cc48cf1078c8207 100644
3
- --- a/lib/index.js
4
- +++ b/lib/index.js
5
- @@ -78,7 +78,7 @@ const isInAssignmentContext = path => {
6
-
7
- parentPath = _ref.parentPath;
8
-
9
- - if (parentPath.isVariableDeclaration() || parentPath.isAssignmentExpression()) {
10
- + if (parentPath.isVariableDeclaration() || parentPath.isAssignmentExpression() || parentPath.isClassDeclaration()) {
11
- return true;
12
- }
13
- } while (parentPath !== statement);
@@ -1,10 +0,0 @@
1
- {
2
- "extends": "../tsconfig.base.json",
3
- "compilerOptions": {
4
- "noEmit": true,
5
- "declaration": false,
6
- "declarationMap": false,
7
- "composite": false,
8
- "incremental": false
9
- }
10
- }
package/setupTests.ts DELETED
@@ -1,3 +0,0 @@
1
- import * as it from "@effect/vitest"
2
-
3
- it.addEqualityTesters()
@@ -1,7 +0,0 @@
1
- import { describe, expect, it } from "@effect/vitest"
2
-
3
- describe("Dummy", () => {
4
- it("should pass", () => {
5
- expect(true).toBe(true)
6
- })
7
- })
package/vitest.config.ts DELETED
@@ -1,17 +0,0 @@
1
- import path from "path"
2
- import { defineConfig } from "vitest/config"
3
-
4
- export default defineConfig({
5
- plugins: [],
6
- test: {
7
- setupFiles: [path.join(__dirname, "setupTests.ts")],
8
- include: ["./test/**/*.test.ts"],
9
- globals: true
10
- },
11
- resolve: {
12
- alias: {
13
- "@template/basic/test": path.join(__dirname, "test"),
14
- "@template/basic": path.join(__dirname, "src")
15
- }
16
- }
17
- })