@hatchet-dev/typescript-sdk 0.0.1 → 0.0.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 (108) hide show
  1. package/dist/{hatchet/clients → clients}/admin/admin-client.d.ts +2 -2
  2. package/dist/{hatchet/clients → clients}/admin/admin-client.js +2 -2
  3. package/dist/{hatchet/clients → clients}/dispatcher/action-listener.d.ts +3 -3
  4. package/dist/{hatchet/clients → clients}/dispatcher/action-listener.js +2 -2
  5. package/dist/{hatchet/clients → clients}/dispatcher/action-listener.test.d.ts +1 -1
  6. package/dist/{hatchet/clients → clients}/dispatcher/action-listener.test.js +2 -2
  7. package/dist/{hatchet/clients → clients}/dispatcher/dispatcher-client.d.ts +3 -3
  8. package/dist/{hatchet/clients → clients}/dispatcher/dispatcher-client.js +2 -2
  9. package/dist/{hatchet/clients → clients}/dispatcher/dispatcher-client.test.js +1 -1
  10. package/dist/{hatchet/clients → clients}/event/event-client.d.ts +3 -3
  11. package/dist/{hatchet/clients → clients}/event/event-client.js +2 -2
  12. package/dist/{hatchet/clients → clients}/event/event-client.test.js +1 -1
  13. package/dist/{hatchet/clients → clients}/hatchet-client/hatchet-client.d.ts +4 -4
  14. package/dist/{hatchet/clients → clients}/hatchet-client/hatchet-client.js +5 -5
  15. package/dist/{hatchet/clients → clients}/worker/worker.d.ts +4 -4
  16. package/dist/{hatchet/clients → clients}/worker/worker.js +3 -3
  17. package/dist/{hatchet/clients → clients}/worker/worker.test.js +5 -5
  18. package/dist/index.d.ts +2 -0
  19. package/dist/{hatchet/index.js → index.js} +1 -1
  20. package/dist/protoc/events/index.js +17 -0
  21. package/dist/sdk.d.ts +2 -0
  22. package/dist/{hatchet/sdk.js → sdk.js} +1 -1
  23. package/dist/{hatchet/step.js → step.js} +1 -1
  24. package/dist/{hatchet/util → util}/config-loader/config-loader.d.ts +1 -1
  25. package/dist/{hatchet/util → util}/config-loader/config-loader.js +1 -1
  26. package/package.json +6 -5
  27. package/.eslintrc.json +0 -36
  28. package/.prettierrc.json +0 -6
  29. package/dist/hatchet/index.d.ts +0 -2
  30. package/dist/hatchet/sdk.d.ts +0 -2
  31. package/examples/dag-worker.ts +0 -55
  32. package/examples/example-event.ts +0 -7
  33. package/examples/simple-worker.ts +0 -39
  34. package/generate-protoc.sh +0 -10
  35. package/hatchet/clients/admin/admin-client.test.ts +0 -116
  36. package/hatchet/clients/admin/admin-client.ts +0 -43
  37. package/hatchet/clients/dispatcher/action-listener.test.ts +0 -270
  38. package/hatchet/clients/dispatcher/action-listener.ts +0 -91
  39. package/hatchet/clients/dispatcher/dispatcher-client.test.ts +0 -111
  40. package/hatchet/clients/dispatcher/dispatcher-client.ts +0 -47
  41. package/hatchet/clients/event/event-client.test.ts +0 -72
  42. package/hatchet/clients/event/event-client.ts +0 -32
  43. package/hatchet/clients/hatchet-client/client-config.ts +0 -22
  44. package/hatchet/clients/hatchet-client/fixtures/.hatchet-invalid.yaml +0 -6
  45. package/hatchet/clients/hatchet-client/fixtures/.hatchet.yaml +0 -8
  46. package/hatchet/clients/hatchet-client/hatchet-client.test.ts +0 -162
  47. package/hatchet/clients/hatchet-client/hatchet-client.ts +0 -136
  48. package/hatchet/clients/hatchet-client/index.ts +0 -2
  49. package/hatchet/clients/worker/index.ts +0 -1
  50. package/hatchet/clients/worker/worker.test.ts +0 -347
  51. package/hatchet/clients/worker/worker.ts +0 -229
  52. package/hatchet/index.ts +0 -3
  53. package/hatchet/sdk.ts +0 -3
  54. package/hatchet/step.ts +0 -48
  55. package/hatchet/util/config-loader/config-loader.test.ts +0 -79
  56. package/hatchet/util/config-loader/config-loader.ts +0 -91
  57. package/hatchet/util/config-loader/fixtures/.hatchet-invalid.yaml +0 -6
  58. package/hatchet/util/config-loader/fixtures/.hatchet.yaml +0 -8
  59. package/hatchet/util/config-loader/index.ts +0 -1
  60. package/hatchet/util/errors/hatchet-error.ts +0 -8
  61. package/hatchet/util/hatchet-promise/hatchet-promise.test.ts +0 -32
  62. package/hatchet/util/hatchet-promise/hatchet-promise.ts +0 -13
  63. package/hatchet/util/logger/index.ts +0 -1
  64. package/hatchet/util/logger/logger.ts +0 -44
  65. package/hatchet/util/sleep.ts +0 -6
  66. package/hatchet/workflow.ts +0 -30
  67. package/jest.config.ts +0 -205
  68. package/protoc/dispatcher/dispatcher.ts +0 -1101
  69. package/protoc/dispatcher/index.ts +0 -1
  70. package/protoc/events/events.ts +0 -519
  71. package/protoc/google/protobuf/timestamp.ts +0 -210
  72. package/protoc/google/protobuf/wrappers.ts +0 -657
  73. package/protoc/workflows/index.ts +0 -1
  74. package/protoc/workflows/workflows.ts +0 -2158
  75. package/tsconfig.json +0 -120
  76. /package/dist/{hatchet/clients → clients}/admin/admin-client.test.d.ts +0 -0
  77. /package/dist/{hatchet/clients → clients}/admin/admin-client.test.js +0 -0
  78. /package/dist/{hatchet/clients → clients}/dispatcher/dispatcher-client.test.d.ts +0 -0
  79. /package/dist/{hatchet/clients → clients}/event/event-client.test.d.ts +0 -0
  80. /package/dist/{hatchet/clients → clients}/hatchet-client/client-config.d.ts +0 -0
  81. /package/dist/{hatchet/clients → clients}/hatchet-client/client-config.js +0 -0
  82. /package/dist/{hatchet/clients → clients}/hatchet-client/hatchet-client.test.d.ts +0 -0
  83. /package/dist/{hatchet/clients → clients}/hatchet-client/hatchet-client.test.js +0 -0
  84. /package/dist/{hatchet/clients → clients}/hatchet-client/index.d.ts +0 -0
  85. /package/dist/{hatchet/clients → clients}/hatchet-client/index.js +0 -0
  86. /package/dist/{hatchet/clients → clients}/worker/index.d.ts +0 -0
  87. /package/dist/{hatchet/clients → clients}/worker/index.js +0 -0
  88. /package/dist/{hatchet/clients → clients}/worker/worker.test.d.ts +0 -0
  89. /package/{protoc/events/index.ts → dist/protoc/events/index.d.ts} +0 -0
  90. /package/dist/{hatchet/step.d.ts → step.d.ts} +0 -0
  91. /package/dist/{hatchet/util → util}/config-loader/config-loader.test.d.ts +0 -0
  92. /package/dist/{hatchet/util → util}/config-loader/config-loader.test.js +0 -0
  93. /package/dist/{hatchet/util → util}/config-loader/index.d.ts +0 -0
  94. /package/dist/{hatchet/util → util}/config-loader/index.js +0 -0
  95. /package/dist/{hatchet/util → util}/errors/hatchet-error.d.ts +0 -0
  96. /package/dist/{hatchet/util → util}/errors/hatchet-error.js +0 -0
  97. /package/dist/{hatchet/util → util}/hatchet-promise/hatchet-promise.d.ts +0 -0
  98. /package/dist/{hatchet/util → util}/hatchet-promise/hatchet-promise.js +0 -0
  99. /package/dist/{hatchet/util → util}/hatchet-promise/hatchet-promise.test.d.ts +0 -0
  100. /package/dist/{hatchet/util → util}/hatchet-promise/hatchet-promise.test.js +0 -0
  101. /package/dist/{hatchet/util → util}/logger/index.d.ts +0 -0
  102. /package/dist/{hatchet/util → util}/logger/index.js +0 -0
  103. /package/dist/{hatchet/util → util}/logger/logger.d.ts +0 -0
  104. /package/dist/{hatchet/util → util}/logger/logger.js +0 -0
  105. /package/dist/{hatchet/util → util}/sleep.d.ts +0 -0
  106. /package/dist/{hatchet/util → util}/sleep.js +0 -0
  107. /package/dist/{hatchet/workflow.d.ts → workflow.d.ts} +0 -0
  108. /package/dist/{hatchet/workflow.js → workflow.js} +0 -0
package/jest.config.ts DELETED
@@ -1,205 +0,0 @@
1
- /**
2
- * For a detailed explanation regarding each configuration property, visit:
3
- * https://jestjs.io/docs/configuration
4
- */
5
-
6
- import type { Config } from 'jest';
7
-
8
- const config: Config = {
9
- // All imported modules in your tests should be mocked automatically
10
- // automock: false,
11
-
12
- // Stop running tests after `n` failures
13
- // bail: 0,
14
-
15
- // The directory where Jest should store its cached dependency information
16
- // cacheDirectory: "/private/var/folders/tx/gj6zfqv915j4ww47qf9wsz7m0000gn/T/jest_dx",
17
-
18
- // Automatically clear mock calls, instances, contexts and results before every test
19
- clearMocks: true,
20
-
21
- // Indicates whether the coverage information should be collected while executing the test
22
- collectCoverage: false,
23
-
24
- // An array of glob patterns indicating a set of files for which coverage information should be collected
25
- // collectCoverageFrom: undefined,
26
-
27
- // The directory where Jest should output its coverage files
28
- coverageDirectory: 'coverage',
29
-
30
- // An array of regexp pattern strings used to skip coverage collection
31
- // coveragePathIgnorePatterns: [
32
- // "/node_modules/"
33
- // ],
34
-
35
- // Indicates which provider should be used to instrument code for coverage
36
- coverageProvider: 'v8',
37
-
38
- // A list of reporter names that Jest uses when writing coverage reports
39
- // coverageReporters: [
40
- // "json",
41
- // "text",
42
- // "lcov",
43
- // "clover"
44
- // ],
45
-
46
- // An object that configures minimum threshold enforcement for coverage results
47
- // coverageThreshold: undefined,
48
-
49
- // A path to a custom dependency extractor
50
- // dependencyExtractor: undefined,
51
-
52
- // Make calling deprecated APIs throw helpful error messages
53
- // errorOnDeprecated: false,
54
-
55
- // The default configuration for fake timers
56
- // fakeTimers: {
57
- // "enableGlobally": false
58
- // },
59
-
60
- // Force coverage collection from ignored files using an array of glob patterns
61
- // forceCoverageMatch: [],
62
-
63
- // A path to a module which exports an async function that is triggered once before all test suites
64
- // globalSetup: undefined,
65
-
66
- // A path to a module which exports an async function that is triggered once after all test suites
67
- // globalTeardown: undefined,
68
-
69
- // A set of global variables that need to be available in all test environments
70
- // globals: {},
71
-
72
- // The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers.
73
- // maxWorkers: "50%",
74
-
75
- // An array of directory names to be searched recursively up from the requiring module's location
76
- // moduleDirectories: [
77
- // "node_modules"
78
- // ],
79
-
80
- // An array of file extensions your modules use
81
- // moduleFileExtensions: [
82
- // "js",
83
- // "mjs",
84
- // "cjs",
85
- // "jsx",
86
- // "ts",
87
- // "tsx",
88
- // "json",
89
- // "node"
90
- // ],
91
-
92
- // A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
93
- // moduleNameMapper: {},
94
-
95
- // An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
96
- // modulePathIgnorePatterns: [],
97
-
98
- // Activates notifications for test results
99
- // notify: false,
100
-
101
- // An enum that specifies notification mode. Requires { notify: true }
102
- // notifyMode: "failure-change",
103
-
104
- // A preset that is used as a base for Jest's configuration
105
- // preset: undefined,
106
-
107
- // Run tests from one or more projects
108
- // projects: undefined,
109
-
110
- // Use this configuration option to add custom reporters to Jest
111
- // reporters: undefined,
112
-
113
- // Automatically reset mock state before every test
114
- // resetMocks: false,
115
-
116
- // Reset the module registry before running each individual test
117
- // resetModules: false,
118
-
119
- // A path to a custom resolver
120
- // resolver: undefined,
121
-
122
- // Automatically restore mock state and implementation before every test
123
- // restoreMocks: false,
124
-
125
- // The root directory that Jest should scan for tests and modules within
126
- // rootDir: undefined,
127
-
128
- // A list of paths to directories that Jest should use to search for files in
129
- // roots: [
130
- // "<rootDir>"
131
- // ],
132
-
133
- // Allows you to use a custom runner instead of Jest's default test runner
134
- // runner: "jest-runner",
135
-
136
- // The paths to modules that run some code to configure or set up the testing environment before each test
137
- // setupFiles: [],
138
-
139
- // A list of paths to modules that run some code to configure or set up the testing framework before each test
140
- // setupFilesAfterEnv: [],
141
-
142
- // The number of seconds after which a test is considered as slow and reported as such in the results.
143
- // slowTestThreshold: 5,
144
-
145
- // A list of paths to snapshot serializer modules Jest should use for snapshot testing
146
- // snapshotSerializers: [],
147
-
148
- // The test environment that will be used for testing
149
- // testEnvironment: "jest-environment-node",
150
-
151
- // Options that will be passed to the testEnvironment
152
- // testEnvironmentOptions: {},
153
-
154
- // Adds a location field to test results
155
- // testLocationInResults: false,
156
-
157
- // The glob patterns Jest uses to detect test files
158
- // testMatch: [
159
- // "**/__tests__/**/*.[jt]s?(x)",
160
- // "**/?(*.)+(spec|test).[tj]s?(x)"
161
- // ],
162
-
163
- // An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
164
- testPathIgnorePatterns: ['/node_modules/', '/dist/'],
165
-
166
- // The regexp pattern or array of patterns that Jest uses to detect test files
167
- // testRegex: [],
168
-
169
- // This option allows the use of a custom results processor
170
- // testResultsProcessor: undefined,
171
-
172
- // This option allows use of a custom test runner
173
- // testRunner: "jest-circus/runner",
174
-
175
- // A map from regular expressions to paths to transformers
176
- transform: {
177
- '^.+\\.(js|ts)$': ['ts-jest', { tsconfig: './tsconfig.json' }],
178
- },
179
- moduleNameMapper: {
180
- '^@hatchet(.*)$': '<rootDir>/hatchet$1',
181
- '^@protoc/(.*)$': '<rootDir>/protoc/$1',
182
- '^@util/(.*)$': '<rootDir>/hatchet/util/$1',
183
- '^@models/(.*)$': '<rootDir>/hatchet/models/$1',
184
- '^@clients/(.*)$': '<rootDir>/hatchet/clients/$1',
185
- },
186
- // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
187
- // transformIgnorePatterns: [
188
- // "/node_modules/",
189
- // "\\.pnp\\.[^\\/]+$"
190
- // ],
191
-
192
- // An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
193
- // unmockedModulePathPatterns: undefined,
194
-
195
- // Indicates whether each individual test should be reported during the run
196
- // verbose: undefined,
197
-
198
- // An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode
199
- // watchPathIgnorePatterns: [],
200
-
201
- // Whether to use watchman for file crawling
202
- // watchman: true,
203
- };
204
-
205
- export default config;