@sentio/cli 1.37.5-rc.7 → 2.0.0-rc.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 (56) hide show
  1. package/lib/build.js +42 -32
  2. package/lib/build.js.map +1 -1
  3. package/lib/cli.js +25 -96
  4. package/lib/cli.js.map +1 -1
  5. package/lib/commands/login-server.js +41 -65
  6. package/lib/commands/login-server.js.map +1 -1
  7. package/lib/commands/run-create.js +35 -30
  8. package/lib/commands/run-create.js.map +1 -1
  9. package/lib/commands/run-login.js +28 -58
  10. package/lib/commands/run-login.js.map +1 -1
  11. package/lib/commands/run-upload.d.ts +3 -0
  12. package/lib/commands/run-upload.js +254 -0
  13. package/lib/commands/run-upload.js.map +1 -0
  14. package/lib/commands/run-version.js +9 -39
  15. package/lib/commands/run-version.js.map +1 -1
  16. package/lib/config.js +4 -11
  17. package/lib/config.js.map +1 -1
  18. package/lib/key.js +18 -26
  19. package/lib/key.js.map +1 -1
  20. package/lib/utils.js +7 -15
  21. package/lib/utils.js.map +1 -1
  22. package/package.json +11 -18
  23. package/src/build.ts +29 -9
  24. package/src/cli.ts +7 -72
  25. package/src/commands/login-server.ts +25 -17
  26. package/src/commands/run-create.ts +14 -0
  27. package/src/commands/run-login.ts +4 -4
  28. package/src/{upload.ts → commands/run-upload.ts} +94 -19
  29. package/src/commands/run-version.ts +1 -1
  30. package/templates/aptos/jest.config.ts +8 -0
  31. package/templates/aptos/package.json +3 -2
  32. package/templates/aptos/src/processor.ts +3 -3
  33. package/templates/aptos/tsconfig.json +4 -3
  34. package/templates/evm/jest.config.ts +8 -0
  35. package/templates/evm/package.json +2 -1
  36. package/templates/evm/src/processor.ts +3 -3
  37. package/templates/evm/tsconfig.json +4 -3
  38. package/templates/raw/jest.config.ts +8 -0
  39. package/templates/raw/package.json +2 -1
  40. package/templates/raw/tsconfig.json +4 -3
  41. package/templates/solana/jest.config.ts +8 -0
  42. package/templates/solana/package.json +3 -2
  43. package/templates/solana/src/processor.ts +1 -1
  44. package/templates/solana/tsconfig.json +4 -3
  45. package/LICENSE +0 -55
  46. package/lib/upload.d.ts +0 -2
  47. package/lib/upload.js +0 -189
  48. package/lib/upload.js.map +0 -1
  49. package/lib/webpack.config.js +0 -50
  50. package/src/webpack.config.js +0 -50
  51. package/templates/aptos/jest.config.js +0 -7
  52. package/templates/evm/jest.config.js +0 -7
  53. package/templates/raw/jest.config.js +0 -7
  54. package/templates/raw/yarn.lock +0 -4095
  55. package/templates/solana/jest.config.js +0 -7
  56. package/templates/solana/yarn.lock +0 -4918
@@ -1,11 +1,11 @@
1
1
  import commandLineArgs from 'command-line-args'
2
2
  import commandLineUsage from 'command-line-usage'
3
- import { getAuthConfig, getFinalizedHost } from '../config'
4
- import { startServer } from './login-server'
3
+ import { getAuthConfig, getFinalizedHost } from '../config.js'
4
+ import { startServer } from './login-server.js'
5
5
  import url, { URL } from 'url'
6
6
  import * as crypto from 'crypto'
7
7
  import chalk from 'chalk'
8
- import { WriteKey } from '../key'
8
+ import { WriteKey } from '../key.js'
9
9
  import fetch from 'node-fetch'
10
10
  import open from 'open'
11
11
 
@@ -102,7 +102,7 @@ function sha256(str: string) {
102
102
 
103
103
  async function checkKey(host: string, apiKey: string) {
104
104
  const checkApiKeyUrl = new URL('/api/v1/processors/check_key', host)
105
- return fetch(checkApiKeyUrl, {
105
+ return fetch(checkApiKeyUrl.href, {
106
106
  method: 'GET',
107
107
  headers: {
108
108
  'api-key': apiKey,
@@ -1,20 +1,91 @@
1
- import { execSync } from 'child_process'
2
- import { createHash } from 'crypto'
1
+ import commandLineArgs from 'command-line-args'
2
+ import commandLineUsage from 'command-line-usage'
3
+ import { finalizeHost, FinalizeProjectName, SentioProjectConfig } from '../config.js'
4
+ import { URL } from 'url'
5
+ import fetch from 'node-fetch'
6
+ import { buildProcessor } from '../build.js'
7
+ import chalk from 'chalk'
8
+ import path from 'path'
9
+ import { ReadKey } from '../key.js'
3
10
  import fs from 'fs'
11
+ import { createHash } from 'crypto'
12
+ import { execSync } from 'child_process'
13
+ import { getSdkVersion } from '../utils.js'
4
14
  import readline from 'readline'
5
- import { SentioProjectConfig } from './config'
6
- import { ReadKey } from './key'
7
- import path from 'path'
8
- import chalk from 'chalk'
9
- import { buildProcessor } from './build'
10
- import fetch from 'node-fetch'
11
- import { getSdkVersion } from './utils'
12
- import { URL } from 'url'
15
+
16
+ export async function runUpload(processorConfig: SentioProjectConfig, argv: string[]) {
17
+ const optionDefinitions = [
18
+ {
19
+ name: 'help',
20
+ alias: 'h',
21
+ type: Boolean,
22
+ description: 'Display this usage guide.',
23
+ },
24
+ {
25
+ name: 'api-key',
26
+ type: String,
27
+ description: '(Optional) Manually provide API key rather than use saved credential',
28
+ },
29
+ {
30
+ name: 'host',
31
+ description: '(Optional) Override Sentio Host name',
32
+ type: String,
33
+ },
34
+ {
35
+ name: 'owner',
36
+ description: '(Optional) Override Project owner',
37
+ type: String,
38
+ },
39
+ {
40
+ name: 'nobuild',
41
+ description: '(Optional) Skip build & pack file before uploading, default false',
42
+ type: Boolean,
43
+ },
44
+ {
45
+ name: 'debug',
46
+ description: '(Optional) Run driver in debug mode, default false',
47
+ type: Boolean,
48
+ },
49
+ ]
50
+ const options = commandLineArgs(optionDefinitions, { argv })
51
+ if (options.help) {
52
+ const usage = commandLineUsage([
53
+ {
54
+ header: 'Sentio upload',
55
+ content: 'sentio upload',
56
+ },
57
+ {
58
+ header: 'Options',
59
+ optionList: optionDefinitions,
60
+ },
61
+ ])
62
+ console.log(usage)
63
+ } else {
64
+ if (options.host) {
65
+ processorConfig.host = options.host
66
+ }
67
+ if (options.nobuild) {
68
+ processorConfig.build = false
69
+ }
70
+ if (options.debug) {
71
+ processorConfig.debug = true
72
+ }
73
+ finalizeHost(processorConfig)
74
+ FinalizeProjectName(processorConfig, options.owner)
75
+ console.log(processorConfig)
76
+
77
+ let apiOverride = undefined
78
+ if (options['api-key']) {
79
+ apiOverride = options['api-key']
80
+ }
81
+ return uploadFile(processorConfig, apiOverride)
82
+ }
83
+ }
13
84
 
14
85
  async function createProject(options: SentioProjectConfig, apiKey: string) {
15
86
  const url = new URL('/api/v1/projects', options.host)
16
87
  const [ownerName, slug] = options.project.includes('/') ? options.project.split('/') : [undefined, options.project]
17
- return fetch(url, {
88
+ return fetch(url.href, {
18
89
  method: 'POST',
19
90
  headers: {
20
91
  'api-key': apiKey,
@@ -73,8 +144,8 @@ export async function uploadFile(options: SentioProjectConfig, apiKeyOverride: s
73
144
  // get gcs upload url
74
145
  const initUploadResRaw = await initUpload(options.host, apiKey, options.project, getSdkVersion())
75
146
  if (!initUploadResRaw.ok) {
76
- console.error(chalk.red('Failed to get upload url'))
77
- console.error(chalk.red((await initUploadResRaw.json()).message))
147
+ // console.error(chalk.red('Failed to get upload url'))
148
+ console.error(chalk.red(((await initUploadResRaw.json()) as { message: string }).message))
78
149
 
79
150
  if (initUploadResRaw.status === 404) {
80
151
  // create project if not exist
@@ -91,7 +162,7 @@ export async function uploadFile(options: SentioProjectConfig, apiKeyOverride: s
91
162
  const res = await createProject(options, apiKey)
92
163
  if (!res.ok) {
93
164
  console.error(chalk.red('Create Project Failed'))
94
- console.error(chalk.red((await res.json()).message))
165
+ console.error(chalk.red(((await res.json()) as { message: string }).message))
95
166
  return
96
167
  }
97
168
  console.log(chalk.green('Project created'))
@@ -106,8 +177,8 @@ export async function uploadFile(options: SentioProjectConfig, apiKeyOverride: s
106
177
  }
107
178
  return
108
179
  }
109
- const initUploadRes = await initUploadResRaw.json()
110
- const uploadUrl = initUploadRes['url'] as string
180
+ const initUploadRes = (await initUploadResRaw.json()) as { url: string }
181
+ const uploadUrl = initUploadRes.url
111
182
 
112
183
  // do actual uploading
113
184
  const file = fs.createReadStream(PROCESSOR_FILE)
@@ -146,8 +217,12 @@ export async function uploadFile(options: SentioProjectConfig, apiKeyOverride: s
146
217
  if (commitSha) {
147
218
  console.log('\t', chalk.blue('Git commit SHA:'), commitSha)
148
219
  }
149
- const { projectFullSlug } = await finishUploadResRaw.json()
220
+ const { projectFullSlug, version } = (await finishUploadResRaw.json()) as {
221
+ projectFullSlug: string
222
+ version: string
223
+ }
150
224
  console.log('\t', chalk.blue('Check status:'), `${options.host}/${projectFullSlug}/datasource`)
225
+ console.log('\t', chalk.blue('Version:'), version)
151
226
  }
152
227
 
153
228
  let error: Error
@@ -174,7 +249,7 @@ export async function uploadFile(options: SentioProjectConfig, apiKeyOverride: s
174
249
 
175
250
  async function initUpload(host: string, apiKey: string, projectSlug: string, sdkVersion: string) {
176
251
  const initUploadUrl = new URL(`/api/v1/processors/init_upload`, host)
177
- return fetch(initUploadUrl, {
252
+ return fetch(initUploadUrl.href, {
178
253
  method: 'POST',
179
254
  headers: {
180
255
  'api-key': apiKey,
@@ -197,7 +272,7 @@ async function finishUpload(
197
272
  debug: boolean
198
273
  ) {
199
274
  const finishUploadUrl = new URL(`/api/v1/processors/finish_upload`, host)
200
- return fetch(finishUploadUrl, {
275
+ return fetch(finishUploadUrl.href, {
201
276
  method: 'POST',
202
277
  headers: {
203
278
  'api-key': apiKey,
@@ -1,6 +1,6 @@
1
1
  import commandLineArgs from 'command-line-args'
2
2
  import commandLineUsage from 'command-line-usage'
3
- import { getCliVersion, getSdkVersion } from '../utils'
3
+ import { getCliVersion, getSdkVersion } from '../utils.js'
4
4
  import * as console from 'console'
5
5
 
6
6
  export function runVersion(argv: string[]) {
@@ -0,0 +1,8 @@
1
+ /** @type {import('ts-jest/dist/types').JestConfigWithTsJest} */
2
+ export default {
3
+ preset: 'ts-jest/presets/default-esm',
4
+ modulePathIgnorePatterns: ['<rootDir>/dist/'],
5
+ moduleNameMapper: {
6
+ '^(\\.{1,2}/.*)\\.js$': '$1',
7
+ },
8
+ }
@@ -2,6 +2,7 @@
2
2
  "name": "template-aptos",
3
3
  "private": true,
4
4
  "version": "1.0.0",
5
+ "type": "module",
5
6
  "scripts": {
6
7
  "test": "jest",
7
8
  "gen": "sentio gen",
@@ -9,8 +10,8 @@
9
10
  "upload": "sentio upload"
10
11
  },
11
12
  "dependencies": {
12
- "@sentio/sdk": "^1.0.0-development",
13
- "@sentio/sdk-aptos": "^1.0.0-development"
13
+ "@sentio/sdk": "^2.0.0-development",
14
+ "@sentio/sdk-aptos": "^2.0.0-development"
14
15
  },
15
16
  "devDependencies": {
16
17
  "@types/jest": "^29.0.0",
@@ -1,13 +1,13 @@
1
- import { SouffleChefCampaign, CandyMachine } from './types/aptos/souffle'
1
+ import { SouffleChefCampaign, CandyMachine } from './types/aptos/souffle.js'
2
2
 
3
3
  SouffleChefCampaign.bind()
4
4
  .onEntryPullTokenV2((call, ctx) => {
5
- ctx.meter.Counter('pulled').add(call.arguments_typed[3])
5
+ ctx.meter.Counter('pulled').add(call.arguments_decoded[3])
6
6
  })
7
7
  .onEventBurnEnjoyEvent((evt, ctx) => {
8
8
  ctx.meter.Counter('burned').add(1)
9
9
  })
10
10
 
11
11
  CandyMachine.bind().onEntryPullToken((call, ctx) => {
12
- ctx.meter.Counter('pulled').add(call.arguments_typed[2], { coin: call.type_arguments[0] })
12
+ ctx.meter.Counter('pulled').add(call.arguments_decoded[2], { coin: call.type_arguments[0] })
13
13
  })
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "compilerOptions": {
3
+ "importHelpers": true,
3
4
  "alwaysStrict": true,
4
5
  "sourceMap": true,
5
6
  "target": "esnext",
6
7
  "esModuleInterop": true,
7
8
  "noImplicitReturns": true,
8
9
  "noImplicitAny": true,
9
- "module": "commonjs",
10
- "moduleResolution": "node",
10
+ "module": "esnext",
11
+ "moduleResolution": "nodenext",
11
12
  "strictNullChecks": true,
12
13
  "stripInternal": true,
13
14
  "noFallthroughCasesInSwitch": true,
@@ -16,5 +17,5 @@
16
17
  "rootDir": "./src",
17
18
  "skipLibCheck": true
18
19
  },
19
- "exclude": ["dist"]
20
+ "exclude": ["dist", "jest.config.ts"]
20
21
  }
@@ -0,0 +1,8 @@
1
+ /** @type {import('ts-jest/dist/types').JestConfigWithTsJest} */
2
+ export default {
3
+ preset: 'ts-jest/presets/default-esm',
4
+ modulePathIgnorePatterns: ['<rootDir>/dist/'],
5
+ moduleNameMapper: {
6
+ '^(\\.{1,2}/.*)\\.js$': '$1',
7
+ },
8
+ }
@@ -2,6 +2,7 @@
2
2
  "name": "template-evm",
3
3
  "private": true,
4
4
  "version": "1.0.0",
5
+ "type": "module",
5
6
  "scripts": {
6
7
  "test": "jest",
7
8
  "gen": "sentio gen",
@@ -9,7 +10,7 @@
9
10
  "upload": "sentio upload"
10
11
  },
11
12
  "dependencies": {
12
- "@sentio/sdk": "^1.0.0-development"
13
+ "@sentio/sdk": "^2.0.0-development"
13
14
  },
14
15
  "devDependencies": {
15
16
  "@types/jest": "^29.0.0",
@@ -1,7 +1,7 @@
1
1
  import { Counter, Gauge } from '@sentio/sdk'
2
- import { token } from '@sentio/sdk/lib/utils'
3
- import { ERC20Processor } from '@sentio/sdk/lib/builtin/erc20'
4
- import { X2y2Processor } from './types/x2y2'
2
+ import { token } from '@sentio/sdk/utils'
3
+ import { ERC20Processor } from '@sentio/sdk/builtin'
4
+ import { X2y2Processor } from './types/x2y2/index.js'
5
5
 
6
6
  const rewardPerBlock = Gauge.register('reward_per_block', {
7
7
  description: 'rewards for each block grouped by phase',
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "compilerOptions": {
3
+ "importHelpers": true,
3
4
  "alwaysStrict": true,
4
5
  "sourceMap": true,
5
6
  "target": "esnext",
6
7
  "esModuleInterop": true,
7
8
  "noImplicitReturns": true,
8
9
  "noImplicitAny": true,
9
- "module": "commonjs",
10
- "moduleResolution": "node",
10
+ "module": "esnext",
11
+ "moduleResolution": "nodenext",
11
12
  "strictNullChecks": true,
12
13
  "stripInternal": true,
13
14
  "noFallthroughCasesInSwitch": true,
@@ -16,5 +17,5 @@
16
17
  "rootDir": "./src",
17
18
  "skipLibCheck": true
18
19
  },
19
- "exclude": ["dist"]
20
+ "exclude": ["dist", "jest.config.ts"]
20
21
  }
@@ -0,0 +1,8 @@
1
+ /** @type {import('ts-jest/dist/types').JestConfigWithTsJest} */
2
+ export default {
3
+ preset: 'ts-jest/presets/default-esm',
4
+ modulePathIgnorePatterns: ['<rootDir>/dist/'],
5
+ moduleNameMapper: {
6
+ '^(\\.{1,2}/.*)\\.js$': '$1',
7
+ },
8
+ }
@@ -2,6 +2,7 @@
2
2
  "name": "template-raw",
3
3
  "private": true,
4
4
  "version": "1.0.0",
5
+ "type": "module",
5
6
  "scripts": {
6
7
  "test": "jest",
7
8
  "gen": "sentio gen",
@@ -9,7 +10,7 @@
9
10
  "upload": "sentio upload"
10
11
  },
11
12
  "dependencies": {
12
- "@sentio/sdk": "^1.0.0-development"
13
+ "@sentio/sdk": "^2.0.0-development"
13
14
  },
14
15
  "devDependencies": {
15
16
  "@types/jest": "^29.0.0",
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "compilerOptions": {
3
+ "importHelpers": true,
3
4
  "alwaysStrict": true,
4
5
  "sourceMap": true,
5
6
  "target": "esnext",
6
7
  "esModuleInterop": true,
7
8
  "noImplicitReturns": true,
8
9
  "noImplicitAny": true,
9
- "module": "commonjs",
10
- "moduleResolution": "node",
10
+ "module": "esnext",
11
+ "moduleResolution": "nodenext",
11
12
  "strictNullChecks": true,
12
13
  "stripInternal": true,
13
14
  "noFallthroughCasesInSwitch": true,
@@ -16,5 +17,5 @@
16
17
  "rootDir": "./src",
17
18
  "skipLibCheck": true
18
19
  },
19
- "exclude": ["dist"]
20
+ "exclude": ["dist", "jest.config.ts"]
20
21
  }
@@ -0,0 +1,8 @@
1
+ /** @type {import('ts-jest/dist/types').JestConfigWithTsJest} */
2
+ export default {
3
+ preset: 'ts-jest/presets/default-esm',
4
+ modulePathIgnorePatterns: ['<rootDir>/dist/'],
5
+ moduleNameMapper: {
6
+ '^(\\.{1,2}/.*)\\.js$': '$1',
7
+ },
8
+ }
@@ -2,6 +2,7 @@
2
2
  "name": "template-solana",
3
3
  "private": true,
4
4
  "version": "1.0.0",
5
+ "type": "module",
5
6
  "scripts": {
6
7
  "test": "jest",
7
8
  "gen": "sentio gen",
@@ -9,8 +10,8 @@
9
10
  "upload": "sentio upload"
10
11
  },
11
12
  "dependencies": {
12
- "@sentio/sdk": "^1.0.0-development",
13
- "@sentio/sdk-solana": "^1.0.0-development"
13
+ "@sentio/sdk": "^2.0.0-development",
14
+ "@sentio/sdk-solana": "^2.0.0-development"
14
15
  },
15
16
  "devDependencies": {
16
17
  "@types/jest": "^29.0.0",
@@ -1,4 +1,4 @@
1
- import { SPLTokenProcessor } from '@sentio/sdk-solana/lib/builtin'
1
+ import { SPLTokenProcessor } from '@sentio/sdk-solana/builtin'
2
2
 
3
3
  SPLTokenProcessor.bind({
4
4
  address: 'wormDTUJ6AWPNvk59vGQbDvGJmqbDTdgWgAqcLBCgUb',
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "compilerOptions": {
3
+ "importHelpers": true,
3
4
  "alwaysStrict": true,
4
5
  "sourceMap": true,
5
6
  "target": "esnext",
6
7
  "esModuleInterop": true,
7
8
  "noImplicitReturns": true,
8
9
  "noImplicitAny": true,
9
- "module": "commonjs",
10
- "moduleResolution": "node",
10
+ "module": "esnext",
11
+ "moduleResolution": "nodenext",
11
12
  "strictNullChecks": true,
12
13
  "stripInternal": true,
13
14
  "noFallthroughCasesInSwitch": true,
@@ -16,5 +17,5 @@
16
17
  "rootDir": "./src",
17
18
  "skipLibCheck": true
18
19
  },
19
- "exclude": ["dist"]
20
+ "exclude": ["dist", "jest.config.ts"]
20
21
  }
package/LICENSE DELETED
@@ -1,55 +0,0 @@
1
- Apache License
2
-
3
- Version 2.0, January 2004
4
-
5
- http://www.apache.org/licenses/
6
-
7
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8
-
9
- 1. Definitions.
10
-
11
- "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
12
-
13
- "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
14
-
15
- "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
16
-
17
- "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
18
-
19
- "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
20
-
21
- "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
22
-
23
- "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
24
-
25
- "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
26
-
27
- "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
28
-
29
- "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
30
-
31
- 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
32
-
33
- 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
34
-
35
- 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
36
-
37
- You must give any other recipients of the Work or Derivative Works a copy of this License; and
38
-
39
- You must cause any modified files to carry prominent notices stating that You changed the files; and
40
-
41
- You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
42
-
43
- If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
44
-
45
- 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
46
-
47
- 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
48
-
49
- 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
50
-
51
- 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
52
-
53
- 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
54
-
55
- END OF TERMS AND CONDITIONS
package/lib/upload.d.ts DELETED
@@ -1,2 +0,0 @@
1
- import { SentioProjectConfig } from './config';
2
- export declare function uploadFile(options: SentioProjectConfig, apiKeyOverride: string): Promise<void>;