Skip to content

Commit

Permalink
Force barrel exports and prohibit importing from dist/; rename sql/ t…
Browse files Browse the repository at this point in the history
…o pg/; upgrade Prettier and re-apply it (#5)


## PRs in the Stack
- #6
- ➡ #5
- #4

(The stack is managed by
[git-grok](https://github.com/dimikot/git-grok).)
  • Loading branch information
dimikot authored Jan 13, 2024
2 parents ec66324 + 75d7558 commit de21a20
Show file tree
Hide file tree
Showing 246 changed files with 4,845 additions and 15,344 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ module.exports = (projectRoot) => ({
project: "tsconfig.json",
warnOnUnsupportedTypeScriptVersion: false,
},
overrides: [{ files: [".eslintrc.base.js"] }],
plugins: [
"@typescript-eslint",
"import",
Expand All @@ -54,10 +55,12 @@ module.exports = (projectRoot) => ({
},
ignorePatterns: [
"node_modules",
"dist",
"webpack.config.ts",
"**/bin/**",
"*.d.ts",
"**/jest.config.js",
"**/.eslintrc*.js",
],
rules: {
// TODO: slowly enable no-extraneous-dependencies rule below. For now, it's
Expand Down
18 changes: 11 additions & 7 deletions docs/classes/AllowIf.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[@clickup/ent-framework](../README.md) / [Exports](../modules.md) / AllowIf

# Class: AllowIf<TInput\>
# Class: AllowIf\<TInput\>

Returns ALLOW if the predicate succeeds, otherwise SKIP.
- Used mostly for read permission checks.
Expand All @@ -15,15 +15,15 @@ Returns ALLOW if the predicate succeeds, otherwise SKIP.

## Hierarchy

- [`Rule`](Rule.md)<`TInput`\>
- [`Rule`](Rule.md)\<`TInput`\>

**`AllowIf`**

## Constructors

### constructor

**new AllowIf**<`TInput`\>(`predicate`)
**new AllowIf**\<`TInput`\>(`predicate`): [`AllowIf`](AllowIf.md)\<`TInput`\>

#### Type parameters

Expand All @@ -35,7 +35,11 @@ Returns ALLOW if the predicate succeeds, otherwise SKIP.

| Name | Type |
| :------ | :------ |
| `predicate` | [`Predicate`](../interfaces/Predicate.md)<`TInput`\> \| (`vc`: [`VC`](VC.md), `input`: `TInput`) => `Promise`<`boolean`\> |
| `predicate` | [`Predicate`](../interfaces/Predicate.md)\<`TInput`\> \| (`vc`: [`VC`](VC.md), `input`: `TInput`) => `Promise`\<`boolean`\> |

#### Returns

[`AllowIf`](AllowIf.md)\<`TInput`\>

#### Inherited from

Expand All @@ -59,7 +63,7 @@ ___

### predicate

`Readonly` **predicate**: [`Predicate`](../interfaces/Predicate.md)<`TInput`\>
`Readonly` **predicate**: [`Predicate`](../interfaces/Predicate.md)\<`TInput`\>

#### Inherited from

Expand Down Expand Up @@ -87,7 +91,7 @@ ___

### evaluate

**evaluate**(`vc`, `input`): `Promise`<[`RuleResult`](../interfaces/RuleResult.md)\>
**evaluate**(`vc`, `input`): `Promise`\<[`RuleResult`](../interfaces/RuleResult.md)\>

#### Parameters

Expand All @@ -98,7 +102,7 @@ ___

#### Returns

`Promise`<[`RuleResult`](../interfaces/RuleResult.md)\>
`Promise`\<[`RuleResult`](../interfaces/RuleResult.md)\>

#### Overrides

Expand Down
20 changes: 12 additions & 8 deletions docs/classes/Batcher.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[@clickup/ent-framework](../README.md) / [Exports](../modules.md) / Batcher

# Class: Batcher<TInput, TOutput\>
# Class: Batcher\<TInput, TOutput\>

Batcher is similar to DataLoader, but with a few important differences:
1. It's strongly typed not only for the output, but for input too. And input
Expand All @@ -21,7 +21,7 @@ Batcher is similar to DataLoader, but with a few important differences:

### constructor

**new Batcher**<`TInput`, `TOutput`\>(`runner`, `batchDelayMs`)
**new Batcher**\<`TInput`, `TOutput`\>(`runner`, `batchDelayMs`): [`Batcher`](Batcher.md)\<`TInput`, `TOutput`\>

#### Type parameters

Expand All @@ -34,8 +34,12 @@ Batcher is similar to DataLoader, but with a few important differences:

| Name | Type |
| :------ | :------ |
| `runner` | [`Runner`](Runner.md)<`TInput`, `TOutput`\> |
| `batchDelayMs` | [`MaybeCallable`](../modules.md#maybecallable)<`number`\> |
| `runner` | [`Runner`](Runner.md)\<`TInput`, `TOutput`\> |
| `batchDelayMs` | `MaybeCallable`\<`number`\> |

#### Returns

[`Batcher`](Batcher.md)\<`TInput`, `TOutput`\>

#### Defined in

Expand All @@ -45,11 +49,11 @@ Batcher is similar to DataLoader, but with a few important differences:

### flushQueue

`Protected` **flushQueue**(): `Promise`<`void`\>
**flushQueue**(): `Promise`\<`void`\>

#### Returns

`Promise`<`void`\>
`Promise`\<`void`\>

#### Defined in

Expand All @@ -59,7 +63,7 @@ ___

### run

**run**(`input`, `annotation`): `Promise`<`TOutput`\>
**run**(`input`, `annotation`): `Promise`\<`TOutput`\>

#### Parameters

Expand All @@ -70,7 +74,7 @@ ___

#### Returns

`Promise`<`TOutput`\>
`Promise`\<`TOutput`\>

#### Defined in

Expand Down
108 changes: 0 additions & 108 deletions docs/classes/CachedRefreshedValue.md

This file was deleted.

18 changes: 11 additions & 7 deletions docs/classes/CanReadOutgoingEdge.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[@clickup/ent-framework](../README.md) / [Exports](../modules.md) / CanReadOutgoingEdge

# Class: CanReadOutgoingEdge<TField\>
# Class: CanReadOutgoingEdge\<TField\>

Checks that an ent which a field is pointing to is readable:

Expand All @@ -20,13 +20,13 @@ to another ent with ID equals to the value of our ent's field.

## Implements

- [`Predicate`](../interfaces/Predicate.md)<`Record`<`TField`, `string` \| ``null``\>\>
- [`Predicate`](../interfaces/Predicate.md)\<`Record`\<`TField`, `string` \| ``null``\>\>

## Constructors

### constructor

**new CanReadOutgoingEdge**<`TField`\>(`field`, `toEntClass`)
**new CanReadOutgoingEdge**\<`TField`\>(`field`, `toEntClass`): [`CanReadOutgoingEdge`](CanReadOutgoingEdge.md)\<`TField`\>

#### Type parameters

Expand All @@ -41,6 +41,10 @@ to another ent with ID equals to the value of our ent's field.
| `field` | `TField` |
| `toEntClass` | [`EntClass`](../modules.md#entclass) |

#### Returns

[`CanReadOutgoingEdge`](CanReadOutgoingEdge.md)\<`TField`\>

#### Defined in

[src/ent/predicates/CanReadOutgoingEdge.ts:23](https://github.com/clickup/ent-framework/blob/master/src/ent/predicates/CanReadOutgoingEdge.ts#L23)
Expand Down Expand Up @@ -83,23 +87,23 @@ ___

### check

**check**(`vc`, `row`): `Promise`<`boolean`\>
**check**(`vc`, `row`): `Promise`\<`boolean`\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `vc` | [`VC`](VC.md) |
| `row` | `Record`<`TField`, ``null`` \| `string`\> |
| `row` | `Record`\<`TField`, ``null`` \| `string`\> |

#### Returns

`Promise`<`boolean`\>
`Promise`\<`boolean`\>

#### Implementation of

[Predicate](../interfaces/Predicate.md).[check](../interfaces/Predicate.md#check)

#### Defined in

[src/ent/predicates/CanReadOutgoingEdge.ts:28](https://github.com/clickup/ent-framework/blob/master/src/ent/predicates/CanReadOutgoingEdge.ts#L28)
[src/ent/predicates/CanReadOutgoingEdge.ts:30](https://github.com/clickup/ent-framework/blob/master/src/ent/predicates/CanReadOutgoingEdge.ts#L30)
18 changes: 11 additions & 7 deletions docs/classes/CanUpdateOutgoingEdge.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[@clickup/ent-framework](../README.md) / [Exports](../modules.md) / CanUpdateOutgoingEdge

# Class: CanUpdateOutgoingEdge<TField\>
# Class: CanUpdateOutgoingEdge\<TField\>

Checks that an Ent available via a field is updatable. See
CanReadOutgoingEdge comments for more details.
Expand All @@ -13,13 +13,13 @@ CanReadOutgoingEdge comments for more details.

## Implements

- [`Predicate`](../interfaces/Predicate.md)<`Record`<`TField`, `string` \| ``null``\>\>
- [`Predicate`](../interfaces/Predicate.md)\<`Record`\<`TField`, `string` \| ``null``\>\>

## Constructors

### constructor

**new CanUpdateOutgoingEdge**<`TField`\>(`field`, `toEntClass`)
**new CanUpdateOutgoingEdge**\<`TField`\>(`field`, `toEntClass`): [`CanUpdateOutgoingEdge`](CanUpdateOutgoingEdge.md)\<`TField`\>

#### Type parameters

Expand All @@ -34,6 +34,10 @@ CanReadOutgoingEdge comments for more details.
| `field` | `TField` |
| `toEntClass` | [`EntClass`](../modules.md#entclass) |

#### Returns

[`CanUpdateOutgoingEdge`](CanUpdateOutgoingEdge.md)\<`TField`\>

#### Defined in

[src/ent/predicates/CanUpdateOutgoingEdge.ts:15](https://github.com/clickup/ent-framework/blob/master/src/ent/predicates/CanUpdateOutgoingEdge.ts#L15)
Expand Down Expand Up @@ -76,23 +80,23 @@ ___

### check

**check**(`vc`, `row`): `Promise`<`boolean`\>
**check**(`vc`, `row`): `Promise`\<`boolean`\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `vc` | [`VC`](VC.md) |
| `row` | `Record`<`TField`, ``null`` \| `string`\> |
| `row` | `Record`\<`TField`, ``null`` \| `string`\> |

#### Returns

`Promise`<`boolean`\>
`Promise`\<`boolean`\>

#### Implementation of

[Predicate](../interfaces/Predicate.md).[check](../interfaces/Predicate.md#check)

#### Defined in

[src/ent/predicates/CanUpdateOutgoingEdge.ts:20](https://github.com/clickup/ent-framework/blob/master/src/ent/predicates/CanUpdateOutgoingEdge.ts#L20)
[src/ent/predicates/CanUpdateOutgoingEdge.ts:22](https://github.com/clickup/ent-framework/blob/master/src/ent/predicates/CanUpdateOutgoingEdge.ts#L22)
Loading

0 comments on commit de21a20

Please sign in to comment.