@develit-services/blockchain 0.1.0 → 0.2.0

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.
@@ -0,0 +1,37 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const backendSdk = require('@develit-io/backend-sdk');
6
+ const cloudflare_workers = require('cloudflare:workers');
7
+
8
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
9
+ var __decorateClass = (decorators, target, key, kind) => {
10
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
11
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
12
+ if (decorator = decorators[i])
13
+ result = (decorator(result)) || result;
14
+ return result;
15
+ };
16
+ let BlockchainServiceBase = class extends backendSdk.develitWorker(
17
+ cloudflare_workers.WorkerEntrypoint
18
+ ) {
19
+ constructor(ctx, env) {
20
+ super(ctx, env);
21
+ }
22
+ };
23
+ BlockchainServiceBase = __decorateClass([
24
+ backendSdk.service("blockchain")
25
+ ], BlockchainServiceBase);
26
+ function defineBlockchainService() {
27
+ return class BlockchainService extends BlockchainServiceBase {
28
+ constructor(ctx, env) {
29
+ super(ctx, env);
30
+ }
31
+ };
32
+ }
33
+
34
+ const BlockchainService = defineBlockchainService();
35
+
36
+ exports.default = BlockchainService;
37
+ exports.defineBlockchainService = defineBlockchainService;
@@ -0,0 +1,14 @@
1
+ import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
2
+ import { WorkerEntrypoint } from 'cloudflare:workers';
3
+
4
+ declare const BlockchainServiceBase_base: (abstract new (ctx: ExecutionContext, env: BlockchainEnv) => WorkerEntrypoint<BlockchainEnv, {}>) & (abstract new (...args: any[]) => _develit_io_backend_sdk.DevelitWorkerMethods);
5
+ declare class BlockchainServiceBase extends BlockchainServiceBase_base {
6
+ constructor(ctx: ExecutionContext, env: BlockchainEnv);
7
+ }
8
+ declare function defineBlockchainService(): new (ctx: ExecutionContext, env: BlockchainEnv) => BlockchainServiceBase;
9
+
10
+ declare const _default: new (ctx: ExecutionContext, env: BlockchainEnv) => WorkerEntrypoint<BlockchainEnv>;
11
+
12
+ // @ts-ignore
13
+ export = _default;
14
+ export { defineBlockchainService };
@@ -0,0 +1,12 @@
1
+ import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
2
+ import { WorkerEntrypoint } from 'cloudflare:workers';
3
+
4
+ declare const BlockchainServiceBase_base: (abstract new (ctx: ExecutionContext, env: BlockchainEnv) => WorkerEntrypoint<BlockchainEnv, {}>) & (abstract new (...args: any[]) => _develit_io_backend_sdk.DevelitWorkerMethods);
5
+ declare class BlockchainServiceBase extends BlockchainServiceBase_base {
6
+ constructor(ctx: ExecutionContext, env: BlockchainEnv);
7
+ }
8
+ declare function defineBlockchainService(): new (ctx: ExecutionContext, env: BlockchainEnv) => BlockchainServiceBase;
9
+
10
+ declare const _default: new (ctx: ExecutionContext, env: BlockchainEnv) => WorkerEntrypoint<BlockchainEnv>;
11
+
12
+ export { _default as default, defineBlockchainService };
@@ -0,0 +1,14 @@
1
+ import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
2
+ import { WorkerEntrypoint } from 'cloudflare:workers';
3
+
4
+ declare const BlockchainServiceBase_base: (abstract new (ctx: ExecutionContext, env: BlockchainEnv) => WorkerEntrypoint<BlockchainEnv, {}>) & (abstract new (...args: any[]) => _develit_io_backend_sdk.DevelitWorkerMethods);
5
+ declare class BlockchainServiceBase extends BlockchainServiceBase_base {
6
+ constructor(ctx: ExecutionContext, env: BlockchainEnv);
7
+ }
8
+ declare function defineBlockchainService(): new (ctx: ExecutionContext, env: BlockchainEnv) => BlockchainServiceBase;
9
+
10
+ declare const _default: new (ctx: ExecutionContext, env: BlockchainEnv) => WorkerEntrypoint<BlockchainEnv>;
11
+
12
+ // @ts-ignore
13
+ export = _default;
14
+ export { defineBlockchainService };
@@ -0,0 +1,32 @@
1
+ import { develitWorker, service } from '@develit-io/backend-sdk';
2
+ import { WorkerEntrypoint } from 'cloudflare:workers';
3
+
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __decorateClass = (decorators, target, key, kind) => {
6
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
7
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
8
+ if (decorator = decorators[i])
9
+ result = (decorator(result)) || result;
10
+ return result;
11
+ };
12
+ let BlockchainServiceBase = class extends develitWorker(
13
+ WorkerEntrypoint
14
+ ) {
15
+ constructor(ctx, env) {
16
+ super(ctx, env);
17
+ }
18
+ };
19
+ BlockchainServiceBase = __decorateClass([
20
+ service("blockchain")
21
+ ], BlockchainServiceBase);
22
+ function defineBlockchainService() {
23
+ return class BlockchainService extends BlockchainServiceBase {
24
+ constructor(ctx, env) {
25
+ super(ctx, env);
26
+ }
27
+ };
28
+ }
29
+
30
+ const BlockchainService = defineBlockchainService();
31
+
32
+ export { BlockchainService as default, defineBlockchainService };
@@ -0,0 +1,30 @@
1
+ 'use strict';
2
+
3
+ const backendSdk = require('@develit-io/backend-sdk');
4
+
5
+ function defineBlockchainServiceWrangler(config) {
6
+ const { project, name, envs } = config;
7
+ const base = {
8
+ ...backendSdk.composeWranglerBase({
9
+ project,
10
+ name
11
+ }),
12
+ vars: {
13
+ RPC_URL: ""
14
+ },
15
+ env: {}
16
+ };
17
+ for (const [envName, envCfg] of Object.entries(envs).filter(
18
+ ([key]) => key !== "local"
19
+ )) {
20
+ base.env[envName] = {
21
+ vars: {
22
+ ...envCfg.vars,
23
+ ENVIRONMENT: envName
24
+ }
25
+ };
26
+ }
27
+ return base;
28
+ }
29
+
30
+ exports.defineBlockchainServiceWrangler = defineBlockchainServiceWrangler;
@@ -0,0 +1,25 @@
1
+ import { BlockchainServiceWranglerConfig } from '../types.cjs';
2
+
3
+ declare function defineBlockchainServiceWrangler(config: BlockchainServiceWranglerConfig): {
4
+ vars: {
5
+ RPC_URL: string;
6
+ };
7
+ env: Record<string, unknown>;
8
+ $schema: string;
9
+ name: string;
10
+ main: string;
11
+ compatibility_date: string;
12
+ compatibility_flags: string[];
13
+ observability: {
14
+ enabled: boolean;
15
+ head_sampling_rate: number;
16
+ logs: {
17
+ enabled: boolean;
18
+ invocation_logs: boolean;
19
+ };
20
+ };
21
+ workers_dev: boolean;
22
+ keep_vars: boolean;
23
+ };
24
+
25
+ export { defineBlockchainServiceWrangler };
@@ -0,0 +1,25 @@
1
+ import { BlockchainServiceWranglerConfig } from '../types.mjs';
2
+
3
+ declare function defineBlockchainServiceWrangler(config: BlockchainServiceWranglerConfig): {
4
+ vars: {
5
+ RPC_URL: string;
6
+ };
7
+ env: Record<string, unknown>;
8
+ $schema: string;
9
+ name: string;
10
+ main: string;
11
+ compatibility_date: string;
12
+ compatibility_flags: string[];
13
+ observability: {
14
+ enabled: boolean;
15
+ head_sampling_rate: number;
16
+ logs: {
17
+ enabled: boolean;
18
+ invocation_logs: boolean;
19
+ };
20
+ };
21
+ workers_dev: boolean;
22
+ keep_vars: boolean;
23
+ };
24
+
25
+ export { defineBlockchainServiceWrangler };
@@ -0,0 +1,25 @@
1
+ import { BlockchainServiceWranglerConfig } from '../types.js';
2
+
3
+ declare function defineBlockchainServiceWrangler(config: BlockchainServiceWranglerConfig): {
4
+ vars: {
5
+ RPC_URL: string;
6
+ };
7
+ env: Record<string, unknown>;
8
+ $schema: string;
9
+ name: string;
10
+ main: string;
11
+ compatibility_date: string;
12
+ compatibility_flags: string[];
13
+ observability: {
14
+ enabled: boolean;
15
+ head_sampling_rate: number;
16
+ logs: {
17
+ enabled: boolean;
18
+ invocation_logs: boolean;
19
+ };
20
+ };
21
+ workers_dev: boolean;
22
+ keep_vars: boolean;
23
+ };
24
+
25
+ export { defineBlockchainServiceWrangler };
@@ -0,0 +1,28 @@
1
+ import { composeWranglerBase } from '@develit-io/backend-sdk';
2
+
3
+ function defineBlockchainServiceWrangler(config) {
4
+ const { project, name, envs } = config;
5
+ const base = {
6
+ ...composeWranglerBase({
7
+ project,
8
+ name
9
+ }),
10
+ vars: {
11
+ RPC_URL: ""
12
+ },
13
+ env: {}
14
+ };
15
+ for (const [envName, envCfg] of Object.entries(envs).filter(
16
+ ([key]) => key !== "local"
17
+ )) {
18
+ base.env[envName] = {
19
+ vars: {
20
+ ...envCfg.vars,
21
+ ENVIRONMENT: envName
22
+ }
23
+ };
24
+ }
25
+ return base;
26
+ }
27
+
28
+ export { defineBlockchainServiceWrangler };
package/dist/types.cjs ADDED
@@ -0,0 +1,2 @@
1
+ 'use strict';
2
+
@@ -0,0 +1,17 @@
1
+ interface BlockchainServiceEnvironmentConfig {
2
+ vars: {
3
+ RPC_URL: string;
4
+ };
5
+ }
6
+ interface BlockchainServiceWranglerConfig {
7
+ project: string;
8
+ name: string;
9
+ envs: {
10
+ local: BlockchainServiceEnvironmentConfig;
11
+ [key: string]: BlockchainServiceEnvironmentConfig;
12
+ };
13
+ }
14
+ interface BlockchainServiceEnv extends BlockchainEnv {
15
+ }
16
+
17
+ export type { BlockchainServiceEnv, BlockchainServiceEnvironmentConfig, BlockchainServiceWranglerConfig };
@@ -0,0 +1,17 @@
1
+ interface BlockchainServiceEnvironmentConfig {
2
+ vars: {
3
+ RPC_URL: string;
4
+ };
5
+ }
6
+ interface BlockchainServiceWranglerConfig {
7
+ project: string;
8
+ name: string;
9
+ envs: {
10
+ local: BlockchainServiceEnvironmentConfig;
11
+ [key: string]: BlockchainServiceEnvironmentConfig;
12
+ };
13
+ }
14
+ interface BlockchainServiceEnv extends BlockchainEnv {
15
+ }
16
+
17
+ export type { BlockchainServiceEnv, BlockchainServiceEnvironmentConfig, BlockchainServiceWranglerConfig };
@@ -0,0 +1,17 @@
1
+ interface BlockchainServiceEnvironmentConfig {
2
+ vars: {
3
+ RPC_URL: string;
4
+ };
5
+ }
6
+ interface BlockchainServiceWranglerConfig {
7
+ project: string;
8
+ name: string;
9
+ envs: {
10
+ local: BlockchainServiceEnvironmentConfig;
11
+ [key: string]: BlockchainServiceEnvironmentConfig;
12
+ };
13
+ }
14
+ interface BlockchainServiceEnv extends BlockchainEnv {
15
+ }
16
+
17
+ export type { BlockchainServiceEnv, BlockchainServiceEnvironmentConfig, BlockchainServiceWranglerConfig };
package/dist/types.mjs ADDED
@@ -0,0 +1 @@
1
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@develit-services/blockchain",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "author": "Develit.io s.r.o.",
5
5
  "type": "module",
6
6
  "exports": {